Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post-install messages still show up if the package fails to install #176

Closed
stevendanna opened this issue May 1, 2015 · 2 comments
Closed
Labels
Aspect: Packaging Distribution of the projects 'compiled' artifacts. Component: omnibus packaging Triage: Confirmed Indicates and issue has been confirmed as described. Type: Bug Does not work as expected.

Comments

@stevendanna
Copy link
Contributor

From @smith in chef/opscode-omnibus#427:

Tried this:

root@private-chef:/opt/opscode/sv/opscode-webui# dpkg -i /tmp/cache/private-chef_11.2.99+20140830193320.git.2.dd76a61-1_amd64.deb
(Reading database ... 136994 files and directories currently installed.)
Preparing to replace private-chef 11.1.5+20140725034804.git.249.b22037f-1 (using .../private-chef_11.2.99+20140830193320.git.2.dd76a61
-1_amd64.deb) ...
Unpacking replacement private-chef ...
dpkg: error processing /tmp/cache/private-chef_11.2.99+20140830193320.git.2.dd76a61-1_amd64.deb (--install):
 unable to make backup link of `./opt/opscode/embedded/cookbooks/private-chef/providers/pg_cluster.rb' before installing new version:
Operation not permitted
dpkg-deb: subprocess paste killed by signal (Broken pipe)
You have upgraded Private Chef!

The next step in the upgrade process is to run:

private-chef-ctl upgrade

Then, to remove configuration files, logs, directories,
users, etc. that were used by internal services that
have been removed from this version of Private Chef,
please run:

private-chef-ctl cleanup

(Add the '--no-op' option to see what would be removed by
this command)
Errors were encountered while processing:
 /tmp/cache/private-chef_11.2.99+20140830193320.git.2.dd76a61-1_amd64.deb

Notice that the install failed due to some permissions issues with dev-vm mounting, but the messages telling me to run upgrade/cleanup were still printed. These should only show up on a successful package install. On Ubuntu 10.04.

@stevendanna
Copy link
Contributor Author

I've reproduced this bug in the following way:

# chattr +ia /opt/opscode/embedded/cookbooks/private-chef/providers/pg_cluster.rb
#  ... 100617 files and directories currently installed.)
Preparing to unpack .../chef-server-core_12.0.8-1_amd64.deb ...
Unpacking chef-server-core (12.0.8-1) over (12.0.8-1) ...
dpkg: error processing archive /vagrant/chef-server-core_12.0.8-1_amd64.deb (--install):
 unable to make backup link of `./opt/opscode/embedded/cookbooks/private-chef/providers/pg_cluster.rb' before installing new version: Operation not permitted
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
chown: changing ownership of ‘/opt/opscode/embedded/cookbooks/private-chef/providers/pg_cluster.rb’: Operation not permitted
You have upgraded Chef Server!

The next step in the upgrade process is to run:

chef-server-ctl upgrade

Then, to remove configuration files, logs, directories,
users, etc. that were used by internal services that
have been removed from this version of Chef Server,
please run:

chef-server-ctl cleanup

(Add the '--no-op' option to see what would be removed by
this command)
Errors were encountered while processing:
 /vagrant/chef-server-core_12.0.8-1_amd64.deb

When an upgrade fails dpkg has complicated rules for which scripts it runs and with what arguments: https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html

My hunch is that the previous copy of the postinst script (the one being upgraded over) is being called with arguments indicating the upgrade failed, but we don't do anything with them.

@stevendanna stevendanna added this to the accepted-minor milestone May 1, 2015
@PrajaktaPurohit PrajaktaPurohit added the Status: Untriaged An issue that has yet to be triaged. label Oct 11, 2019
@PrajaktaPurohit PrajaktaPurohit added Aspect: Packaging Distribution of the projects 'compiled' artifacts. Component: omnibus packaging Size: M Status: Consider for next release Triage: Confirmed Indicates and issue has been confirmed as described. Status: To be prioritized Indicates that product needs to prioritize this issue. Type: Bug Does not work as expected. and removed Status: Untriaged An issue that has yet to be triaged. Status: Consider for next release labels Jul 17, 2020
@stevendanna stevendanna removed this from the accepted-minor milestone Sep 29, 2020
@tas50 tas50 removed the Status: To be prioritized Indicates that product needs to prioritize this issue. label Mar 19, 2021
@tas50 tas50 removed the Size: M label May 12, 2021
@tas50
Copy link
Contributor

tas50 commented Feb 15, 2022

I don't believe we can control how the OS displays post install messages. Closing this one out.

@tas50 tas50 closed this as completed Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aspect: Packaging Distribution of the projects 'compiled' artifacts. Component: omnibus packaging Triage: Confirmed Indicates and issue has been confirmed as described. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

3 participants