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

ocsinventory-agent DEB package prompts for reconfiguration on upgrade and ends up misconfigured #491

Open
eguaj opened this issue Nov 6, 2024 · 0 comments

Comments

@eguaj
Copy link
Contributor

eguaj commented Nov 6, 2024

General informations

Operating system : Ubuntu 20.04, 22.04, 24.04
Perl version : v5.30.0 (version do not really matter)

OCS Inventory informations

Unix agent version : 2.10.4

Problem's description

When the ocsinventory-agent DEB package is upgraded, either from the CLI (e.g. with apt or apt-get commands) or from the GUI (e.g. with Ubuntu's "Gestionnaire de mises à jour" app), the package asks Do you want to configure the agent, and if the user answer with y, then the original configuration is lost.

The problem is also most present when upgrading from the GUI app, as the prompt is hidden in the "Details" section that needs to be manually unfolded in order to provide an answer. Otherwise, the update will not finish and the package will ends up in iF status (installed / half-configured).

I see that the DEB postinst script (ocsinventory-agent.postinst) do not prompt for reconfiguration (by forcing --nowizard option) when the DEBIAN_FRONTEND env var is set to noninteractive.

However, in my case, when the user performs the upgrade on its own, this condition is not met, so the user gets the prompt, and end up with a misconfigured agent.

Maybe the postinst script could also use a flag on the filesystem (e.g. /etc/ocsinventory-agent/.nowizard) to indicate that the package should never ask for (re)configuration and assume that the configuration is managed externally (e.g. through Ansible, custom shell scripts, etc.) ?

That way, once configured, the administrator could prevent further interactive reconfiguration by touching this .nowizard file ?

Inventory log file ( optional )

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant