Bug 31426 - univention-repository-update overwrites repository/mirror/server
univention-repository-update overwrites repository/mirror/server
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - Repository administration
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.1-1-errata
Assigned To: Philipp Hahn
Erik Damrose
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-23 10:10 CEST by Janis Meybohm
Modified: 2013-08-28 13:41 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
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 Janis Meybohm univentionstaff 2013-05-23 10:10:47 CEST
UCS 3.1-1

I have crated a local repository on an UCS DC-Master via:

 univention-repository-create -i /tmp/UCS_3.1-1-amd64.iso

After that, I followed the shown instructions to create and bind policies for ucr (secure apt) and repository:

udm policies/repositoryserver create
  --position "cn=repository,cn=update,cn=policies,dc=s4lish,dc=qa"
  --set name="master repository"
  --set repositoryServer="master.s4lish.qa"

udm policies/registry create
  --position "cn=config-registry,cn=policies,dc=s4lish,dc=qa"
  --set name="global settings"
  --set registry="update/secure no"

udm container/dc modify
  --dn "dc=s4lish,dc=qa"
  --policy-reference "cn=global settings,cn=config-registry,cn=policies,dc=s4lish,dc=qa"
  --policy-reference "cn=master repository,cn=repository,cn=update,cn=policies,dc=s4lish,dc=qa"



Next, "univention-repository-update net" should be called.
The first run failed because of a problem with the ucc component repository server, so I disabled localmirror for that component (repository/online/component/ucc_20130218/localmirror: false).
Next run of "univention-repository-update net" showed an error to me:

Error: The local server is configured as mirror source server (repository/mirror/server)


Indeed, repository/mirror/server was set to $(hostname -f) - don't know why. I changed that (ucr set repository/mirror/server=univention-repository.knut.univention.de) and restartet "univention-repository-update net". After that was finished, repository/mirror/server was reset to $(hostname -f). It looks like every call of "univention-repository-update net" resets this variable which I think is not intended in any case...
Comment 1 Philipp Hahn univentionstaff 2013-07-11 08:41:34 CEST
(In reply to Janis Meybohm from comment #0)
> udm policies/repositoryserver create
...
>   --set repositoryServer="master.s4lish.qa"
...
> udm container/dc modify
>   --dn "dc=s4lish,dc=qa"
...
>   --policy-reference "cn=master repository,cn=repository,cn=update,cn=policies,dc=s4lish,dc=qa"

> Indeed, repository/mirror/server was set to $(hostname -f) - don't know why.

Because the policy created above forces that!

The code was changed to no longer set repo/mirror/server=$self on the the local repo server itself.

3.2: svn42278, univention-updater_9.0.4-2.1185.201307110813
ChangeLog-3.2: svn42279
\item On a local repository server a repository policy no longer sets the source server to itself (\ucsBug{31426}).

3.1-1: svn42280, univention-updater_8.0.78-6.1186.201307110827
2013-07-10-univention-updater.yaml svn42282
Comment 2 Philipp Hahn univentionstaff 2013-07-11 08:57:57 CEST
3.2: svn42284, univention-updater_9.0.4-3.1187.201307110851

3.1: svn42285, 8.0.78-7.1188.201307110854
2013-07-10-univention-updater.yaml svn42287
Comment 3 Erik Damrose univentionstaff 2013-08-21 13:36:53 CEST
Problem could be reproduced.

Test uupdate to errata version: not applicable, the wrong entries have to be changed manually to enable updating. -> OK

With 3.1-errata and 3.2: A local repository server does not set its hostname as repository/mirror/server: OK 

YAML: Minor fixes in capitalization: OK
Changelog 3.2: OK

-> Verified
Comment 4 Moritz Muehlenhoff univentionstaff 2013-08-28 13:41:36 CEST
http://errata.univention.de/ucs/3.1/172.html