puppet-manifests failes to compile on centos

Bug #2002423 reported by Scott Little
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Critical
Jorge Saffe

Bug Description

Brief Description
-----------------
puppet-manifests failes to compile on centos. Debian is unaffected.
I suspect it relates to the automatic generation of pyc/pyo files
performed by rpmbuild, and the selection of python2 vs 3.

Introduced by...
https://review.opendev.org/c/starlingx/stx-puppet/+/865174

Probably relevant discussion here ...
https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation#Status_quo

Severity
--------
Critical

Steps to Reproduce
------------------
build-pkgs

Expected Behavior
------------------
All packages compile

Actual Behavior
----------------
puppet-manifests fails to compile

Reproducibility
---------------
Reproducible

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
20230110T011934Z

Last Pass
---------
Did this test scenario pass previously? If so, please indicate the load/pull time info of the last pass.
Use this section to also indicate if this is a new test scenario.

Timestamp/Logs
--------------
+ make install BINDIR=/builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/local/bin CONFIGDIR=/builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/etc/puppet MODULEDIR=/builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/share/puppet/modules
install -m 755 -D bin/puppet-manifest-apply.sh /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/local/bin/puppet-manifest-apply.sh
install -m 755 -D bin/apply_network_config.sh /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/local/bin/apply_network_config.sh
install -m 755 -D bin/network_ifupdown.sh /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/local/bin/network_ifupdown.sh
install -m 755 -D bin/network_sysconfig.sh /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/local/bin/network_sysconfig.sh
install -m 755 -D bin/puppet-update-default-grub.sh /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/local/bin/puppet-update-default-grub.sh
install -m 755 -D bin/puppet-update-grub-env.py /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/local/bin/puppet-update-grub-env.py
install -d -m 0755 /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/etc/puppet
install -m 640 etc/hiera.yaml /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/etc/puppet
cp -R hieradata /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/etc/puppet/
cp -R manifests /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/etc/puppet/
install -d -m 0755 /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/share/puppet/modules
cp -R modules/platform /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/share/puppet/modules/
cp -R modules/openstack /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/share/puppet/modules/
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
Compiling /builddir/build/BUILDROOT/puppet-manifests-1.0.0-1328.tis.x86_64/usr/share/puppet/modules/platform/files/change_k8s_control_plane_params.py ...
  File "/usr/share/puppet/modules/platform/files/change_k8s_control_plane_params.py", line 539
    file.write(f"{key}: {value}\n")
                                 ^
SyntaxError: invalid syntax
RPM build errors:
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.9Fv0i9 (%install)
BUILDSTDERR: Bad exit status from /var/tmp/rpm-tmp.9Fv0i9 (%install)
Child return code was: 1

Test Activity
-------------
Build

Workaround
----------
N/A

Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Jorge Saffe (jsaffe)
Revision history for this message
Ghada Khalil (gkhalil) wrote (last edit ):

Jorge, please investigate/address this centos build failure introduced by your recent change. The issue is related to python3 vs python2 syntax. Note: We are still running CentOS builds in StarlingX until the end-of-Jan, so we need this issue addressed asap.

Changed in starlingx:
importance: Undecided → Critical
tags: added: stx.8.0 stx.build
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-puppet (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/stx-puppet/+/870033

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-puppet (master)

Reviewed: https://review.opendev.org/c/starlingx/stx-puppet/+/870033
Committed: https://opendev.org/starlingx/stx-puppet/commit/bb4ea6df565a13af21629fa552ced9aaf96886bd
Submitter: "Zuul (22348)"
Branch: master

commit bb4ea6df565a13af21629fa552ced9aaf96886bd
Author: Jorge Saffe <email address hidden>
Date: Thu Jan 12 15:50:32 2023 -0500

    Fix kubelet '[]string' type casting and python 2.x compatibility

    - Add casting for kubelet "[]string" type during
      K8s custom configuration update.
    - Restore python 2.x compatibility

    Test Plan:
      PASS: Kubelet runtime testing
        1) Add '[]string' type valid parameter with valid value & apply.
           - Pod updated successfully.
        2) Modify '[]string' type valid parameter with valid value & apply.
           - Pod updated successfully
        3) Modify '[]string' type valid parameter with invalid value & apply.
           - Pod update failed.
             Auto recovery process completed successfully.
        4) Delete latest added parameter & apply.
           - Pod updated successfully.

    Closes-Bug: 2002423

    Signed-off-by: Jorge Saffe <email address hidden>
    Change-Id: I5ca032abcd34dc12d4979b42fcfe28c81765f758

Changed in starlingx:
status: In Progress → Fix Released
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.