Bug 1892323 - Validations in FFU 13->16.1: Not possible to run validations before 'openstack undercloud upgrade'
Summary: Validations in FFU 13->16.1: Not possible to run validations before 'openstac...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-tripleoclient
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z4
: 16.1 (Train on RHEL 8.2)
Assignee: Cédric Jeanneret
QA Contact: David Rosenfeld
URL:
Whiteboard:
Depends On: 1912879
Blocks: 1898482 1898633
TreeView+ depends on / blocked
 
Reported: 2020-10-28 13:44 UTC by Jose Luis Franco
Modified: 2021-03-17 15:35 UTC (History)
9 users (show)

Fixed In Version: python-tripleoclient-12.3.2-1.20200914164931.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1898633 (view as bug list)
Environment:
Last Closed: 2021-03-17 15:33:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1902052 0 None None None 2020-10-29 12:22:34 UTC
OpenStack gerrit 760351 0 None MERGED Do not require authentication for the validator CLI 2021-02-12 15:18:06 UTC
Red Hat Product Errata RHBA-2021:0817 0 None None None 2021-03-17 15:35:27 UTC

Description Jose Luis Franco 2020-10-28 13:44:40 UTC
Description of problem:

During the FFU procedure we start by the Undercloud's upgrade. First we upgrade the operating system from RHEL7 to RHEL8, during this step we remove most of the packages/containers/etc... once the node is in RHEL8 no openstack service will be running. We install python3-tripleoclient and next would be the execution of the "openstack undercloud upgrade".

Right after install python3-tripleoclient and before running the undercloud upgrade it would be very useful to run some set of validations (check undercloud.conf, templates, etc...) at this step. However, the validations framework has a dependency on keystone to run validations, even though we pass a inventory, also there is no posibility to run the validations list:

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator list
Failed to discover available identity versions when contacting https://192.168.24.2:13000/. Attempting to parse version from URL.
Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct. Unable to establish connection to https://192.168.24
.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection o
bject at 0x7ffb444f3198>: Failed to establish a new connection: [Errno 113] No route to host',))
(undercloud) [stack@undercloud-0 ~]$ tripleo-ansible-inventory --static-yaml-inventory ~/inventory.yaml --stack qe-Cloud-0
WARNING:keystoneauth.identity.generic.base:Failed to discover available identity versions when contacting https://192.168.24.2:13000/. Attempting to parse version from URL.
Error creating static inventory: Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct. Unable to establish
 connection to https://192.168.24.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.con
nection.VerifiedHTTPSConnection object at 0x7fa7d491c668>: Failed to establish a new connection: [Errno 113] No route to host',))


Nor run any validation:

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --static-inventory inventory.yaml --group pre-upgrade
Failed to discover available identity versions when contacting https://192.168.24.2:13000/. Attempting to parse version from URL.
Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct. Unable to establish connection to https://192.168.24
.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection o
bject at 0x7f25194e8f98>: Failed to establish a new connection: [Errno 113] No route to host',))


(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --static-inventory inventory.yaml --validation 512e
Failed to discover available identity versions when contacting https://192.168.24.2:13000/. Attempting to parse version from URL.
Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct. Unable to establish connection to https://192.168.24
.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection o
bject at 0x7f042d424f98>: Failed to establish a new connection: [Errno 113] No route to host',))



In case this would be useful, I ran the command in --debug mode:

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --debug --static-inventory inventory.yaml --validation 512e
START with options: tripleo validator run --debug --static-inventory inventory.yaml --validation 512e
options: Namespace(access_key='', access_secret='***', access_token='***', access_token_endpoint='', access_token_type='', aodh_endpoint='', application_credential_id='', ap
plication_credential_name='', application_credential_secret='***', auth_methods='', auth_type='password', auth_url='https://192.168.24.2:13000/', cacert=None, cert='', clien
t_id='', client_secret='***', cloud='', code='', consumer_key='', consumer_secret='***', debug=True, default_domain='default', default_domain_id='', default_domain_name='',
deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, inspector_api_version='
1', inspector_url=None, interface='public', key='', log_file=None, openid_scope='', os_alarming_api_version='2', os_baremetal_api_version='1.58', os_beta_command=False, os_c
ompute_api_version='', os_container_infra_api_version='1', os_data_processing_api_version='1.1', os_data_processing_url='', os_database_api_version='1', os_dns_api_version='
2', os_identity_api_version='3', os_image_api_version='', os_key_manager_api_version='1', os_loadbalancer_api_version='2.0', os_network_api_version='', os_object_api_version
='', os_orchestration_api_version='1', os_project_id=None, os_project_name=None, os_queues_api_version='2', os_tripleoclient_api_version='1', os_volume_api_version='', os_wo
rkflow_api_version='2', passcode='', password='***', profile='', project_domain_id='', project_domain_name='Default', project_id='', project_name='admin', protocol='', redir
ect_uri='', region_name='', remote_project_domain_id='', remote_project_domain_name='', remote_project_id='', remote_project_name='', roles='', service_provider='', service_
provider_endpoint='', service_provider_entity_id='', system_scope='', timing=False, token='***', trust_id='', user_domain_id='', user_domain_name='Default', user_id='', user
name='admin', verbose_level=3, verify=None)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_co
de_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_
format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name':
'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'default_domain': 'default', 'timing': Fals
e, 'inspector_api_version': '1', 'auth_url': 'https://192.168.24.2:13000/', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'queu
es_api_version': '2', 'database_api_version': '1', 'tripleoclient_api_version': '1', 'data_processing_api_version': '1.1', 'loadbalancer_api_version': '2.0', 'workflow_api_v
ersion': '2', 'container_infra_api_version': '1', 'baremetal_api_version': '1.58', 'orchestration_api_version': '1', 'dns_api_version': '2', 'key_manager_api_version': '1',
'alarming_api_version': '2', 'region_name': '', 'auth_type': 'password', 'networks': []}
defaults: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'auth_type': 'password', 'baremetal_status_code_retries': 5, 'baremetal_introspect
ion_status_code_retries': 5, 'image_status_code_retries': 5, 'disable_vendor_agent': {}, 'interface': None, 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'i
mage_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active'}
cloud cfg: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retrie
s': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format':
'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default'
, 'project_domain_name': 'Default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'default_domain': 'default', 'timing': False, 'inspe
ctor_api_version': '1', 'auth_url': 'https://192.168.24.2:13000/', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'queues_api_ve
rsion': '2', 'database_api_version': '1', 'tripleoclient_api_version': '1', 'data_processing_api_version': '1.1', 'loadbalancer_api_version': '2.0', 'workflow_api_version':
'2', 'container_infra_api_version': '1', 'baremetal_api_version': '1.58', 'orchestration_api_version': '1', 'dns_api_version': '2', 'key_manager_api_version': '1', 'alarming
_api_version': '2', 'region_name': '', 'auth_type': 'password', 'networks': []}
compute API version 2.1, cmd group openstack.compute.v2
identity API version 3, cmd group openstack.identity.v3
image API version 2, cmd group openstack.image.v2
network API version 2, cmd group openstack.network.v2
object_store API version 1, cmd group openstack.object_store.v1
volume API version 3, cmd group openstack.volume.v3
messaging API version 2, cmd group openstack.messaging.v2
database API version 1, cmd group openstack.database.v1
tripleoclient API version 1, cmd group openstack.tripleoclient.v1
data_processing API version 1.1, cmd group openstack.data_processing.v1
load_balancer API version 2.0, cmd group openstack.load_balancer.v2
neutronclient API version 2, cmd group openstack.neutronclient.v2
workflow_engine API version 2, cmd group openstack.workflow_engine.v2
container_infra API version 1, cmd group openstack.container_infra.v1
baremetal API version 1.58, cmd group openstack.baremetal.v1
baremetal_introspection API version 1, cmd group openstack.baremetal_introspection.v1
orchestration API version 1, cmd group openstack.orchestration.v1
dns API version 2, cmd group openstack.dns.v2
key_manager API version 1, cmd group openstack.key_manager.v1
alarming API version 2, cmd group openstack.alarming.v2
Popen(['git', 'version'], cwd=/home/stack, universal_newlines=False, shell=None)
Popen(['git', 'version'], cwd=/home/stack, universal_newlines=False, shell=None)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_co
de_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_
format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name':
'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'default_domain': 'default', 'timing': Fals
e, 'inspector_api_version': '1', 'auth_url': 'https://192.168.24.2:13000/', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'queu
es_api_version': '2', 'database_api_version': '1', 'tripleoclient_api_version': '1', 'data_processing_api_version': '1.1', 'loadbalancer_api_version': '2.0', 'workflow_api_v
ersion': '2', 'container_infra_api_version': '1', 'baremetal_api_version': '1.58', 'orchestration_api_version': '1', 'dns_api_version': '2', 'key_manager_api_version': '1',
'alarming_api_version': '2', 'region_name': '', 'auth_type': 'password', 'networks': []}
command: tripleo validator run -> tripleoclient.v1.tripleo_validator.TripleOValidatorRun (auth=True)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_co
de_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_
format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name':
'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'additional_user_agent': [('osc-lib', '1.14.1')], 'verbose_level': 3, 'deferred_help': False, 'debug':
 True, 'default_domain': 'default', 'timing': False, 'inspector_api_version': '1', 'auth_url': 'https://192.168.24.2:13000/', 'username': 'admin', 'password': '***', 'beta_c
ommand': False, 'identity_api_version': '3', 'queues_api_version': '2', 'database_api_version': '1', 'tripleoclient_api_version': '1', 'data_processing_api_version': '1.1',
'loadbalancer_api_version': '2.0', 'workflow_api_version': '2', 'container_infra_api_version': '1', 'baremetal_api_version': '1.58', 'orchestration_api_version': '1', 'dns_a
pi_version': '2', 'key_manager_api_version': '1', 'alarming_api_version': '2', 'region_name': '', 'auth_type': 'password', 'networks': []}
Using auth plugin: password
Using parameters {'auth_url': 'https://192.168.24.2:13000/', 'project_name': 'admin', 'project_domain_name': 'Default', 'username': 'admin', 'user_domain_name': 'Default', '
password': '***'}
Get auth_ref
REQ: curl -g -i -X GET https://192.168.24.2:13000 -H "Accept: application/json" -H "User-Agent: openstacksdk/0.36.3 keystoneauth1/3.17.2 python-requests/2.20.0 CPython/3.6.8
"
Starting new HTTPS connection (1): 192.168.24.2:13000
Failed to discover available identity versions when contacting https://192.168.24.2:13000/. Attempting to parse version from URL.
Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct. Unable to establish connection to https://192.168.24
.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection o
bject at 0x7f64f454dfd0>: Failed to establish a new connection: [Errno 113] No route to host',))
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
OSError: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 301, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f64f454dfd0>: Failed to establish a new connection: [Errno 113] No route to h
ost

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.V
erifiedHTTPSConnection object at 0x7f64f454dfd0>: Failed to establish a new connection: [Errno 113] No route to host',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/keystoneauth1/session.py", line 979, in _send_request
    resp = self.session.request(method, url, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connectio
n.VerifiedHTTPSConnection object at 0x7f64f454dfd0>: Failed to establish a new connection: [Errno 113] No route to host',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/keystoneauth1/identity/generic/base.py", line 138, in _do_create_plugin
    authenticated=False)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/identity/base.py", line 610, in get_discovery
    authenticated=authenticated)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/discover.py", line 1442, in get_discovery
    disc = Discover(session, url, authenticated=authenticated)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/discover.py", line 526, in __init__
    authenticated=authenticated)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/discover.py", line 101, in get_version_data
    resp = session.get(url, headers=headers, authenticated=authenticated)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/session.py", line 1098, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/session.py", line 888, in request
    resp = send(**kwargs)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/session.py", line 995, in _send_request
    raise exceptions.ConnectFailure(msg)
keystoneauth1.exceptions.connection.ConnectFailure: Unable to establish connection to https://192.168.24.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max r
etries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f64f454dfd0>: Failed to establish a new connection: [Errn
o 113] No route to host',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cliff/app.py", line 394, in run_subcommand
    self.prepare_to_run_command(cmd)
  File "/usr/lib/python3.6/site-packages/openstackclient/shell.py", line 166, in prepare_to_run_command
    return super(OpenStackShell, self).prepare_to_run_command(cmd)
  File "/usr/lib/python3.6/site-packages/osc_lib/shell.py", line 493, in prepare_to_run_command
    self.client_manager.auth_ref
  File "/usr/lib/python3.6/site-packages/osc_lib/clientmanager.py", line 202, in auth_ref
    self._auth_ref = self.auth.get_auth_ref(self.session)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/identity/generic/base.py", line 206, in get_auth_ref
    self._plugin = self._do_create_plugin(session)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/identity/generic/base.py", line 161, in _do_create_plugin
    'auth_url is correct. %s' % e)
keystoneauth1.exceptions.discovery.DiscoveryFailure: Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct.
 Unable to establish connection to https://192.168.24.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectio
nError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f64f454dfd0>: Failed to establish a new connection: [Errno 113] No route to host',))
clean_up TripleOValidatorRun: Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct. Unable to establish co
nnection to https://192.168.24.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connec
tion.VerifiedHTTPSConnection object at 0x7f64f454dfd0>: Failed to establish a new connection: [Errno 113] No route to host',))
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
OSError: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 301, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f64f454dfd0>: Failed to establish a new connection: [Errno 113] No route to h
ost

During handling of the above exception, another exception occurred:
                                                                                                                                                                             
Traceback (most recent call last):                                                                                                                                           
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 449, in send                                                                                            
    timeout=timeout
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.$
erifiedHTTPSConnection object at 0x7f64f454dfd0>: Failed to establish a new connection: [Errno 113] No route to host',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/keystoneauth1/session.py", line 979, in _send_request
    resp = self.session.request(method, url, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connecti$
n.VerifiedHTTPSConnection object at 0x7f64f454dfd0>: Failed to establish a new connection: [Errno 113] No route to host',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/keystoneauth1/identity/generic/base.py", line 138, in _do_create_plugin
    authenticated=False)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/identity/base.py", line 610, in get_discovery
    authenticated=authenticated)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/discover.py", line 1442, in get_discovery
    disc = Discover(session, url, authenticated=authenticated)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/discover.py", line 526, in __init__
    authenticated=authenticated)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/discover.py", line 101, in get_version_data
    resp = session.get(url, headers=headers, authenticated=authenticated)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/session.py", line 1098, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/session.py", line 888, in request
    resp = send(**kwargs)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/session.py", line 995, in _send_request
    raise exceptions.ConnectFailure(msg)
keystoneauth1.exceptions.connection.ConnectFailure: Unable to establish connection to https://192.168.24.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max r
etries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f64f454dfd0>: Failed to establish a new connection: [Errn
o 113] No route to host',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/osc_lib/shell.py", line 136, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python3.6/site-packages/cliff/app.py", line 281, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python3.6/site-packages/osc_lib/shell.py", line 176, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python3.6/site-packages/cliff/app.py", line 394, in run_subcommand
    self.prepare_to_run_command(cmd)
  File "/usr/lib/python3.6/site-packages/openstackclient/shell.py", line 166, in prepare_to_run_command
    return super(OpenStackShell, self).prepare_to_run_command(cmd)
  File "/usr/lib/python3.6/site-packages/osc_lib/shell.py", line 493, in prepare_to_run_command
    self.client_manager.auth_ref
  File "/usr/lib/python3.6/site-packages/osc_lib/clientmanager.py", line 202, in auth_ref
    self._auth_ref = self.auth.get_auth_ref(self.session)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/identity/generic/base.py", line 206, in get_auth_ref
    self._plugin = self._do_create_plugin(session)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/identity/generic/base.py", line 161, in _do_create_plugin
    'auth_url is correct. %s' % e)
keystoneauth1.exceptions.discovery.DiscoveryFailure: Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct.
 Unable to establish connection to https://192.168.24.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectio
nError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f64f454dfd0>: Failed to establish a new connection: [Errno 113] No route to host',))

END return value: 1


Version-Release number of selected component (if applicable):

(undercloud) [stack@undercloud-0 ~]$ sudo rpm -qa | egrep "pythontripleoclient|tripleo-validations"
openstack-tripleo-validations-11.3.2-0.20200611115253.08f469d.el8ost.noarch
(undercloud) [stack@undercloud-0 ~]$ sudo rpm -qa | egrep "tripleoclient|tripleo-validations"
python3-tripleoclient-heat-installer-12.3.2-0.20200615103427.6f877f6.el8ost.noarch
python3-tripleoclient-12.3.2-1.20200914164928.el8ost.noarch
openstack-tripleo-validations-11.3.2-0.20200611115253.08f469d.el8ost.noarch


How reproducible:


Steps to Reproduce:
1. Leapp upgrade the Undercloud
2. Install python3-tripleoclient
3. Run some tripleo validator command.

Actual results:

tripleo validator command doesn't work

Expected results:

tripleo validator works.

Additional info:

Comment 1 Jose Luis Franco 2020-10-28 14:08:55 UTC
Just as a side note, when triggering the "openstack undercloud upgrade" command the inflight validations for the Undercloud do get triggered:

(undercloud) [stack@undercloud-0 ~]$ openstack undercloud upgrade -y 2>&1 | tee undercloud_upgrade.log                                                                      
^[[B^[[B^[[B^[[B^[[BUpdating necessary packages: python3-tripleoclient openstack-tripleo-common openstack-tripleo-heat-templates openstack-tripleo-validations tripleo-ansib$
e                                                                              
Updating Subscription Management repositories.                                 
Unable to read consumer identity                                                                                                                                            
/usr/lib/python3.6/site-packages/dateutil/parser/_parser.py:70: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751
  instream = instream.decode()                                                 
                                                                               
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 1:18:42 ago on Wed 28 Oct 2020 08:40:18 AM EDT.
Dependencies resolved.                                                                                                                                                      
==============================================================================================
 Package                            Arch    Version                        Repository     Size
==============================================================================================
Upgrading:                                                              
 openstack-tripleo-heat-templates   noarch  11.3.2-1.20200914170156.el8ost rhelosp-16.1  654 k
 openstack-tripleo-validations      noarch  11.3.2-1.20200914170825.el8ost rhelosp-16.1  161 k
 tripleo-ansible                    noarch  0.5.1-1.20200914163925.el8ost  rhelosp-16.1  357 k

Transaction Summary
==============================================================================================
Upgrade  3 Packages

Total download size: 1.1 M
Downloading Packages:
(1/3): tripleo-ansible-0.5.1-1.20200914163925.e 652 kB/s | 357 kB     00:00
(2/3): openstack-tripleo-validations-11.3.2-1.2 293 kB/s | 161 kB     00:00
(3/3): openstack-tripleo-heat-templates-11.3.2- 1.1 MB/s | 654 kB     00:00
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------                                                                                    [43/1955]
Total                                           2.0 MB/s | 1.1 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Upgrading        : tripleo-ansible-0.5.1-1.20200914163925.el8ost.noarch   1/6
  Upgrading        : openstack-tripleo-heat-templates-11.3.2-1.2020091417   2/6
  Upgrading        : openstack-tripleo-validations-11.3.2-1.2020091417082   3/6
  Cleanup          : openstack-tripleo-heat-templates-11.3.2-0.2020061608   4/6
  Cleanup          : tripleo-ansible-0.5.1-0.20200611113659.34b8fcc.el8os   5/6
  Cleanup          : openstack-tripleo-validations-11.3.2-0.2020061111525   6/6
  Running scriptlet: openstack-tripleo-validations-11.3.2-0.2020061111525   6/6
  Verifying        : openstack-tripleo-heat-templates-11.3.2-1.2020091417   1/6
  Verifying        : openstack-tripleo-heat-templates-11.3.2-0.2020061608   2/6
  Verifying        : openstack-tripleo-validations-11.3.2-1.2020091417082   3/6
  Verifying        : openstack-tripleo-validations-11.3.2-0.2020061111525   4/6
  Verifying        : tripleo-ansible-0.5.1-1.20200914163925.el8ost.noarch   5/6
  Verifying        : tripleo-ansible-0.5.1-0.20200611113659.34b8fcc.el8os   6/6
Installed products updated.

Upgraded:
  openstack-tripleo-heat-templates-11.3.2-1.20200914170156.el8ost.noarch
  openstack-tripleo-validations-11.3.2-1.20200914170825.el8ost.noarch
  tripleo-ansible-0.5.1-1.20200914163925.el8ost.noarch

Complete!

Using /tmp/undercloud-disk-space-pre-upgrade.yamli9qda5hxansible.cfg as config file
[WARNING]: log file at /usr/share/ansible/validation-playbooks/ansible.log is not writeable and we cannot create it, aborting

Success! The validation passed for all hosts:
* undercloud
Invalid local_interface specified. eth0 is not available.
An error occurred during configuration validation, please check your host configuration and try again.
Error message: Invalid local_interface specified. eth0 is not available.

So there seems to be some difference between inflight and command triggered. And if you wonder that the source of the problem was the lack of tripleo-ansible or tripleo-validations, it didn't make a difference:

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --static-inventory inventory.yaml --validation 512e                                                    
Failed to discover available identity versions when contacting https://192.168.24.2:13000/. Attempting to parse version from URL.                                           
Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct. Unable to establish connection to https://192.168.24.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f5382b45f98>: Failed to establish a new connection: [Errno 113] No route to host',))                                                                            


(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator list
Failed to discover available identity versions when contacting https://192.168.24.2:13000/. Attempting to parse version from URL.
Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct. Unable to establish connection to https://192.168.24.2:13000: HTTPSConnectionPool(host='192.168.24.2', port=13000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8dd82a4198>: Failed to establish a new connection: [Errno 113] No route to host',))

These commands were run after the first openstack undercloud upgrade command.

Comment 2 Jose Luis Franco 2020-10-29 09:09:24 UTC
(In reply to Jose Luis Franco from comment #1)
> Just as a side note, when triggering the "openstack undercloud upgrade"
> command the inflight validations for the Undercloud do get triggered:
> 
> (undercloud) [stack@undercloud-0 ~]$ openstack undercloud upgrade -y 2>&1 |
> tee undercloud_upgrade.log                                                  
> 
> ^[[B^[[B^[[B^[[B^[[BUpdating necessary packages: python3-tripleoclient
> openstack-tripleo-common openstack-tripleo-heat-templates
> openstack-tripleo-validations tripleo-ansib$
> e                                                                           
> 
> Updating Subscription Management repositories.                              
> 
> Unable to read consumer identity                                            
> 
> /usr/lib/python3.6/site-packages/dateutil/parser/_parser.py:70:
> UnicodeWarning: decode() called on unicode string, see
> https://bugzilla.redhat.com/show_bug.cgi?id=1693751
>   instream = instream.decode()                                              
> 
>                                                                             
> 
> This system is not registered to Red Hat Subscription Management. You can
> use subscription-manager to register.
> Last metadata expiration check: 1:18:42 ago on Wed 28 Oct 2020 08:40:18 AM
> EDT.
> Dependencies resolved.                                                      
> 
> =============================================================================
> =================
>  Package                            Arch    Version                       
> Repository     Size
> =============================================================================
> =================
> Upgrading:                                                              
>  openstack-tripleo-heat-templates   noarch  11.3.2-1.20200914170156.el8ost
> rhelosp-16.1  654 k
>  openstack-tripleo-validations      noarch  11.3.2-1.20200914170825.el8ost
> rhelosp-16.1  161 k
>  tripleo-ansible                    noarch  0.5.1-1.20200914163925.el8ost 
> rhelosp-16.1  357 k
> 
> Transaction Summary
> =============================================================================
> =================
> Upgrade  3 Packages
> 
> Total download size: 1.1 M
> Downloading Packages:
> (1/3): tripleo-ansible-0.5.1-1.20200914163925.e 652 kB/s | 357 kB     00:00
> (2/3): openstack-tripleo-validations-11.3.2-1.2 293 kB/s | 161 kB     00:00
> (3/3): openstack-tripleo-heat-templates-11.3.2- 1.1 MB/s | 654 kB     00:00
> -----------------------------------------------------------------------------
> ---
> -----------------------------------------------------------------------------
> ---                                                                         
> [43/1955]
> Total                                           2.0 MB/s | 1.1 MB     00:00
> Running transaction check
> Transaction check succeeded.
> Running transaction test
> Transaction test succeeded.
> Running transaction
>   Preparing        :                                                       
> 1/1
>   Upgrading        : tripleo-ansible-0.5.1-1.20200914163925.el8ost.noarch  
> 1/6
>   Upgrading        : openstack-tripleo-heat-templates-11.3.2-1.2020091417  
> 2/6
>   Upgrading        : openstack-tripleo-validations-11.3.2-1.2020091417082  
> 3/6
>   Cleanup          : openstack-tripleo-heat-templates-11.3.2-0.2020061608  
> 4/6
>   Cleanup          : tripleo-ansible-0.5.1-0.20200611113659.34b8fcc.el8os  
> 5/6
>   Cleanup          : openstack-tripleo-validations-11.3.2-0.2020061111525  
> 6/6
>   Running scriptlet: openstack-tripleo-validations-11.3.2-0.2020061111525  
> 6/6
>   Verifying        : openstack-tripleo-heat-templates-11.3.2-1.2020091417  
> 1/6
>   Verifying        : openstack-tripleo-heat-templates-11.3.2-0.2020061608  
> 2/6
>   Verifying        : openstack-tripleo-validations-11.3.2-1.2020091417082  
> 3/6
>   Verifying        : openstack-tripleo-validations-11.3.2-0.2020061111525  
> 4/6
>   Verifying        : tripleo-ansible-0.5.1-1.20200914163925.el8ost.noarch  
> 5/6
>   Verifying        : tripleo-ansible-0.5.1-0.20200611113659.34b8fcc.el8os  
> 6/6
> Installed products updated.
> 
> Upgraded:
>   openstack-tripleo-heat-templates-11.3.2-1.20200914170156.el8ost.noarch
>   openstack-tripleo-validations-11.3.2-1.20200914170825.el8ost.noarch
>   tripleo-ansible-0.5.1-1.20200914163925.el8ost.noarch
> 
> Complete!
> 
> Using /tmp/undercloud-disk-space-pre-upgrade.yamli9qda5hxansible.cfg as
> config file
> [WARNING]: log file at /usr/share/ansible/validation-playbooks/ansible.log
> is not writeable and we cannot create it, aborting
> 
> Success! The validation passed for all hosts:
> * undercloud
> Invalid local_interface specified. eth0 is not available.
> An error occurred during configuration validation, please check your host
> configuration and try again.
> Error message: Invalid local_interface specified. eth0 is not available.
> 
> So there seems to be some difference between inflight and command triggered.
> And if you wonder that the source of the problem was the lack of
> tripleo-ansible or tripleo-validations, it didn't make a difference:
> 
> (undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run
> --static-inventory inventory.yaml --validation 512e                         
> 
> Failed to discover available identity versions when contacting
> https://192.168.24.2:13000/. Attempting to parse version from URL.          
> 
> Could not find versioned identity endpoints when attempting to authenticate.
> Please check that your auth_url is correct. Unable to establish connection
> to https://192.168.24.2:13000: HTTPSConnectionPool(host='192.168.24.2',
> port=13000): Max retries exceeded with url: / (Caused by
> NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at
> 0x7f5382b45f98>: Failed to establish a new connection: [Errno 113] No route
> to host',))                                                                 
> 
> 
> 
> (undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator list
> Failed to discover available identity versions when contacting
> https://192.168.24.2:13000/. Attempting to parse version from URL.
> Could not find versioned identity endpoints when attempting to authenticate.
> Please check that your auth_url is correct. Unable to establish connection
> to https://192.168.24.2:13000: HTTPSConnectionPool(host='192.168.24.2',
> port=13000): Max retries exceeded with url: / (Caused by
> NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at
> 0x7f8dd82a4198>: Failed to establish a new connection: [Errno 113] No route
> to host',))
> 
> These commands were run after the first openstack undercloud upgrade command.

This comment made me think, that instead of fixing all of this, why don't I include this FFU validations as part of the inflight openstack undercloud upgrade validations? They seem to work fine, as it caught that I had a wrong interface configured, and they could block the upgrade which is more efficient than having a separate step. I will investigate this area and if it's possible, we could close this bugzilla as won't fix.

Comment 3 Cédric Jeanneret 2020-10-29 12:12:10 UTC
Hello there,

Thank you Jose for reporting this issue, and for all the details.

After a (really) quick check and hack on my current env, it seems we might "just" add "auth_required = False" to some, if not all, validator subcommands. I'd at least add it for the List and Show things - for the run, it's a bit more complicated due to the fact that we, actually, might need an authentication. Maybe as a parameter. Need to check that specific point, but I can at least start a review in order to disable for the "read-only" things.

Cheers,

C.

Comment 5 Jose Luis Franco 2020-11-04 21:38:13 UTC
So, I did apply the proposed patch in my environment and it did bypass the authentication part. Now I'm able to list validations and groups, however when I try to run any validation/group I get the following:

(undercloud) [stack@undercloud-0 ~]$ vi inventory.yaml                                                                                
(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --static-inventory inventory.yaml --group pre-upgrade              
Error while creating Ansible artifacts log file.Please check the access rights for {}                                                
Traceback (most recent call last):                                                                                                                                   
  File "/usr/lib/python3.6/site-packages/validations_libs/utils.py", line 45, in create_artifacts_dir                             
    os.makedirs(log_dir)                                                                                                                            
  File "/usr/lib64/python3.6/os.py", line 210, in makedirs                                                                            
    makedirs(head, mode, exist_ok)                                                                                                                                   
  File "/usr/lib64/python3.6/os.py", line 210, in makedirs                                                                        
    makedirs(head, mode, exist_ok)                                                                                                                   
  File "/usr/lib64/python3.6/os.py", line 220, in makedirs                                                                                      
    mkdir(name, mode)                                                                                                                 
PermissionError: [Errno 13] Permission denied: '/var/log/validations'                                                                        
Exception occured while running the command                                                                                           
Traceback (most recent call last):                                                                                                                  
  File "/usr/lib/python3.6/site-packages/validations_libs/utils.py", line 45, in create_artifacts_dir                                   
    os.makedirs(log_dir)                                                                                                                     
  File "/usr/lib64/python3.6/os.py", line 210, in makedirs                                                                           
    makedirs(head, mode, exist_ok)                                                                                                    
  File "/usr/lib64/python3.6/os.py", line 210, in makedirs                                                                              
    makedirs(head, mode, exist_ok)                                                                                                
  File "/usr/lib64/python3.6/os.py", line 220, in makedirs                                                                           
    mkdir(name, mode)                                                                                                                             
PermissionError: [Errno 13] Permission denied: '/var/log/validations'            
During handling of the above exception, another exception occurred:                                                                   
                                                                                                                                     
Traceback (most recent call last):                                                                                                                                   
  File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 32, in run                                                     
    super(Command, self).run(parsed_args)                                                                                            
  File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run                                                 
    return super(Command, self).run(parsed_args)                                                                                                    
  File "/usr/lib/python3.6/site-packages/cliff/command.py", line 185, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/tripleo_validator.py", line 398, in take_action
    self._run_validator_run(parsed_args)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/tripleo_validator.py", line 369, in _run_validator_run
    quiet=parsed_args.quiet)
  File "/usr/lib/python3.6/site-packages/validations_libs/validation_actions.py", line 100, in run_validations
    prefix=os.path.basename(playbook))
  File "/usr/lib/python3.6/site-packages/validations_libs/utils.py", line 48, in create_artifacts_dir
    LOG.exception("Error while creating Ansible artifacts log file."
AttributeError: 'NoneType' object has no attribute 'format'
'NoneType' object has no attribute 'format'

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --static-inventory inventory.yaml --validation 512e
Error while creating Ansible artifacts log file.Please check the access rights for {}
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/validations_libs/utils.py", line 45, in create_artifacts_dir
    os.makedirs(log_dir)
  File "/usr/lib64/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/lib64/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/lib64/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/var/log/validations'
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/validations_libs/utils.py", line 45, in create_artifacts_dir
    os.makedirs(log_dir)
  File "/usr/lib64/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/lib64/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/lib64/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/var/log/validations'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 32, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/cliff/command.py", line 185, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/tripleo_validator.py", line 398, in take_action
    self._run_validator_run(parsed_args)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/tripleo_validator.py", line 369, in _run_validator_run
    quiet=parsed_args.quiet)
  File "/usr/lib/python3.6/site-packages/validations_libs/validation_actions.py", line 100, in run_validations
    prefix=os.path.basename(playbook))
  File "/usr/lib/python3.6/site-packages/validations_libs/utils.py", line 48, in create_artifacts_dir
    LOG.exception("Error while creating Ansible artifacts log file."
AttributeError: 'NoneType' object has no attribute 'format'
'NoneType' object has no attribute 'format'

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator show history
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 32, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/cliff/display.py", line 116, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/tripleo_validator.py", line 460, in take_action
    return actions.show_history(parsed_args.validation)
  File "/usr/lib/python3.6/site-packages/validations_libs/validation_actions.py", line 164, in show_history
    if validation_id else vlogs.get_all_logfiles(extension))
  File "/usr/lib/python3.6/site-packages/validations_libs/validation_logs.py", line 209, in get_all_logfiles
    return [join(self.logs_path, f) for f in os.listdir(self.logs_path) if
FileNotFoundError: [Errno 2] No such file or directory: '/var/log/validations/'
[Errno 2] No such file or directory: '/var/log/validations/'

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator show parameter
{}

@Cédric , should we address this issue in this BZ, as they are related? Or should I open another one?

Thanks

Comment 6 Cédric Jeanneret 2020-11-05 14:47:36 UTC
That's for another BZ - the main issue was the authentication here.

Comment 11 David Rosenfeld 2021-01-25 13:32:05 UTC
Verification of this BZ is blocked by: https://bugzilla.redhat.com/show_bug.cgi?id=1912879

Comment 15 David Rosenfeld 2021-02-04 21:03:59 UTC
Validations can now be run without authentication:

openstack tripleo validator run --static-inventory inventory.yaml --group pre-upgrade
Running Validations without authentication.
+--------------------------------------+-------------------------------------+--------+--------------------------+----------------+-------------------+-------------+
|                 UUID                 |             Validations             | Status |        Host_Group        | Status_by_Host | Unreachable_Hosts |   Duration  |
+--------------------------------------+-------------------------------------+--------+--------------------------+----------------+-------------------+-------------+
| baef61fe-792d-452e-843f-df6c0f3ec206 |     check-disk-space-pre-upgrade    | PASSED |           all            | inventory.yaml |   inventory.yaml  | 0:00:16.565 |
| 48a24b4e-302f-4db5-b77e-58b71c4f2df8 |             check-ftype             | PASSED |           all            | inventory.yaml |   inventory.yaml  | 0:00:04.297 |
| 98431c75-cee0-4e14-93d8-f27f39685937 |    check-latest-packages-version    | PASSED |           all            | inventory.yaml |   inventory.yaml  | 0:00:04.442 |
| 485e9c4b-66b6-403e-9df3-11f604081638 |              check-ram              | PASSED |           all            | inventory.yaml |   inventory.yaml  | 0:00:04.449 |
| a4d416bb-63a4-4383-9bbe-67af80cf8b3c |            service-status           | PASSED |           all            | inventory.yaml |   inventory.yaml  | 0:00:04.641 |
| 8a00c87a-1eb6-4c63-907f-2ddd2fddb5e4 |           validate-selinux          | PASSED |           all            | inventory.yaml |   inventory.yaml  | 0:00:04.279 |
| ed2f35eb-e519-45fc-99ef-21f36f4f6062 | collect-flavors-and-verify-profiles | PASSED |        undercloud        |                |                   |             |
| 5c4f5c21-26f3-46df-82b8-c1acf675d442 |           container-status          | PASSED | undercloud, allovercloud |                |                   |             |
| a328e0bc-2da9-4f78-a276-b09c4ca76149 |         openstack-endpoints         | PASSED |        undercloud        |                |                   |             |
| c92afb4d-5954-40c2-b538-4b409b17cf03 |   containerized-undercloud-docker   | PASSED |        undercloud        |                |                   |             |
| fa9fbb07-e05e-4991-b3b1-db769e63dd2c |                repos                | PASSED | undercloud, allovercloud |                |                   |             |
| 281f5f6a-99e8-441e-8876-14c76c13ff71 |             image-serve             | PASSED |        undercloud        |                |                   |             |
| b7fbf2bc-47fe-410b-b22b-d43be6cb9b00 |      undercloud-service-status      | PASSED |        undercloud        |                |                   |             |
| a92e3850-c296-4a0d-abec-dab8f69344ed |      ironic-boot-configuration      | PASSED |        undercloud        |                |                   |             |
| 9fd986ab-9969-4309-a276-26d94b5a2074 |             stack-health            | PASSED |        undercloud        |                |                   |             |
| de6d15b9-de86-4462-8c8f-c732f351dbd9 |             node-health             | PASSED |        undercloud        |                |                   |             |
| fb82b219-0ec9-4a5e-92ac-5e91c39ffce0 |             nova-status             | PASSED |         nova_api         |                |                   |             |
| 957c0411-ecfc-4e08-8f90-04c283a2873e |  undercloud-disk-space-pre-upgrade  | PASSED |        undercloud        |                |                   |             |
| f40eca52-e795-4597-9680-1d3188f605ce |    undercloud-heat-purge-deleted    | PASSED |        undercloud        |                |                   |             |
+--------------------------------------+-------------------------------------+--------+--------------------------+----------------+-------------------+-------------+

Comment 21 errata-xmlrpc 2021-03-17 15:33:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1.4 director bug fix advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:0817


Note You need to log in before you can comment on or make changes to this bug.