Bug 48029 - Don't change local host's repository if univention-repository-create hasn't finished successfully
Don't change local host's repository if univention-repository-create hasn't f...
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Update - Repository administration
UCS 4.3
Other Linux
: P5 normal with 2 votes (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-19 18:13 CEST by Valentin Heidelberger
Modified: 2021-05-14 16:34 CEST (History)
0 users

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Heidelberger univentionstaff 2018-10-19 18:13:16 CEST
Not sure if I chose the right component, feel free to move!

If univention-repository-create is started and stops before it's finished setting up the repo, it breaks apt-get at least in some cases (e.g. user forgets to insert CD) by changing the local host's repo server too early.

To reproduce:
- Don't insert UCS DVD
- Execute univention-repository-create
- Press Enter when it asks if a CD was inserted, even though it wasn't
- univention-repository-create exits
- repository/online/server is already changed and apt-get update is broken

I think univention-repository-create shouldn't change repository/online/server unless it has finished without errors.

Finished unsuccessfully:
-----
Please insert a UCS installation medium and press <Enter>
 Mounting /media/cdrom ... done.
Checking medium in /media/cdrom ... failed.
Error: This is not an UCS installation medium.
Error: Failed to mount CD-ROM device at /media/cdrom
root@master:~# grep 'repository/online/server' /var/log/univention/config-registry.replog 
2018-10-19 18:09:41: set repository/online/server=master.ucs.demo old:https://updates.software-univention.de/
-----


It only puts out information about having changed the local host to use the local repository if it finished successfully:
-----
The local repository has been created.

The local host has been modified to use this local repository.  Other hosts
must be re-configured by setting the Univention Configuration Registry (UCR)
variable 'repository/online/server' to the FQDN of this host.

  ucr set repository/online/server="master.ucs.demo"
-----
Comment 1 Ingo Steuwer univentionstaff 2021-05-14 15:41:45 CEST
This issue has been filed against UCS 4.3.

UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.