Univention Bugzilla – Full Text Bug Listing |
Summary: | postup.sh is run with outdated version/version | ||
---|---|---|---|
Product: | UCS | Reporter: | Dirk Wiesenthal <wiesenthal> |
Component: | Update - Release updates | Assignee: | Florian Best <best> |
Status: | CLOSED FIXED | QA Contact: | Jürn Brodersen <brodersen> |
Severity: | normal | ||
Priority: | P5 | CC: | best, botner, damrose |
Version: | UCS 4.3 | ||
Target Milestone: | UCS 4.4-5-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
What kind of report is it?: | Development Internal | 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: | |||
Bug Depends on: | |||
Bug Blocks: | 51531, 51623 |
Description
Dirk Wiesenthal
2018-03-02 14:52:19 CET
The UCR variables version/version and version/patchlevel are now set before the execution of postup.sh. The current postup.sh doesn't rely on the old version/version. I didn't add code to revert the UCR variable setting in case of errors, because only the components postup and cleanup code follow this. If one needs to restart the upgrade if something fails in the cleanup code, he can set it manually back, if that even helps. univention-updater (14.0.2-16) c8dbda3dcafd | Bug #46465: call postup.sh after setting version/version univention-updater.yaml 9faa8f960547 | YAML Bug #46465 I tested it with this patch: diff --git a/base/univention-updater/modules/univention/updater/tools.py b/base/univention-updater/modules/univention/updater/tools.py index 68916c84b1..e030aa7853 100644 --- a/base/univention-updater/modules/univention/updater/tools.py +++ b/base/univention-updater/modules/univention/updater/tools.py @@ -1897,6 +1897,7 @@ class UniventionUpdater(object): uri = server.join(path) fd, name = tempfile.mkstemp(suffix='.sh', prefix=phase, dir=tempdir) try: + script = '%s\necho VERSION\nucr get version/version\nucr get version/patchlevel\n%s' % (script.splitlines()[0], script) size = os.write(fd, script) os.chmod(name, 0o744) if size == len(script): Looks good What I tested: Upgrade from 4.4-5 to 5.0-0 -> version/version (timestamp config-registry.replog) is set before postup.sh is run (timestamp updater.log) -> OK Jenkins -> OK YAML -> OK |