katello-nightly-rpm-pipeline 436 failed

Katello nightly pipeline failed:

https://ci.theforeman.org/job/katello-nightly-rpm-pipeline/436/

foreman-katello-nightly-test (failed)
foreman-katello-upgrade-nightly-test (failed)

@katello Looks like these failure are due to tests:

not ok 18 promote content view
# (in test file fb-content-katello.bats, line 253)
#   `hammer content-view version promote  --organization="${ORGANIZATION}" \' failed with status 128
# Could not promote the content view:
#   Could not find environments for promotion
not ok 19 create activation key
# (in test file fb-content-katello.bats, line 116)
#   `--unlimited-hosts | grep -q "Activation key created"' failed
# Could not create the activation key:
#   Validation failed: Content view 'Test CV' is not in environment 'Test'
not ok 20 disable auto-attach
# (in test file fb-content-katello.bats, line 120)
#   `hammer activation-key update --organization="${ORGANIZATION}" \' failed with status 70
# Could not update the activation key:
#   Error: activation_key not found.
not ok 21 add subscription to activation key
# (in test file fb-content-katello.bats, line 127)
#   `--name="${ACTIVATION_KEY}" | grep ID | tr -d ' ' | cut -d':' -f2)' failed
# Error: activation_key not found.
ok 22 install subscription manager
ok 23 disable puppet agent to prevent checkin from registering host to another org
ok 24 delete host if present
ok 25 register subscription manager with username and password
not ok 26 register subscription manager with activation key
# (in test file fb-content-katello.bats, line 177)
#   `subscription-manager list --consumed | grep "${PRODUCT}"' failed
# rc=0
# Unregistering from: pipeline-katello-server-nightly-centos7.n48.example.com:443/rhsm
# System has been unregistered.
# rc=0
# All local data removed
# rc=70
# HTTP error (404 - Not Found): Couldn't find activation key 'Test AK'
ok 27 start puppet again
ok 28 check content host is registered
not ok 29 enable content view repo
# (in test file fb-content-katello.bats, line 190)
#   `subscription-manager repos --enable="${ORGANIZATION_LABEL}_${PRODUCT_LABEL}_${YUM_REPOSITORY_LABEL}" | grep -q "is enabled for this system"' failed
ok 30 install katello-host-tools
not ok 31 install package locally
# (from function `tIsRedHatCompatible' in file os_helper.bash, line 4,
#  from function `tPackageInstall' in file os_helper.bash, line 89,
#  in test file fb-content-katello.bats, line 199)
#   `tPackageInstall walrus-0.71 && tPackageExists walrus-0.71' failed
# Loaded plugins: enabled_repos_upload, fastestmirror, package_upload, product-id,
#               : search-disabled-repos, subscription-manager
# This system is not registered with an entitlement server. You can use subscription-manager to register.
# Loading mirror speeds from cached hostfile
#  * base: mirror3.ci.centos.org
#  * centos-sclo-rh: mirror3.ci.centos.org
#  * epel: mirror.ci.centos.org
#  * extras: mirror3.ci.centos.org
#  * updates: mirror3.ci.centos.org
# No package walrus-0.71 available.
# Error: Nothing to do
# Uploading Enabled Repositories Report
# Cannot upload enabled repos report, is this client registered?
not ok 32 check available errata
# (in test file fb-content-katello.bats, line 207)
#   `hammer host errata list --host $HOSTNAME | grep 'RHEA-2012:0055'' failed
ok 33 install katello-agent
ok 34 30 sec of sleep for groggy gofers
not ok 35 install package remotely (katello-agent)
# (from function `tPackageExists' in file os_helper.bash, line 80,
#  in test file fb-content-katello.bats, line 225)
#   `tPackageExists gorilla' failed
# Could not install packages:
#   Host has not been registered with subscription-manager.
not ok 36 install errata remotely (katello-agent)
# (from function `tPackageExists' in file os_helper.bash, line 80,
#  in test file fb-content-katello.bats, line 231)
#   `tPackageExists walrus-5.21' failed
# Task ff9e5763-d120-4c98-9a17-d9826bbf0849 running: 0.6666666666666666/1, 66%, elapsed: 00:00:00
# Task ff9e5763-d120-4c98-9a17-d9826bbf0849 warning: 1.0/1, 100%, elapsed: 00:00:02
# Task ff9e5763-d120-4c98-9a17-d9826bbf0849 warning: 1.0/1, 100%, elapsed: 00:00:02
# Error: 404 Not Found
not ok 37 package remove (katello-agent)
# (in test file fb-content-katello.bats, line 236)
#   `timeout 300 hammer host package remove --host $HOSTNAME --packages walrus' failed with status 128
# Could not remove packages:
#   Host has not been registered with subscription-manager.
ok 38 add puppet module to content view
ok 39 publish content view
not ok 40 promote content view
# (in test file fb-content-katello.bats, line 253)
#   `hammer content-view version promote  --organization="${ORGANIZATION}" \' failed with status 128
# Could not promote the content view:
#   Could not find environments for promotion
ok 41 # skip add puppetclass to host
ok 42 # skip puppet run applies dummy module
ok 43 try fetching docker content

First error seen in production.log:

2020-03-10T20:41:25 [E|app|a89de768] Katello::HttpErrors::BadRequest: Could not find environments for promotion
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.pre.master/app/controllers/katello/api/v2/content_view_versions_controller.rb:293:in `validate_promotable'

Pretty sure this is the cause: https://github.com/Katello/katello/pull/8595/files#r389786812

In retrospect we should fix hammer before we merge a change like that. Especially since it can use the new parameter.

Yep. I’ll get a fix in for it today

Is there an issue or PR that can be followed for progress?

https://projects.theforeman.org/issues/29310

PR now available: https://github.com/Katello/hammer-cli-katello/pull/727

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.