Bug 39164 - Errata scope from previous minor release is not disabled
Errata scope from previous minor release is not disabled
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Update - Release updates
UCS 4.3
Other Linux
: P5 normal with 3 votes (vote)
: ---
Assigned To: UCS maintainers
:
: 41171 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-13 09:18 CEST by Felix Botner
Modified: 2021-06-11 10:02 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 3: Will affect average number of 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.137
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2015-08-13 09:18:58 CEST
4.0-0/all/postup.sh deactivates 3.2-4-errata, but we are now at 3.2-6-errata, so there are probably some systems out there with the 3.2-X-errata scope enabled after the 4.0-0 update.
Comment 1 Philipp Hahn univentionstaff 2018-08-15 13:19:14 CEST
The previous errata scope is de-activated in <https://github.com/univention/univention-corporate-server/blob/4.3-0/base/univention-updater/script/postup.sh#L153>:

> # Move to mirror mode for previous errata component
> ucr set \
> 	repository/online/component/4.2-3-errata=false \
> 	repository/online/component/4.2-3-errata/localmirror=true \
> 	repository/online/component/4.3-0-errata=enabled \
> 	repository/online/component/4.3-0-errata/description="Errata updates for UCS 4.3-0" \
> 	repository/online/component/4.3-0-errata/version="4.3" >>"$UPDATER_LOG" 2>&1

At the time UCS-4.3-0 was released UCS-4.2-3 was the last release before that. Afterwards we released the intermediate UCS-4.2-4 but never updates the postup.sh.
So anybody going through 4.2-4 will still have that errata scope activated.

This currently broke the update for Bug #47569, as then an UCS-4.3-x system would have received the update for UCS-4.2-4 while the update for UCS-4.3-1 itself (Bug #Bug #47114) is not yet ready for release due to other bugs not yet verified.

python -i -c '
import re
import sys
from univention.config_registry.frontend import ConfigRegistry, ucr_update

PREFIX = "repository/online/component/%s-%s-errata%s"
RE = re.compile(PREFIX % (r"\d+\.\d+", r"\d+", "$"))

(mmv, plv) = sys.argv[1].split("-", 1)

ucr = ConfigRegistry()
ucr.load()
changes = {}
for key, value in ucr.iteritems():
  if RE.match(key) and ucr.is_true(value=value):
    changes.update({
      key: "false",
      key + "/localmirror": "true",
    })

changes.update({
  PREFIX % (mmv, plv, ""): "enabled",
  PREFIX % (mmv, plv, "/description"): "Errata updates for UCS %s-%s" % (mmv, plv),
  PREFIX % (mmv, plv, "/version"): mmv,
})
print("\n".join(sorted("\t".join(_) for _ in changes.items())))
# ucr_update(ucr, changes)
' '4.3-1'
Comment 2 Erik Damrose univentionstaff 2018-08-24 13:12:26 CEST
Remove milestone 4.3-2, as this has to be fixed in the 4.3-0 postup, or in a future 4.4-0 or 5.0-0 postup
Comment 3 Philipp Hahn univentionstaff 2018-08-28 14:00:51 CEST
*** Bug 41171 has been marked as a duplicate of this bug. ***
Comment 4 Valentin Heidelberger univentionstaff 2018-10-19 16:44:49 CEST
This is especially problematic for customers using a local repository mirror. A customer has several and removed 4.1 from the mirrors before they upgraded the servers from 4.2 to 4.3. The update failed immediately on all of the servers, which had the mirror configured, because they all still had 4.1-5 errata enabled and couldn't find it anymore on the mirror.
Comment 5 Valentin Heidelberger univentionstaff 2018-10-19 16:49:48 CEST
I think this can be set to resolved as long as the section in the postup script of univention-updater is updated to deactivate the last errata component of the former major release on every coming major release: https://github.com/univention/univention-corporate-server/blob/4.3-0/base/univention-updater/script/postup.sh#L153
Comment 6 Valentin Heidelberger univentionstaff 2018-10-19 16:56:57 CEST
(In reply to Valentin Heidelberger from comment #5)
> I think this can be set to resolved as long as the section in the postup
> script of univention-updater is updated to deactivate the last errata
> component of the former major release on every coming major release:
> https://github.com/univention/univention-corporate-server/blob/4.3-0/base/
> univention-updater/script/postup.sh#L153

Well, the section is missing again on 4.3-2 branch. We should add it again or create another mechanism to make sure components of former major releases are disabled in the next major release by default.

-> increased to minor usability because of the scenario described in comment 4
Comment 7 Valentin Heidelberger univentionstaff 2018-10-19 16:58:31 CEST
Moving to 4.3-0 as it still affects 4.2->4.3 upgrades at the moment.
Comment 8 Ingo Steuwer univentionstaff 2021-05-14 15:42:42 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.
Comment 9 Philipp Hahn univentionstaff 2021-06-11 10:02:12 CEST
Since UCS-5 a new repository layout is used, which no longer requires setting UCR variables.