AWS AMIs should use LVM for their root device

RESOLVED FIXED

Status

Release Engineering
General Automation
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: rail, Assigned: rail)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

3 years ago
... to make it easier to ephemeral devices to the same volume group and avoid bind mounts.

This will require manage_instance_storage.py to handle this.
(Assignee)

Comment 1

3 years ago
Created attachment 8490759 [details] [diff] [review]
root_on_lvm-cloud-tools-1.diff

Switch to use LVM for / for HVM based AMIs by default.

* use a separate /boot partition (ext2)
* adjust grub.conf accordingly
* volume.detach() needs force=True to be detached from a running instance
* updated AMIs for bld/try (require incoming puppet patch)
Attachment #8490759 - Flags: review?(catlee)
(Assignee)

Comment 2

3 years ago
Created attachment 8490761 [details] [diff] [review]
s3_lvm-puppet.diff

* Simplify manage_instance_storage.py to extend the existing LVM with ephemeral devices
* get rid of lvm-init (we don't install it anymore)
* We don't use LVM on Ubuntu (not yet), no need to have it there
Attachment #8490761 - Flags: review?(catlee)
(Assignee)

Comment 3

3 years ago
I tested the patches on 4 on-demand build slaves (by disabling puppet and replacing manage_instance_storage.py). They worked fine overnight.
(Assignee)

Comment 4

3 years ago
Comment on attachment 8490761 [details] [diff] [review]
s3_lvm-puppet.diff

I think I can simplify it even more.
Attachment #8490761 - Flags: review?(catlee)
(Assignee)

Comment 5

3 years ago
Created attachment 8490796 [details] [diff] [review]
lvm-puppet-1.diff

No need to create/chmod dirs.
Attachment #8490761 - Attachment is obsolete: true
Attachment #8490796 - Flags: review?(catlee)
Comment on attachment 8490759 [details] [diff] [review]
root_on_lvm-cloud-tools-1.diff

Review of attachment 8490759 [details] [diff] [review]:
-----------------------------------------------------------------

::: scripts/aws_create_ami.py
@@ +193,3 @@
>      run('umount %s' % mount_point)
>  
> +    v.detach(force=True)

if we're ignoring errors unmounting, and forcing the volume to detach, maybe we should run 'sync' before detaching?
Attachment #8490759 - Flags: review?(catlee) → review+

Updated

3 years ago
Attachment #8490796 - Flags: review?(catlee) → review+
(Assignee)

Comment 7

3 years ago
(In reply to Chris AtLee [:catlee] from comment #6)
> Comment on attachment 8490759 [details] [diff] [review]
> root_on_lvm-cloud-tools-1.diff
> 
> Review of attachment 8490759 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: scripts/aws_create_ami.py
> @@ +193,3 @@
> >      run('umount %s' % mount_point)
> >  
> > +    v.detach(force=True)
> 
> if we're ignoring errors unmounting, and forcing the volume to detach, maybe
> we should run 'sync' before detaching?

I tried that and it didn't help. :/
(Assignee)

Comment 8

3 years ago
Comment on attachment 8490796 [details] [diff] [review]
lvm-puppet-1.diff

remote:   https://hg.mozilla.org/build/puppet/rev/6bf98f40f762
remote:   https://hg.mozilla.org/build/puppet/rev/36a475993ead
Attachment #8490796 - Flags: checked-in+
(Assignee)

Comment 9

3 years ago
Comment on attachment 8490759 [details] [diff] [review]
root_on_lvm-cloud-tools-1.diff

https://hg.mozilla.org/build/cloud-tools/rev/da847f307007
Attachment #8490759 - Flags: checked-in+
(Assignee)

Updated

3 years ago
Blocks: 1047760
(Assignee)

Updated

3 years ago
Depends on: 1069811
(Assignee)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.