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

Warnings on uninstall, package not removed #505

Open
eloquence opened this issue Mar 23, 2020 · 7 comments
Open

Warnings on uninstall, package not removed #505

eloquence opened this issue Mar 23, 2020 · 7 comments

Comments

@eloquence
Copy link
Member

Seeing the following warnings after running securedrop-admin --uninstall, notably:

securedrop-workstation-dom0-config-0.2.3-1.fc25.noarch was supposed to be removed but is not!

Click to expand
Purging Salt config...
Uninstalling Template
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/whitelisted-appmenus.list: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/vm-whitelisted-appmenus.list: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/root.img.part.03: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/root.img.part.02: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/root.img.part.01: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/root.img.part.00: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/netvm-whitelisted-appmenus.list: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/icon.png: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/clean-volatile.img.tar: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/apps.templates: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/apps.tempicons: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster/apps: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/securedrop-workstation-buster: remove failed: No such file or directory
Uninstalling dom0 config package
warning: file /srv/salt/securedrop-login: remove failed: No such file or directory
warning: file /srv/salt/securedrop-launcher.desktop: remove failed: No such file or directory
warning: file /srv/salt/securedrop-handle-upgrade: remove failed: No such file or directory
warning: file /srv/salt/sdlog.conf: remove failed: No such file or directory
warning: file /srv/salt/sd/usb-autoattach/sd-attach-export-device: remove failed: No such file or directory
warning: file /srv/salt/sd/usb-autoattach/99-sd-devices.rules: remove failed: No such file or directory
warning: file /srv/salt/sd/usb-autoattach: remove failed: No such file or directory
warning: file /srv/salt/sd/sys-firewall/sd-copy-rpm-repo-pubkey.sh: remove failed: No such file or directory
warning: file /srv/salt/sd/sys-firewall: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-workstation/securedrop-release-signing-pubkey.asc: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-workstation/apt-test-pubkey.asc: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-workstation: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-whonix/app-journalist.yaml: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-whonix: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-proxy/sd-proxy.yaml: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-proxy/mimeapps.list: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-proxy/logo-small.png: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-proxy/do-not-open.desktop: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-proxy/do-not-open-here: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-proxy: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-journalist: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-app/config.json.j2: remove failed: No such file or directory
warning: file /srv/salt/sd/sd-app: remove failed: No such file or directory
warning: file /srv/salt/sd-workstation.top: remove failed: No such file or directory
warning: file /srv/salt/sd-workstation-template.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-workstation-template-files.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-whonix.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-whonix-hidserv-key.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-viewer.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-viewer-files.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-usb-autoattach-remove.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-usb-autoattach-add.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-upgrade-templates.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-sys-whonix-vms.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-sys-vms.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-sys-firewall-files.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-rsyslog.conf.j2: remove failed: No such file or directory
warning: file /srv/salt/sd-remove-unused-templates.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-proxy.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-proxy-template-files.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-logging-setup.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-log.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-gpg.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-gpg-files.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-dom0-systemd.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-dom0-qvm-rpc.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-dom0-files.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-dom0-crontab.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-devices.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-devices-files.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-default-config.yml: remove failed: No such file or directory
warning: file /srv/salt/sd-default-config.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-clean-whonix.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-clean-default-dispvm.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-clean-all.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-app.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-app-files.sls: remove failed: No such file or directory
warning: file /srv/salt/sd-app-config.sls: remove failed: No such file or directory
warning: file /srv/salt/sd: remove failed: No such file or directory
warning: file /srv/salt/launcher/sdw_util/Util.py: remove failed: No such file or directory
warning: file /srv/salt/launcher/sdw_util: remove failed: No such file or directory
warning: file /srv/salt/launcher/sdw_updater_gui/strings.py: remove failed: No such file or directory
warning: file /srv/salt/launcher/sdw_updater_gui/UpdaterAppUi.py: remove failed: No such file or directory
warning: file /srv/salt/launcher/sdw_updater_gui/UpdaterApp.py: remove failed: No such file or directory
warning: file /srv/salt/launcher/sdw_updater_gui/Updater.py: remove failed: No such file or directory
warning: file /srv/salt/launcher/sdw_updater_gui: remove failed: No such file or directory
warning: file /srv/salt/launcher/sdw_notify/Notify.py: remove failed: No such file or directory
warning: file /srv/salt/launcher/sdw_notify: remove failed: No such file or directory
warning: file /srv/salt/launcher/sdw-notify.py: remove failed: No such file or directory
warning: file /srv/salt/launcher/sdw-launcher.py: remove failed: No such file or directory
warning: file /srv/salt/launcher: remove failed: No such file or directory
warning: file /srv/salt/fpf-apt-test-repo.sls: remove failed: No such file or directory
securedrop-workstation-dom0-config-0.2.3-1.fc25.noarch was supposed to be removed but is not!
Instance secrets (Journalist Interface token and Submission private key) are stillpresent on disk. You can delete them in /usr/share/securedrop-workstation-dom0-config
@eloquence eloquence added the bug label Mar 23, 2020
@emkll
Copy link
Contributor

emkll commented Mar 23, 2020

That error is unfortunately expected, due to the dual-provisioning (make all and dom0 rpm approaches): clean-salt must be called, which removes rpm-provisioned files [1] . Maintaining specific rules per-file to avoid these warnings might be difficult, unless we we modify make all logic to use RPMs

[1] https://github.com/freedomofpress/securedrop-workstation/blob/master/scripts/securedrop-admin.py#L103-L111

@eloquence
Copy link
Member Author

I'm confused, is the --uninstall command expected to successfully remove the dom0 config package? Currently I am unable to remove it either manually or with the --uninstall command (I misread the earlier command output, it fails with the same "was supposed to be removed but is not").

@eloquence
Copy link
Member Author

eloquence commented Mar 23, 2020

It looks like the package was removed in spite of the error, but still in the cache. After yum clean all subsequent dnf runs no longer find it. Is that also expected behavior? If so, should securedrop-admin run yum clean all or a similar command to clean the cache?

@eloquence eloquence added this to Near Term - SD Workstation in SecureDrop Team Board Mar 26, 2020
@eloquence eloquence moved this from Near Term - SD Workstation to Nominated for next sprint in SecureDrop Team Board Apr 1, 2020
@eloquence eloquence moved this from Nominated for next sprint to Near Term - SD Workstation in SecureDrop Team Board Apr 2, 2020
@emkll
Copy link
Contributor

emkll commented Apr 8, 2020

I think i've observed a similar or related issue to this: the dom0 package would not be completely removed after running securedrop-admin --uninstall, and reinstalling the package locally would say "nothing to do". In that situation, the files in /srv/salt/ were not provisioned.

In order to force a reinstall, we had to dnf reinstall package.rpm, that correctly provisioned the files in place.

While debugging, it appears that the local dnf cache and the dnf cache used by qubes-dom0-update is different: if the package was installed from the yum repo or installed locally seems to affect this: we may need to qubes-dom0-update --action=remove and yum remove the package, as well as clearing the cache to ensure all metadata of the package is removed.

@conorsch
Copy link
Contributor

Encountered this again during QA (#571). Approximate steps I performed were:

  1. On staging Qubes env, ran securedrop-admin --uninstall
  2. Observed "was supposed to be removed but is not" message documented above
  3. sudo dnf remove securedrop-workstation-dom0-config repeats the message reliably
  4. sudo dnf info securedrop-workstation-dom0-config reports the package as installed
  5. securedrop-admin --uninstall fails, because securedrop-admin can't be found, because the package isn't installed
  6. sudo dnf install <local_rpm_of_securedrop-workstation-dom0-config> falied, reporting that the package was already installed

The solution for me was to run sudo dnf clean all, which straightened everything out. Then sudo dnf install <local_rpm_of_securedrop-workstation-dom0-config> worked, as did securedrop-admin --apply.

@conorsch
Copy link
Contributor

conorsch commented Jul 9, 2020

Encountered a similar problem, working on #579 The steps I took before encountering the error were:

  1. Boot test-only hardware running "staging" environment
  2. Run dnf info qubes-template-securedrop-workstation-buster in dom0, observe "Release" 202002142107
  3. Run securedrop-admin --uninstall to remove everything, including that template package
  4. Reboot
  5. Run sudo dnf clean all as documented above, to be sure everything was gone
  6. Reboot again! (doesn't hurt to be sure)
  7. Reinstall staging environment from newest RPM
  8. Post-install, run dnf info qubes-template-securedrop-workstation-buster, where I saw the outdated 202002142107 version again.

I expected to see the new 202007062239 version of the template installed, but for some reason the old version is still being pulled in. (It's still hosted on yum-test.securedrop.org). I'm confident that a clean install of Qubes OS would yield the latest template, but i'd prefer to resolve the caching issue before going that route, even though this is test-only hardware.
``

@eloquence eloquence changed the title [0.2.3-rpm] Warnings on uninstall, package not removed Warnings on uninstall, package not removed Jul 16, 2020
@zenmonkeykstop
Copy link
Contributor

Hit a similar error, dnf was failing to remove the old qubes-template-securedrop-workstation-buster package, as part of the process involved removing the securedrop-workstation buster VM, which was no longer present on the system. dnf clean all did not help. Creating a generic sacrificial debian-10 VM called securedrop-workstation-buster unstuck the removal process.

@eloquence eloquence moved this from Near Term - SD Workstation to Next sprint candidates in SecureDrop Team Board Jul 21, 2020
@eloquence eloquence moved this from Next sprint candidates to Near Term - SD Workstation in SecureDrop Team Board Jul 23, 2020
@eloquence eloquence moved this from Near Term - SD Workstation to Next sprint candidates in SecureDrop Team Board Aug 3, 2020
@eloquence eloquence moved this from Next sprint candidates to Near Term - SD Workstation in SecureDrop Team Board Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
SecureDrop Team Board
Near Term - SD Workstation
Development

No branches or pull requests

4 participants