Description of problem: upload-puppet-modules command if executed multiple times, then incorrectly creates the swift temp url. In the first run of upload puppet modules, it's creating the swift temp url correctly. But on subsequent runs, it is creating the url incorrectly. New temp url does not contain "temp_url_sig" field. Version-Release number of selected component (if applicable): Red Hat Openstack 16.0 Steps to Reproduce: 1. Run upload-puppet-modules command $ cp -r /usr/share/openstack-puppet/modules/tripleo ~/puppet-modules $ upload-puppet-modules --directory puppet-modules 2. Check swift temp url created It will look like following. [stack@undercloud ~]$ cat /home/stack/.tripleo/environments/puppet-modules-url.yaml # Heat environment to deploy artifacts via Swift Temp URL(s) parameter_defaults: DeployArtifactURLs: - 'http://172.172.3.83:8080/v1/AUTH_2ba8739bd95040d38337e5ecbb68e620/overcloud-artifacts/puppet-modules.tar.gz?temp_url_sig=8790e72a801e8d8ad016b850c7fa0044f605f94f&temp_url_expires=1614329134 3. Now run upload-puppet-modules command again. It will throw a warning and will complete with incorrect swift temp url. (undercloud) [stack@director ~]$ upload-puppet-modules --directory puppet-modules Creating tarball... Tarball created. /usr/bin/upload-swift-artifacts: line 132: [: {'Temp-Url-Key':: binary operator expected Creating heat environment file: /home/stack/.tripleo/environments/puppet-modules-url.yaml Uploading file to swift: /tmp/puppet-modules-Nm6O2gc/puppet-modules.tar.gz +-----------------------+---------------------+----------------------------------+ | object | container | etag | +-----------------------+---------------------+----------------------------------+ | puppet-modules.tar.gz | overcloud-artifacts | 66f9c13bb4ee7f8fb20421dbb2dd3231 | +-----------------------+---------------------+----------------------------------+ Upload complete. sha1: Option -hmac needs a value sha1: Use -help for summary. (undercloud) [stack@director ~]$ cat /home/stack/.tripleo/environments/puppet-modules-url.yaml # Heat environment to deploy artifacts via Swift Temp URL(s) parameter_defaults: DeployArtifactURLs: - 'http://192.168.24.3:8080/v1/AUTH_0440bfe31e4d4d0b8b1f323cc52a8466/overcloud-artifacts/puppet-modules.tar.gz?temp_url_sig=&temp_url_expires=1614422474' Actual results: Subsequent upload of modules return invalid temp-url. Expected results: It should return valid temp-url as it does in first run of upload-puppet-modules command. Additional info: In RHOSP13, running upload-puppet-modules multiple times always returned a valid url.
I fixed this on upstream master, and proposed the patches to stable/train.
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, 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-2020:2114