deployment failure because of bogus lenght() check

Bug #1827091 reported by Luca Miccini
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-tripleo
New
Undecided
Luca Miccini

Bug Description

Deployment fails @ Step5 during fencing setup because of:

2019-04-30 16:46:01 | "Error: Evaluation Error: Error while evaluating a Function Call, 'length' parameter 'arg' expects a value of type Collection, String, or Binary, got Undef (file: /etc/puppet/modules/tripleo/manifests/fencing.pp, line: 113, column: 10) on node overcloud-controller-0.localdomain",
2019-04-30 16:46:01 | "+ rc=1",
2019-04-30 16:46:01 | "+ set -e",
2019-04-30 16:46:01 | "+ set +ux",
2019-04-30 16:46:03 | "Error running ['docker', 'run', '--name', 'cinder_volume_init_bundle', '--label', 'config_id=tripleo_step5', '--label', 'container_name=cinder_volume_init_bundle', '--label', 'managed_by=paunch', '--label', 'config_data={\"ipc\": \"host\", \"start_order\": 1, \"image\": \"192.168.24.1:8787/tripleomaster/centos-binary-cinder-volume:4e63540245da0a910d6e69fb4a0cd56c45ec46a4_d645108a\", \"environment\": [\"TRIPLEO_DEPLOY_IDENTIFIER=1556635660\"], \"command\": [\"/container_puppet_apply.sh\", \"5\", \"file,file_line,concat,augeas,pacemaker::resource::bundle,pacemaker::property,pacemaker::constraint::location\", \"include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::cinder::volume_bundle\", \"--debug --verbose\"], \"user\": \"root\", \"volumes\": [\"/etc/hosts:/etc/hosts:ro\", \"/etc/localtime:/etc/localtime:ro\", \"/etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:ro\", \"/etc/pki/ca-trust/source/anchors:/etc/pki/ca-trust/source/anchors:ro\", \"/etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro\", \"/etc/pki/tls/certs/ca-bundle.trust.crt:/etc/pki/tls/certs/ca-bundle.trust.crt:ro\", \"/etc/pki/tls/cert.pem:/etc/pki/tls/cert.pem:ro\", \"/dev/log:/dev/log\", \"/var/lib/container-config-scripts/container_puppet_apply.sh:/container_puppet_apply.sh:ro\", \"/etc/puppet:/tmp/puppet-etc:ro\", \"/usr/share/openstack-puppet/modules:/usr/share/openstack-puppet/modules:ro\", \"/etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro\"], \"net\": \"host\", \"detach\": false}', '--env=TRIPLEO_DEPLOY_IDENTIFIER=1556635660', '--net=host', '--ipc=host', '--user=root', '--volume=/etc/hosts:/etc/hosts:ro', '--volume=/etc/localtime:/etc/localtime:ro', '--volume=/etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:ro', '--volume=/etc/pki/ca-trust/source/anchors:/etc/pki/ca-tException occured while running the command
2019-04-30 16:46:03 | Traceback (most recent call last):
2019-04-30 16:46:03 | File "/usr/lib/python2.7/site-packages/tripleoclient/command.py", line 30, in run
2019-04-30 16:46:03 | super(Command, self).run(parsed_args)
2019-04-30 16:46:03 | File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
2019-04-30 16:46:03 | return super(Command, self).run(parsed_args)
2019-04-30 16:46:03 | File "/usr/lib/python2.7/site-packages/cliff/command.py", line 184, in run
2019-04-30 16:46:03 | return_code = self.take_action(parsed_args) or 0
2019-04-30 16:46:03 | File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 966, in take_action
2019-04-30 16:46:03 | verbosity=self.app_args.verbose_level)
2019-04-30 16:46:03 | File "/usr/lib/python2.7/site-packages/tripleoclient/workflows/deployment.py", line 327, in config_download
2019-04-30 16:46:03 | raise exceptions.DeploymentError("Overcloud configuration failed.")
2019-04-30 16:46:03 | DeploymentError: Overcloud configuration failed.

this probably happens because in https://review.opendev.org/#/c/653939/ we've introduced a check like:

      if length($driver_devices) == 1

I did not see this issue neither during a manual 'puppet apply' nor a deployment, but just in case I think we can add a safeguard check to avoid calculating length() when $driver_devices is 'Undef'.

Luca Miccini (lmiccini2)
Changed in puppet-pacemaker:
assignee: nobody → Luca Miccini (lmiccini2)
affects: puppet-pacemaker → puppet-tripleo
Revision history for this message
Luca Miccini (lmiccini2) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-tripleo 11.0.0

This issue was fixed in the openstack/puppet-tripleo 11.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-tripleo 10.5.2

This issue was fixed in the openstack/puppet-tripleo 10.5.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-tripleo rocky-eol

This issue was fixed in the openstack/puppet-tripleo rocky-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-tripleo queens-eol

This issue was fixed in the openstack/puppet-tripleo queens-eol release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.