[3.x][feature-request] To support the Ubuntu Pro enabling

Bug #2064557 reported by Laider Lai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Image
New
Wishlist
Unassigned

Bug Description

Customers may need to build an Ubuntu image which is enabled with the Ubuntu Pro by default.
However, Ubuntu Image 3.x does not yet support to do this.

Even though we try to call a script by manual execution function for enabling Ubuntu Pro by some "pro" commands.
But the "pro" command requires some resources from /dev which does not conform under the manual stage.
For example, "pro" command complains "No such file or directory: '/proc/cpuinfo | meminfo | mounts'"
and failed to "systemctl start ua-timer.timer"

Does Ubuntu image 3.x support to enable Ubuntu Pro under a suitable stage? Tks.

Paul Mars (upils)
Changed in ubuntu-image:
importance: Undecided → Wishlist
Revision history for this message
Laider Lai (laiderlai) wrote (last edit ):

Currently, we handle a post-script to enable Ubuntu Pro after the ubuntu-image is finished to output the target image.

In post-script, it mounts some resources from the host, then chroot to call "proc" commands for enabling.

1. mount --bind /dev dev/
2. mount --bind /proc proc/
3. chroot . /bin/sh -c "pro --debug attach --no-auto-enable ${PRO_TOKEN}"
4. chroot . /bin/sh -c "pro --debug enable --assume-yes ${FUNCTION}"
5. chroot . /bin/sh -c "pro --debug detach --assume-yes"
6. umount proc/
7. umount dev/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.