No active apt sources available after disassociating repository profile
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
Fix Committed
|
Medium
|
Bogdana Vereha | ||
landscape-client (Ubuntu) |
Fix Released
|
Undecided
|
Andreas Hasenack |
Bug Description
There are no active apt sources available in the /etc/apt/
Steps to reproduce:
1) Create repository profile and associate tag to it
$ landscape-api create-
$ landscape-api associate-
$ landscape-api add-pockets-
2) Associate a computer with that repository profile by associating that tag to it (in this example, the test-server tag) (this step will comment all the lines in /etc/apt/
3) Disassociate computer from repository profile (2 ways)
a) We can delete the tag from the computer from the Landscape GUI to remove that tag from ONE computer
b) We can use the "landscape-api disassociate-
Either way, the result will be that the filename of the file in /etc/apt/
I believe the computer should revert back to how it was before the Landscape modification, or at least the user should be warned that this computer will not receive any future updates.
Related branches
- 🤖 Landscape Builder: Approve (test results)
- Alberto Donato: Approve
- Adam Collard (community): Abstain (🚴)
- Данило Шеган (community): Approve
-
Diff: 251 lines (+124/-62)2 files modifiedlandscape/manager/aptsources.py (+24/-23)
landscape/manager/tests/test_aptsources.py (+100/-39)
tags: | added: bug-squad kanban |
Changed in landscape: | |
status: | New → In Progress |
assignee: | nobody → Bogdana Vereha (bogdana) |
importance: | Undecided → Medium |
information type: | Proprietary → Public |
affects: | landscape → landscape-client |
Changed in landscape-client (Ubuntu): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
status: | New → In Progress |
This was fixed by saving the original sources.list file when a repository profile is associated with a computer and restoring it when the profile is removed. Please note that this will only work for computers with newly associated profiles.