upload artifact tooling fails with upload-artifacts: command not found

Bug #1933336 reported by Rajesh Tailor
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Rajesh Tailor

Bug Description

With change [1] upload artifacts tooling was updated for swiftless undercloud.

I have followed below steps to upload puppet-nova changes through this tooling.

(i) Create 'puppet-modules' directory in /home/stack on undercloud and clone puppet-nova repo.

```
(undercloud) [stack@undercloud ~]$ mkdir puppet-modules
git clone https://opendev.org/openstack/puppet-nova.git nova
```

(ii) Then did required puppet changes in above cloned repo.

(iii) Then tried to use upload-puppet-modules command for upload puppet changes to artifacts, but it failed with below error.

```
(undercloud) [stack@undercloud ~]$ upload-puppet-modules -d puppet-modules
Creating tarball...
Tarball created.
/usr/bin/upload-puppet-modules: line 90: upload-artifacts: command not found
```

After creating upload-artifacts script in /usr/bin same as [2] and tried running upload-puppet-modules again.

It failed with different error now.

```
(undercloud) [stack@undercloud ~]$ upload-puppet-modules -d puppet-modules
Creating tarball...
Tarball created.
renamed '/tmp/puppet-modules-cVfseAl/puppet-modules.tar.gz' -> '/var/lib/tripleo/artifacts/overcloud-artifacts/puppet-modules.tar.gz'
Creating heat environment file: /home/stack/.tripleo/environments/puppet-modules-url.yaml
Traceback (most recent call last):
  File "<stdin>", line 6, in <module>
NameError: name 'files' is not defined
```

After adding below line after [3] in upload-artifacts script.

files = ['$FILES']

Finally it did work.

[1] https://review.opendev.org/c/openstack/tripleo-common/+/783113
[2] https://review.opendev.org/c/openstack/tripleo-common/+/783113/4/scripts/upload-artifacts
[3] https://opendev.org/openstack/tripleo-common/src/branch/master/scripts/upload-artifacts#L123

Rajesh Tailor (ratailor)
Changed in tripleo:
assignee: nobody → Rajesh Tailor (ratailor)
yatin (yatinkarel)
Changed in tripleo:
status: New → Confirmed
importance: Undecided → High
milestone: none → xena-2
Changed in tripleo:
status: Confirmed → In Progress
Rajesh Tailor (ratailor)
description: updated
Revision history for this message
Rabi Mishra (rabi) wrote :

Actually you can just create the tar archive and add a parameter to one of your environments. That would simply do it.

tar --transform "s|puppet-modules|etc/puppet/modules|" -czf "puppet-modules.tar.gz" puppet-modules

parameter_defaults:
  DeployArtifactFILEs: [<path of the tar file>]

Changed in tripleo:
milestone: xena-2 → xena-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-common (master)

Change abandoned by "Rajesh Tailor <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-common/+/797628
Reason: Abandoning in favour of https://review.opendev.org/c/openstack/tripleo-common/+/804899

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-common/+/804899
Committed: https://opendev.org/openstack/tripleo-common/commit/7428219d9f6904970b9024680f1b0c331a26b36a
Submitter: "Zuul (22348)"
Branch: master

commit 7428219d9f6904970b9024680f1b0c331a26b36a
Author: Damien Ciabrini <email address hidden>
Date: Tue Aug 17 18:55:30 2021 +0200

    Fix upload-artifacts and its installation

    Fix the content of DeployArtifactFILEs in the generated
    environment file. The absolute path of the artifact is
    now properly formatted, and the script correctly handles
    multiple files passed in parameters.

    Fix the installation of the script in setup.cfg.

    Tested manually with multiple artifacts, and via
    upload-puppet-modules (single artifact).

    Change-Id: I946df38ada9b2197076963e6140653f85d7c2cbc
    Closes-Bug: #1933336

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-common/+/805760

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-common/+/805760
Committed: https://opendev.org/openstack/tripleo-common/commit/b6a546df7f4bea2c817a898771963d62c312b965
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit b6a546df7f4bea2c817a898771963d62c312b965
Author: Damien Ciabrini <email address hidden>
Date: Tue Aug 17 18:55:30 2021 +0200

    Fix upload-artifacts and its installation

    Fix the content of DeployArtifactFILEs in the generated
    environment file. The absolute path of the artifact is
    now properly formatted, and the script correctly handles
    multiple files passed in parameters.

    Fix the installation of the script in setup.cfg.

    Tested manually with multiple artifacts, and via
    upload-puppet-modules (single artifact).

    Change-Id: I946df38ada9b2197076963e6140653f85d7c2cbc
    Closes-Bug: #1933336
    (cherry picked from commit 7428219d9f6904970b9024680f1b0c331a26b36a)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 16.2.0

This issue was fixed in the openstack/tripleo-common 16.2.0 release.

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

This issue was fixed in the openstack/tripleo-common 15.4.0 release.

Revision history for this message
Shyam (shyam.biradar) wrote :
Download full text (16.3 KiB)

Hi,

I have installed tipleo wallaby cloud on centos8 stream. On my undercloud node, I am facing same issue.

/usr/bin/upload-puppet-modules: line 90: upload-artifacts: command not found

Environment details

---------------------------------------------------------------
# package version on my cloud is 15.4.1
 [root@wallabyuc8 shyam]# rpm -qa | grep tripleo-common
openstack-tripleo-common-containers-15.4.1-0.20220312023833.82eea31.el8.noarch
openstack-tripleo-common-15.4.1-0.20220312023833.82eea31.el8.noarch
python3-tripleo-common-15.4.1-0.20220312023833.82eea31.el8.noarch

-------------------------------------------------------------------------
Package coming from repo: openstack-tripleo-common-15.4.1-0.20220312023833.82eea31.el8.src.rpm

 [root@wallabyuc8 shyam]# dnf info python3-tripleo-common
Last metadata expiration check: 0:08:13 ago on Tue 15 Mar 2022 12:40:44 AM EDT.
Installed Packages
Name : python3-tripleo-common
Version : 15.4.1
Release : 0.20220312023833.82eea31.el8
Architecture : noarch
Size : 692 k
Source : openstack-tripleo-common-15.4.1-0.20220312023833.82eea31.el8.src.rpm
Repository : @System
From repo : delorean-component-tripleo
Summary : Python library for code used by TripleO projects.
URL : https://github.com/rdo-management/tripleo-common
License : ASL 2.0
Description : Python library for code used by TripleO projects.

 [root@wallabyuc8 shyam]#
-------------------------------------------------------------------

List of files installed by package

[root@wallabyuc8 openstack-tripleo-common]# rpm -qa | grep tripleo-common
python3-tripleo-common-15.4.1-0.20220227221354.2942989.el8.noarch
openstack-tripleo-common-containers-15.4.1-0.20220227221354.2942989.el8.noarch
openstack-tripleo-common-15.4.1-0.20220227221354.2942989.el8.noarch
It is expected that the fix should be available in our installed packages.

But fix is missing. upload-artifacts executable file is missing.

Here is the list of files installed by 'python3-tripleo-common' package on our tripleo setup.

 [root@wallabyuc8 shyam]# dnf repoquery -l python3-tripleo-common
Last metadata expiration check: 0:01:50 ago on Tue 15 Mar 2022 12:40:44 AM EDT.
/usr/bin/create_freeipa_enroll_envfile.py
/usr/bin/tripleo-build-images
/usr/bin/tripleo-config-download
/usr/bin/tripleo-deploy-openshift
/usr/bin/tripleo-mount-image
/usr/bin/tripleo-unmount-image
/usr/bin/upload-puppet-modules
/usr/bin/upload-swift-artifacts
/usr/lib/python3.6/site-packages/tripleo_common
/usr/lib/python3.6/site-packages/tripleo_common-15.4.1.dev59-py3.6.egg-info
/usr/lib/python3.6/site-packages/tripleo_common-15.4.1.dev59-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/tripleo_common-15.4.1.dev59-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/tripleo_common-15.4.1.dev59-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/tripleo_common-15.4.1.dev59-py3.6.egg-info/not-zip-safe
/usr/lib/python3.6/site-packages/tripleo_common-15.4.1.dev59-py3.6.egg-info/pbr.json
/usr/lib/python3.6/site-packages/tripleo_common-15.4.1.dev59-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/tripleo_common/__i...

Revision history for this message
yatin (yatinkarel) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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