mitigate FUEL 8.0 incorrect auth_url error
diff --git a/wally/discover/discover.py b/wally/discover/discover.py
index f890237..5b9d3fe 100644
--- a/wally/discover/discover.py
+++ b/wally/discover/discover.py
@@ -67,11 +67,15 @@
res = fuel.discover_fuel_nodes(clusters_info['fuel'],
var_dir,
discover_nodes)
- nodes, clean_data, openrc_dict = res
+ nodes, clean_data, openrc_dict, version = res
if openrc_dict is None:
ctx.fuel_openstack_creds = None
else:
+ if version >= [8, 0] and openrc_dict['os_auth_url'].startswith("https://"):
+ logger.warning("Fixing FUEL 8.0 AUTH url - replace https://->http://")
+ openrc_dict['os_auth_url'] = "http" + openrc_dict['os_auth_url'][5:]
+
ctx.fuel_openstack_creds = {
'name': openrc_dict['username'],
'passwd': openrc_dict['password'],
diff --git a/wally/discover/fuel.py b/wally/discover/fuel.py
index 34adc07..4f34298 100644
--- a/wally/discover/fuel.py
+++ b/wally/discover/fuel.py
@@ -34,12 +34,11 @@
cluster_id = get_cluster_id(conn, fuel_data['openstack_env'])
cluster = reflect_cluster(conn, cluster_id)
+ version = FuelInfo(conn).get_version()
if not discover_nodes:
logger.warning("Skip fuel cluster discovery")
- return ([], None, cluster.get_openrc())
-
- version = FuelInfo(conn).get_version()
+ return ([], None, cluster.get_openrc(), version)
fuel_nodes = list(cluster.get_nodes())
@@ -91,7 +90,8 @@
return (nodes,
(ssh_conn, fuel_ext_iface, ips_ports),
- cluster.get_openrc())
+ cluster.get_openrc(),
+ version)
def download_master_key(conn):
diff --git a/wally/main.py b/wally/main.py
index c25d0b6..7851ee5 100644
--- a/wally/main.py
+++ b/wally/main.py
@@ -41,6 +41,7 @@
self.openstack_nodes_ids = []
self.sensors_mon_q = None
self.hw_info = []
+ self.fuel_openstack_creds = None
def get_stage_name(func):
diff --git a/wally/run_test.py b/wally/run_test.py
index af317b3..f99f445 100755
--- a/wally/run_test.py
+++ b/wally/run_test.py
@@ -365,7 +365,7 @@
creds.auth_url,
True)
- logger.debug(("OS_CREDS: user={0.name} tenant={0.tenant}" +
+ logger.debug(("OS_CREDS: user={0.name} tenant={0.tenant} " +
"auth_url={0.auth_url} insecure={0.insecure}").format(creds))
return creds