benj-n opened a new issue, #7507:
URL: https://github.com/apache/cloudstack/issues/7507
<!--
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and main branch are affected too.
Always add information AFTER of these HTML comments, but no need to delete
the comments.
-->
##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
* Bug Report
##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
Packaging
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main
branch.
-->
~~~
4.18 after commit cdaad257ea3aaeb15cefc13abfb1803d149348d8
~~~
##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network,
advanced networking, etc. N/A otherwise
-->
N/A
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
Debian packaging
##### SUMMARY
<!-- Explain the problem/feature briefly -->
Cloudstack-usage package post-install job has a dependancy on
cloudstack-management package. This dependancy is missing in the Control file.
##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal
test-case. Use Screenshots if accurate.
For new features, show how the feature would be used.
-->
<!-- Paste example playbooks or commands between quotes below -->
~~~
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"
~~~
<!-- You can also paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
~~~
cloudstack-usage package should install without error.
~~~
##### ACTUAL RESULTS
<!-- What actually happened? -->
<!-- Paste verbatim command output between quotes below -->
~~~
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.
~~~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]