microsoft / omi

Open Management Infrastructure
Other
367 stars 116 forks source link

omiusers group not deleted on Ubuntu 16.10 #312

Closed lagalbra closed 7 years ago

lagalbra commented 7 years ago

During OMSAgent for Linux bundle --purge (omi version 1.2.0.35), the omiusers group is not removed. @jeffaco believes this is an OMI issue in postremove.

----- Removing package: omsagent -----
(Reading database ... 71574 files and directories currently installed.)
Removing omsagent (1.3.4.127) ...
Unconfiguring OMS agent (systemd) service ...
Removed /etc/systemd/system/multi-user.target.wants/omsagent-08d4b0c0-7fac-4159-987c-000271282eff.service.
Unconfiguring OMS agent (systemd) service ...
Removed /etc/systemd/system/multi-user.target.wants/omsagent-368a6f2a-1d36-4899-9415-20f44a5acd5d.service.
Warning: Specified workspace scom does not exist on the machine. Check the correctness of the workspace ID and that onboarding succeeded.
Deleting certs and conf directories for workspace 08d4b0c0-7fac-4159-987c-000271282eff if empty...
Deleting certs and conf directories for workspace 368a6f2a-1d36-4899-9415-20f44a5acd5d if empty...
Deleting nxautomation service account ...
Deleting omsagent service account ...
Purging configuration files for omsagent (1.3.4.127) ...
dpkg: warning: while removing omsagent, directory '/etc/opt/microsoft/omsagent' not empty so not removed
Removing cross-platform agent(s) ...
----- Removing package: scx -----
(Reading database ... 63791 files and directories currently installed.)
Removing scx (1.6.3.212) ...
Purging configuration files for scx (1.6.3.212) ...
dpkg: warning: while removing scx, directory '/var/opt/microsoft/scx/log' not empty so not removed
----- Removing package: omi -----
(Reading database ... 63756 files and directories currently installed.)
Removing omi (1.2.0.35) ...
Unconfiguring omid (systemd) service ...
Removed /etc/systemd/system/multi-user.target.wants/omid.service.
Deleting omiusers group ...
groupdel: cannot remove the primary group of user 'omsagent'
Purging configuration files for omi (1.2.0.35) ...

I'm aware that Ubuntu 16.10 is not currently part of our test matrix, but this is still a small improvement that could be made, allowing OMSAgent for Linux to work cleanly on Ubuntu 16.10.

paulcallen commented 7 years ago

OMS is not disassociating this group from any OMS users before uninstalling OMI so we failed. This is by design.