Bug #35506
closedUpgrade fails when no content is synced
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2124519
Description of problem:
Upgrade tries to change ownership of /var/lib/pulp/media/artifact directory which does not exist until some content is synced. This causes the upgrade to fail.
Version-Release number of selected component (if applicable):
-
How reproducible:
always
Steps to Reproduce:
1. Install Satellite 6.10
2. Don't sync any repositories
3. Attempt to upgrade to 6.11
subscription-manager repos --enable rhel-7-server-satellite-maintenance-6.11-rpms
satellite-maintain upgrade list-versions
satellite-maintain upgrade check --target-version 6.11
satellite-maintain upgrade run --target-version 6.11
Actual results:
Upgrade check reports no errors, but upgrade fails with following error:
Fix Pulpcore artifact ownership to be pulp:pulp:
/ # chown -hR pulp.pulp /var/lib/pulp/media/artifact [FAIL]
No such file or directory - /var/lib/pulp/media/artifact
Expected results:
Upgrade should be successful even if the directory does not exist. Maybe the step should be skipped or the directory created...
Additional info:
The upgrade step was introduced in bz2106501