Bug 51968 - (ucs500ec2) UCS 5.0-0 EC2 images
(ucs500ec2)
UCS 5.0-0 EC2 images
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: General
UCS 5.0
All other
: P5 normal (vote)
: UCS 5.0
Assigned To: Philipp Hahn
Felix Botner
: interim-7
: 52700 (view as bug list)
Depends on: 51965 52475
Blocks: ucs500meta 51971
  Show dependency treegraph
 
Reported: 2020-09-08 13:01 CEST by Florian Best
Modified: 2022-06-24 12:11 CEST (History)
6 users (show)

See Also:
What kind of report is it?: Release Management
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 Florian Best univentionstaff 2020-09-08 13:01:01 CEST
UCS 5.0-0 EC2 images should be created by using the jenkins job.
QA should check the EC2 Test jenkins job
Comment 1 Philipp Hahn univentionstaff 2021-05-18 15:21:38 CEST

*** This bug has been marked as a duplicate of bug 52700 ***
Comment 2 Florian Best univentionstaff 2021-05-19 09:36:30 CEST
OK: duplicate
Comment 3 Felix Botner univentionstaff 2021-05-19 11:36:38 CEST
This bug is for the final build of the EC2 image.
Comment 4 Felix Botner univentionstaff 2021-05-19 11:36:50 CEST
*** Bug 52700 has been marked as a duplicate of this bug. ***
Comment 5 Philipp Hahn univentionstaff 2021-05-21 06:35:23 CEST
ami-0d5d082c969c147bc

OK: ucr get repository/online/server → https://updates.software-univention.de/
FYI: ucr set repository/online/server='https://updates-test.software-univention.de/'
OK: test/utils/vm-ucs-image-check
OK: systemctl --failed → univention-maintenance.service
OK: reboot
FAIL: systemctl --failed → console-setup.service
FAIL: systemctl --failed → univention-network-common.service
FYI: systemctl status console-setup.service univention-network-common.service
● console-setup.service - Set console font and keymap
   Loaded: loaded (/lib/systemd/system/console-setup.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2021-05-21 05:54:39 CEST; 37min ago
  Process: 290 ExecStart=/lib/console-setup/console-setup.sh (code=exited, status=1/FAILURE)
 Main PID: 290 (code=exited, status=1/FAILURE)

Mai 21 05:54:39 dc0 console-setup.sh[290]: WARNING: Unknown X keysym "dead_belowmacron"
Mai 21 05:54:39 dc0 console-setup.sh[290]: WARNING: Unknown X keysym "dead_belowmacron"
Mai 21 05:54:39 dc0 console-setup.sh[290]: /usr/bin/setupcon: 870: /usr/bin/setupcon: cannot open /tmp/tmpkbd.cbg1nF: No such file
Mai 21 05:54:39 dc0 systemd[1]: console-setup.service: Main process exited, code=exited, status=1/FAILURE
Mai 21 05:54:39 dc0 systemd[1]: console-setup.service: Failed with result 'exit-code'.
Mai 21 05:54:39 dc0 systemd[1]: Failed to start Set console font and keymap.

● univention-network-common.service - Register current IP addresses in LDAP directory
   Loaded: loaded (/lib/systemd/system/univention-network-common.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2021-05-21 05:54:57 CEST; 36min ago
  Process: 1297 ExecStart=/usr/sbin/univention-register-network-address (code=exited, status=1/FAILURE)
 Main PID: 1297 (code=exited, status=1/FAILURE)

Mai 21 05:54:50 dc0 systemd[1]: Starting Register current IP addresses in LDAP directory...
Mai 21 05:54:57 dc0 univention-register-network-address[1297]: INFO: Retry (1/4) in 5 seconds.
Mai 21 05:54:57 dc0 systemd[1]: univention-network-common.service: Main process exited, code=exited, status=1/FAILURE
Mai 21 05:54:57 dc0 systemd[1]: univention-network-common.service: Failed with result 'exit-code'.
Mai 21 05:54:57 dc0 systemd[1]: Failed to start Register current IP addresses in LDAP directory.

OK: systemctl restart console-setup.service

FAIL: systemctl restart univention-network-common.service
FYI: /usr/sbin/univention-register-network-address --verbose
BadRequest: 400 on dc0.phahn.qa (command/ip/change): {'status': 400, 'message': 'The IP address is already in use by host record(s) for: dc0, ucs-sso', 'traceback': None, 'location': 'https://dc0.phahn.qa/univention/command'}
OKAY: → Bug #53252
Comment 7 Felix Botner univentionstaff 2021-05-21 09:35:50 CEST
The name of ami-0d5d082c969c147bc is

Univention Corporate Server (UCS) 5.0 (official image) rev. NAME A REVISION

this can not be the name of the final image, can we change that in ec2? otherwise just re-build with 

Univention Corporate Server (UCS) 5.0 (official image) rev. 1

(i guess)
Comment 8 Philipp Hahn univentionstaff 2021-05-21 09:58:22 CEST
(In reply to Felix Botner from comment #7)
> The name of ami-0d5d082c969c147bc is
> 
> Univention Corporate Server (UCS) 5.0 (official image) rev. NAME A REVISION
> 
> this can not be the name of the final image, can we change that in ec2?
> otherwise just re-build with 
> 
> Univention Corporate Server (UCS) 5.0 (official image) rev. 1
> 
> (i guess)

Go to <https://eu-west-1.console.aws.amazon.com/ec2/v2/home?region=eu-west-1#Images:visibility=private-images;search=ami-0d5d082c969c147bc;sort=name> to "Copy the AMI" - then you can re-name it - no need to re-build
Comment 9 Philipp Hahn univentionstaff 2021-05-21 09:59:37 CEST
(In reply to Philipp Hahn from comment #8)
> Go to
> <https://eu-west-1.console.aws.amazon.com/ec2/v2/home?region=eu-west-
> 1#Images:visibility=private-images;search=ami-0d5d082c969c147bc;sort=name>
> to "Copy the AMI" - then you can re-name it - no need to re-build

after successful QA!

Needs to be copied to the other regions anyway...
Comment 10 Felix Botner univentionstaff 2021-05-21 10:49:46 CEST
sorry i did not know that, rebuild the image  :-( started tests, and do QA with that new image:


"Univention Corporate Server (UCS) 5.0 (official image) rev.1, 
AMI ID: ami-0be22e1965991d8b9"
Comment 11 Felix Botner univentionstaff 2021-05-21 13:15:53 CEST
FAIL partition is not resized during boot (works with the Univention Corporate Server (UCS) 4.4 (official image) rev. 9 ami)

-> df -h
Filesystem      Size  Used Avail Use% Mounted on
udev/xvda1      9.7G  2.8G  6.4G  31% /

-> fdisk -l /dev/xvda 
Disk /dev/xvda: 30 GiB, 32212254720 bytes, 62914560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1228ee5d
Device     Boot Start      End  Sectors Size Id Type
/dev/xvda1 *     2048 20969471 20967424  10G 83 Linux

Is that important?

Seems that cloud-initramfs-growroot (and the patched growroot) is no longer working, see utils/base_appliance.sh::setup_ec2. What worked for me now was modifying /etc/init.d/resize2fs (also a script from us -> setup_ec2)

#!/bin/bash
### BEGIN INIT INFO
# Provides:          resize2fs
# Required-Start:    $local_fs
# Required-Stop:
# Default-Start:     2
# Default-Stop:
# Short-Description: resize filesystem upon boot
### END INIT INFO

+growpart /dev/xvda 1
resize2fs /dev/xvda1 &
+rm $0
disown

OK - https://updates.software-univention.de/ as repo server
OK - all packages up-to-date
OK - setup without online repo
OK - Jenkins Tests
OK - history
OK - no root pw

Name: Univention Corporate Server (UCS) 5.0 (official image) rev.1
AMI ID: ami-0be22e1965991d8b9
Comment 12 Philipp Hahn univentionstaff 2021-05-21 15:28:05 CEST
SPLIT: growfs → Bug #53319
Comment 13 Felix Botner univentionstaff 2021-05-21 15:39:53 CEST
OK
Comment 14 Erik Damrose univentionstaff 2021-05-25 15:19:56 CEST
Univention Corporate Server (UCS) 5.0 (official image) rev.1

us-east-1 ami-0d1f2be821c0d4b61
us-west-1 ami-0105e1dcc81da4c6e
eu-north-1 ami-0494d569d734d5277
ap-northeast-2 ami-0d9b81a165188072c
ap-northeast-1 ami-0ba1e06303b0efdff
sa-east-1 ami-09959190debc25853
ap-southeast-1 ami-0283eb8d69d02d292
ca-central-1 ami-0c8bfa70c797e3421
ap-southeast-2 ami-04128638cbb34b6d8
us-west-2 ami-0ca948b5b8b2a3b19
us-east-2 ami-0237fe8928006b3b7
ap-south-1 ami-0554337c1defc09ac
eu-central-1 ami-02b4c7b926a2c8e4f
eu-west-1 ami-0be22e1965991d8b9
eu-west-2 ami-0ed24eff03bfc2cab
eu-west-3 ami-0675c242aefc969b1
Comment 15 Florian Best univentionstaff 2021-05-25 16:02:40 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".