Bug 2005914 - check_latest_packages_version is run without package list
Summary: check_latest_packages_version is run without package list
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: validations-common
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z1
: 16.2 (Train on RHEL 8.4)
Assignee: Jiri Podivin
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-20 13:23 UTC by Uemit Seren
Modified: 2022-08-08 15:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-30 14:14:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-9741 0 None None None 2022-08-08 15:29:39 UTC
Red Hat Issue Tracker VALFRWK-610 0 None None None 2021-09-20 14:23:44 UTC

Description Uemit Seren 2021-09-20 13:23:59 UTC
Description of problem:

When running the pre-upgrade validation on OSP16.2 the check_latest_packages_version fails because it contains an empty package list:

   "validation_output": [
        {
            "task": {
                "hosts": {
                    "localhost": {
                        "_ansible_no_log": false,
                        "action": "check_package_update",
                        "changed": false,
                        "failed": true,
                        "invocation": {
                            "module_args": {
                                "packages_list": [],
                                "pkg_mgr": null
                            }
                        },
                        "msg": "No packages given to check."
                    }
                },
                "name": "Get available updates for packages",
                "status": "FAILED"
            }
        }

It seems that the check_latest_packages_version playbook in validations-common was replaced with a tripleo-latest-packages-version playboon in openstack-triple-validations that simply calls the check_latest_packages_version role passing in the python3-tripleoclient package to the role.
It seems that OSP 16.2 has still a version of validations-common that contains the removed check_latest_packages_version playbook.

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

openstack-tripleo-validations-11.6.1-2.20210612074808.8644a02.el8ost.1.noarch
validations-common-1.1.2-2.20210611010116.el8ost.2.noarch

How reproducible:

Run the pre-upgrade validation.

Steps to Reproduce:
1. undercloud tripleo validator run --group pre-upgrade

| 29fe51bf-9a60-4d83-9191-6c198aac3eac | check-latest-packages-version       | FAILED | localhost                | localhost                              |                   | 0:00:00.829 |

Actual results:

check-latest-packages-version validation should not be run but tripleo-latest-packages-version instead.

Expected results:

Both tripleo-latest-packages-version and check-latest-packages-version validation are run

Additional info:

Comment 1 Jiri Podivin 2021-09-21 15:04:46 UTC
Can I see contents of the '/usr/share/ansible/validation-playbooks' dir? 

Apart from that, the 'check-latest-packages-version' is still present in the validations-common. 
It is meant to be used with the user defined list of validations.

Comment 2 Uemit Seren 2021-09-21 16:43:50 UTC
Hi Jiri,

FYI: We did an inplace upgrade from OSP 16.1 to OSP 16.2. 

Below are the contents of /usr/share/ansible/validation-playbooks

[[dev]stack@uc ~]$ ls -l /usr/share/ansible/validation-playbooks

-rw-r--r--. 1 root root  264 May 23 18:13 512e.yaml
-rw-r--r--. 1 root root  735 May 15 14:46 ceilometerdb-size.yaml
-rw-r--r--. 1 root root  438 Jun 16 07:50 ceph-ansible-installed.yaml
-rw-r--r--. 1 root root  459 May 15 14:46 ceph-dependencies-installed.yaml
-rw-r--r--. 1 root root  454 May 15 14:46 ceph-health.yaml
-rw-r--r--. 1 root root  932 May 15 14:46 ceph-pg.yaml
-rw-r--r--. 1 root root  344 May 23 18:13 check-cpu.yaml
-rw-r--r--. 1 root root  514 May 23 18:13 check-disk-space-pre-upgrade.yaml
-rw-r--r--. 1 root root  560 May 23 18:13 check-disk-space.yaml
-rw-r--r--. 1 root root  321 May 21 04:49 check-for-dangling-images.yaml
-rw-r--r--. 1 root root  252 May 23 18:13 check-ftype.yaml
-rw-r--r--. 1 root root  330 May 23 18:13 check-latest-packages-version.yaml
-rw-r--r--. 1 root root  337 May 15 14:46 check-network-gateway.yaml
-rw-r--r--. 1 root root  318 May 23 18:13 check-ram.yaml
-rw-r--r--. 1 root root  509 May 15 14:46 check-rhsm-version.yaml
-rw-r--r--. 1 root root  286 May 23 18:13 check-selinux-mode.yaml
-rw-r--r--. 1 root root  406 Jun 12 09:49 check-uc-hostname.yaml
-rw-r--r--. 1 root root  430 May 15 14:46 check-undercloud-conf.yaml
-rw-r--r--. 1 root root  337 May 15 14:46 collect-flavors-and-verify-profiles.yaml
-rw-r--r--. 1 root root  308 May 15 14:46 container-status.yaml
-rw-r--r--. 1 root root 2206 May 15 14:46 containerized-undercloud-docker.yaml
-rw-r--r--. 1 root root  499 May 15 14:46 controller-token.yaml
-rw-r--r--. 1 root root  317 May 15 14:46 controller-ulimits.yaml
-rw-r--r--. 1 root root  393 May 15 14:46 ctlplane-ip-range.yaml
-rw-r--r--. 1 root root  269 May 15 14:46 default-node-count.yaml
-rw-r--r--. 1 root root  513 May 15 14:46 dhcp-introspection.yaml
-rw-r--r--. 1 root root  542 May 15 14:46 dhcp-provisioning.yaml
-rw-r--r--. 1 root root  226 May 23 18:13 dns.yaml
-rw-r--r--. 1 root root  497 May 15 14:49 haproxy.yaml
-rw-r--r--. 1 root root  345 May 15 14:46 healthcheck-service-status.yaml
-rw-r--r--. 1 root root  313 May 15 14:46 image-serve.yaml
-rw-r--r--. 1 root root  271 May 15 14:46 ironic-boot-configuration.yaml
-rw-r--r--. 1 root root  391 May 15 14:46 mysql-open-files-limit.yaml
-rw-r--r--. 1 root root  757 May 15 14:46 network-environment.yaml
-rw-r--r--. 1 root root  470 May 15 14:46 neutron-sanity-check.yaml
-rw-r--r--. 1 root root  406 May 15 14:46 no-op-firewall-nova-driver.yaml
-rw-r--r--. 1 root root  251 May 23 18:13 no-op.yaml
-rw-r--r--. 1 root root  347 May 15 14:46 node-disks.yaml
-rw-r--r--. 1 root root  267 May 15 14:46 node-health.yaml
-rw-r--r--. 1 root root 1354 May 15 14:46 nova-event-callback.yaml
-rw-r--r--. 1 root root 1061 May 15 14:46 nova-status.yaml
-rw-r--r--. 1 root root  279 May 15 14:46 nova-svirt.yaml
-rw-r--r--. 1 root root  414 May 23 18:13 ntp.yaml
-rw-r--r--. 1 root root 1559 May 15 14:46 openshift-hw-requirements.yaml
-rw-r--r--. 1 root root  455 May 15 14:46 openshift-nw-requirements.yaml
-rw-r--r--. 1 root root  485 May 15 14:46 openstack-endpoints.yaml
-rw-r--r--. 1 root root  736 May 21 04:49 overcloud-service-status.yaml
-rw-r--r--. 1 root root  412 May 15 14:46 ovs-dpdk-pmd-cpus-check.yaml
-rw-r--r--. 1 root root  523 May 15 14:46 pacemaker-status.yaml
-rw-r--r--. 1 root root  315 May 15 14:46 rabbitmq-limits.yaml
-rw-r--r--. 1 root root  462 May 15 14:46 repos.yaml
-rw-r--r--. 1 root root  375 May 23 18:13 service-status.yaml
-rw-r--r--. 1 root root  284 May 15 14:46 stack-health.yaml
-rw-r--r--. 1 root root  681 May 15 14:46 stonith-exists.yaml
-rw-r--r--. 1 root root  806 May 15 14:46 switch-vlans.yaml
-rw-r--r--. 1 root root  271 May 15 14:46 system_encoding.yaml
-rw-r--r--. 1 root root  512 May 15 14:46 tls-everywhere-post-deployment.yaml
-rw-r--r--. 1 root root  503 May 15 14:46 tls-everywhere-pre-deployment.yaml
-rw-r--r--. 1 root root  385 May 15 14:46 tls-everywhere-prep.yaml
-rw-r--r--. 1 root root  541 May 15 14:46 tripleo-latest-packages-version.yaml
-rw-r--r--. 1 root root  454 May 15 14:46 undercloud-debug.yaml
-rw-r--r--. 1 root root  620 May 15 14:46 undercloud-disk-space-pre-upgrade.yaml
-rw-r--r--. 1 root root  667 May 15 14:46 undercloud-disk-space.yaml
-rw-r--r--. 1 root root  480 May 15 14:46 undercloud-heat-purge-deleted.yaml
-rw-r--r--. 1 root root  868 May 15 14:46 undercloud-neutron-sanity-check.yaml
-rw-r--r--. 1 root root  510 May 15 14:46 undercloud-process-count.yaml
-rw-r--r--. 1 root root  395 May 15 14:46 undercloud-service-status.yaml
-rw-r--r--. 1 root root  467 May 15 14:46 undercloud-tokenflush.yaml
-rw-r--r--. 1 root root  728 May 23 18:13 validate-selinux.yaml

Comment 3 Jiri Podivin 2021-09-22 08:25:53 UTC
Playbook is there, and it certainly should be run, provided it has the right group set.

Could you please provide full output of the original 'run' command, with '--debug' option if possible? 
And the 'tripleo-latest-packages-version.yaml' file? Just to be sure it actually has that group set.

Comment 4 Uemit Seren 2021-09-22 08:39:18 UTC
Hi Jiri, 

The output of openstack tripleo validator run --debug  --validation check-latest-packages-version:



START with options: tripleo validator run --debug --validation check-latest-packages-version
options: Namespace(access_token='***', access_token_endpoint='', access_token_type='', aodh_endpoint='', application_credential_id='', application_credential_name='', application_credential_secret='***', auth_methods='', auth_type='password', auth_url='https://10.100.72.4:13000', cacert='/etc/pki/ca-trust/source/anchors/cm-local-ca.pem', cert='', client_id='', client_secret='***', cloud='', code='', 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_compute_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_event_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_metrics_api_version='1', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_placement_api_version='1.0', os_project_id=None, os_project_name=None, os_queues_api_version='2', os_tripleoclient_api_version='1', os_volume_api_version='', os_workflow_api_version='2', passcode='', password='***', profile='', project_domain_id='', project_domain_name='Default', project_id='', project_name='admin', protocol='', redirect_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='', user_domain_id='', user_domain_name='Default', user_id='', username='admin', verbose_level=3, verify=None)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': '/etc/pki/ca-trust/source/anchors/cm-local-ca.pem', 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_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': False, 'inspector_api_version': '1', 'auth_url': 'https://10.100.72.4:13000', 'username': 'admin', 'password': '***', 'beta_command': 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_api_version': '2', 'key_manager_api_version': '1', 'event_api_version': '2', 'placement_api_version': '1.0', 'metrics_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_introspection_status_code_retries': 5, 'image_status_code_retries': 5, 'disable_vendor_agent': {}, 'interface': None, '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'}
cloud cfg: {'api_timeout': None, 'verify': True, 'cacert': '/etc/pki/ca-trust/source/anchors/cm-local-ca.pem', 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_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': False, 'inspector_api_version': '1', 'auth_url': 'https://10.100.72.4:13000', 'username': 'admin', 'password': '***', 'beta_command': 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_api_version': '2', 'key_manager_api_version': '1', 'event_api_version': '2', 'placement_api_version': '1.0', 'metrics_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
event API version 2, cmd group openstack.event.v2
placement API version 1.0, cmd group openstack.placement.v1
metric API version 1, cmd group openstack.metric.v1
alarming API version 2, cmd group openstack.alarming.v2
Popen(['git', 'version'], cwd=/home/stack/clip-stack/clip-tripleo, universal_newlines=False, shell=None)
Popen(['git', 'version'], cwd=/home/stack/clip-stack/clip-tripleo, universal_newlines=False, shell=None)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': '/etc/pki/ca-trust/source/anchors/cm-local-ca.pem', 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_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': False, 'inspector_api_version': '1', 'auth_url': 'https://10.100.72.4:13000', 'username': 'admin', 'password': '***', 'beta_command': 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_api_version': '2', 'key_manager_api_version': '1', 'event_api_version': '2', 'placement_api_version': '1.0', 'metrics_api_version': '1', 'alarming_api_version': '2', 'region_name': '', 'auth_type': 'password', 'networks': []}
command: tripleo validator run -> tripleoclient.v1.tripleo_validator.TripleOValidatorRun (auth=False)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': '/etc/pki/ca-trust/source/anchors/cm-local-ca.pem', 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_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://10.100.72.4:13000', 'username': 'admin', 'password': '***', 'beta_command': 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_api_version': '2', 'key_manager_api_version': '1', 'event_api_version': '2', 'placement_api_version': '1.0', 'metrics_api_version': '1', 'alarming_api_version': '2', 'region_name': '', 'auth_type': 'password', 'networks': []}
run(Namespace(extra_env_vars=None, extra_vars=None, extra_vars_file='', group=[], limit=None, plan=None, python_interpreter='/usr/bin/python3', ssh_user='heat-admin', static_inventory='', validation_name=['check-latest-packages-version']))
Using auth plugin: password
Using parameters {'auth_url': 'https://10.100.72.4:13000', 'project_name': 'admin', 'project_domain_name': 'Default', 'username': 'admin', 'user_domain_name': 'Default', 'password': '***'}
Running Validations without Overcloud settings.
Running the validations with Ansible
Ansible playbook /usr/share/ansible/validation-playbooks/check-latest-packages-version.yaml found
Running Ansible playbook: /usr/share/ansible/validation-playbooks/check-latest-packages-version.yaml, Working directory: /var/log/validations/artifacts//7e1b0e46-c698-43b3-85b0-c1e5659c8429_check-latest-packages-version.yaml_2021-09-22T08:38:00.304309Z, Playbook directory: /usr/share/ansible/validation-playbooks
+--------------------------------------+-------------------------------+--------+------------+----------------+-------------------+-------------+
| UUID                                 | Validations                   | Status | Host_Group | Status_by_Host | Unreachable_Hosts | Duration    |
+--------------------------------------+-------------------------------+--------+------------+----------------+-------------------+-------------+
| 7e1b0e46-c698-43b3-85b0-c1e5659c8429 | check-latest-packages-version | FAILED | localhost  | localhost      |                   | 0:00:00.836 |
+--------------------------------------+-------------------------------+--------+------------+----------------+-------------------+-------------+
Removing static tripleo ansible inventory file
Running cmd (subprocess): /usr/bin/rm -f /home/stack/tripleo-ansible-inventory.yaml
CMD "/usr/bin/rm -f /home/stack/tripleo-ansible-inventory.yaml" returned: 0 in 0.010s
One or more validations have failed.
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cliff/app.py", line 401, in run_subcommand
    result = cmd.run(parsed_args)
  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 473, in take_action
    self._run_validator_run(parsed_args)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/tripleo_validator.py", line 470, in _run_validator_run
    _("One or more validations have failed."))
osc_lib.exceptions.CommandError: One or more validations have failed.
clean_up TripleOValidatorRun: One or more validations have failed.
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 401, in run_subcommand
    result = cmd.run(parsed_args)
  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 473, in take_action
    self._run_validator_run(parsed_args)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/tripleo_validator.py", line 470, in _run_validator_run
    _("One or more validations have failed."))
osc_lib.exceptions.CommandError: One or more validations have failed.

END return value: 1


The contents of tripleo-latest-packages-version.yaml:

---
- hosts: undercloud
  become: true
  pre_tasks:
    - name: Fact gathering
      setup:
        gather_subset:
          - '!all'
          - '!min'
          - python
  vars:
    metadata:
      name: Check if latest version of TripleO packages is installed
      description: |
        Make sure a list of TripleO packages are at its latest version
        before starting an upgrade.
      groups:
        - pre-upgrade
    packages_list:
      - "python{{ ansible_python.version.major }}-tripleoclient"
  roles:
    - check_latest_packages_version

Comment 6 Jiri Podivin 2021-09-29 06:17:34 UTC
Would this sort of resolution be acceptable for the customer? Mind you, when running with groups, the validation will still show up as failed.

Comment 7 Uemit Seren 2021-09-29 07:39:36 UTC
Jiri: Sorry I might have missed it, but which resolution are you referring to ?

Comment 8 Jiri Podivin 2021-09-29 07:46:12 UTC
Ah, forgot that conf flag. 

In short, the 'check-latest-packages-version' shouldn't actually be run in the 16.2. It's function is covered by the more specific 'tripleo-latest-packages-version'.

The 'check-latest-packages-version' is just too general and it needs a list of packages to check, in order to actually work.
So we were thinking about closing this as not-a-bug, with the view, that it's essentially an expected failure of the validation in question, and that at future date we might want to cover this with a note in our documentation. 

Would that resolution be acceptable?

Comment 9 Uemit Seren 2021-09-29 08:13:27 UTC
Hi Jiri, 

thanks for the clarification. 
The check-latest-packages-version validation is part of the pre-upgrade group and will be run when it is run with --group pre-upgrade. 
Wouldn't it make sense then to remove the it from that group otherwise opreators always have to remember that the failed check-latest-packages-version validation is a false positive when running the pre-update validations as part of a minor upgrade workflow ? 
But we could also patch the check-latest-packages-version validations ourselves and remove the group key.

Comment 10 Jiri Podivin 2021-09-29 08:24:24 UTC
Yes, I was pointing out that issue in my previous comments. I'll ask in the VF if they would be fine with removing the group.
That being said, I'm not sure if either is an ideal approach.

Comment 12 Jiri Podivin 2021-09-30 14:14:14 UTC
Hi Uemit,

This behavior is unintended, and a result of a compromise on our part, regarding the group metadata key.
Unfortunately, at this time we are unable to completely resolve the issue, without compromising other parts of the Validation Framework.
Nevertheless, there are efforts under way to remedy the issue, in part if not completely. 

The appropriate approach to address the issue would be to, in case of the 16.1 and earlier deployments, to use original validation exclusively.
And in all later releases to use the tripleo-latest-packages-version.
If it is necessary to run multiple validations by selecting entire group, my recommendation would be to ignore the failure of the 'check-latest-packages-version' at least for the 16.2 and later releases. 

Thanks for bringing this to our attention, we are going to focus on the issue and resolve it in the future.


Regards,
Jiri Podivin


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