-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Milestone
Description
ISSUE TYPE
- Bug Report
COMPONENT NAME
Packaging
CLOUDSTACK VERSION
4.18 after commit cdaad257ea3aaeb15cefc13abfb1803d149348d8
CONFIGURATION
N/A
OS / ENVIRONMENT
Debian packaging
SUMMARY
Cloudstack-usage package post-install job has a dependancy on cloudstack-management package. This dependancy is missing in the Control file.
STEPS TO REPRODUCE
On a fresh install of 4.18 on debian based system, install all cloudstack packages with no specific order.
If cloudstack-usage is installed before cloudstack-management, cloudstack-usage post-install script fails with error:
"chown: invalid user: ‘cloud:cloud’"
"dpkg: error processing package cloudstack-usage (--configure):"
" installed cloudstack-usage package post-installation script subprocess returned error exit status 1"
EXPECTED RESULTS
cloudstack-usage package should install without error.
ACTUAL RESULTS
Since commit cdaad257ea3aaeb15cefc13abfb1803d149348d8, a chown command ("chown cloud:cloud ...") is executed in debian/cloudstack-usage.postinst (https://github.com/apache/cloudstack/blob/66cbe0a0512cae71ba42b9f2b02ab86f41f9c33d/debian/cloudstack-usage.postinst#L49).
The "cloud" user is created in debian/cloudstack-management.postinst (https://github.com/apache/cloudstack/blob/66cbe0a0512cae71ba42b9f2b02ab86f41f9c33d/debian/cloudstack-management.postinst#L23-L25)
However, in the debian/control file, cloudstack-usage has no dependancy on cloudstack-management:
https://github.com/apache/cloudstack/blob/66cbe0a0512cae71ba42b9f2b02ab86f41f9c33d/debian/control#L37
cloudstack-usage may be installed before cloudstack-management and "chown cloud:cloud" command may happen before user "cloud" is created, leading to a failed installation.
Note: the aforementioned commit also introduces chown commands for other packaging systems, but I am not geared to check if the same issue happens on RedHat or Suse based systems.
Reactions are currently unavailable