Bug 1629853 - Cannot create database in appliance_console in ec2 env with newer instance types(t3,c5,c5d,m5d)
Summary: Cannot create database in appliance_console in ec2 env with newer instance ty...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: GA
: 5.11.2
Assignee: Nick Carboni
QA Contact: Matouš Mojžíš
URL:
Whiteboard: ec2:appliance:console
Depends On: 1746011
Blocks: 1728403
TreeView+ depends on / blocked
 
Reported: 2018-09-17 13:50 UTC by Matouš Mojžíš
Modified: 2020-02-13 16:23 UTC (History)
10 users (show)

Fixed In Version: 5.11.0.8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1728403 (view as bug list)
Environment:
Last Closed: 2020-02-13 16:23:08 UTC
Category: ---
Cloudforms Team: AWS
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
different disk naming (24.33 KB, image/png)
2018-09-17 13:50 UTC, Matouš Mojžíš
no flags Details
database creation error (6.24 KB, image/png)
2018-09-17 13:50 UTC, Matouš Mojžíš
no flags Details
console log + lsblk (56.14 KB, image/png)
2018-10-05 13:23 UTC, Matouš Mojžíš
no flags Details

Description Matouš Mojžíš 2018-09-17 13:50:20 UTC
Created attachment 1484044 [details]
different disk naming

Description of problem:


Version-Release number of selected component (if applicable):
5.10.0.15

How reproducible:
Always

Steps to Reproduce:
1. Boot appliance instance in ec2 env with newer instance types(t3,c5,c5d,m5d)
2. Try to create internal database
3.

Actual results:
Internal database cannot be created because volume partitions have different naming than older instances and appliance_console cannot find these partitions.

Expected results:


Additional info:

Comment 2 Matouš Mojžíš 2018-09-17 13:50:39 UTC
Created attachment 1484045 [details]
database creation error

Comment 3 Nick Carboni 2018-09-17 14:50:15 UTC
Could you elaborate on, or link to some documentation about, the differences in partitions or device naming that you think might be causing this issue?

It looks like the paths we search for attached devices are these:

'/dev/[vhs]d[a-z]', '/dev/xvd[a-z]'

That expands to the following formats: vd*, hd*, sd*, xvd*

This is defined here: https://github.com/ManageIQ/linux_admin/blob/master/lib/linux_admin/disk.rb#L12

If you can either provide an environment where this issue exists or explain the new format, then a fix should be fairly straight forward.

Comment 4 Nick Carboni 2018-09-17 14:52:55 UTC
Ah, I just saw the other attachment it looks like the devices are named using the pattern `nvme[1-9]n1` maybe? Some documentation about this naming scheme would still be helpful.

Comment 5 Matouš Mojžíš 2018-09-18 10:40:44 UTC
Nick,

there is documentation for device naming in AWS: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html

Comment 6 Nick Carboni 2018-09-26 22:04:55 UTC
I don't have the environment to reproduce this so could you check if something like `lsblk -d -oNAME -n` would detect these?

Maybe we can move to that as a more generic solution rather than pre-defined file names in /dev.

Comment 8 Nick Carboni 2018-09-27 14:59:10 UTC
Matouš,

I created a patch that should fix this, can you test this out on one of the problematic instances?

https://patch-diff.githubusercontent.com/raw/ManageIQ/linux_admin/pull/203.patch

Comment 9 CFME Bot 2018-09-27 15:10:11 UTC
New commit detected on ManageIQ/linux_admin/master:

https://github.com/ManageIQ/linux_admin/commit/eaff9fccfb16dd111a4bbf45d561a1afd09ad9c4
commit eaff9fccfb16dd111a4bbf45d561a1afd09ad9c4
Author:     Nick Carboni <ncarboni>
AuthorDate: Thu Sep 27 10:25:17 2018 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Thu Sep 27 10:25:17 2018 -0400

    Use lsblk to detect local disks

    This will remove the need to track all the different disk
    naming schemes using a regex.

    Specifically it will allow us to find nvme devices which are used
    in some AWS instance types

    https://bugzilla.redhat.com/show_bug.cgi?id=1629853

 lib/linux_admin/disk.rb | 3 +-
 spec/disk_spec.rb | 6 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

Comment 10 CFME Bot 2018-09-28 19:43:42 UTC
New commit detected on ManageIQ/manageiq-appliance_console/master:

https://github.com/ManageIQ/manageiq-appliance_console/commit/205e712f6eda97a50f4baf2eac740a1a84c7450b
commit 205e712f6eda97a50f4baf2eac740a1a84c7450b
Author:     Nick Carboni <ncarboni>
AuthorDate: Fri Sep 28 15:38:41 2018 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Fri Sep 28 15:38:41 2018 -0400

    Update the minimum linux_admin version

    This will include the fix for detecting disk devices for use when
    creating the local database

    https://bugzilla.redhat.com/show_bug.cgi?id=1629853

 manageiq-appliance_console.gemspec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 11 Matouš Mojžíš 2018-10-05 13:23:25 UTC
Nick,

I tried the patch, but it parses volumes incorrectly as it tells pvcreate to use different disk than the one which exists.
Screenshot attached.

Comment 12 Matouš Mojžíš 2018-10-05 13:23:51 UTC
Created attachment 1490844 [details]
console log + lsblk

Comment 15 CFME Bot 2019-05-14 20:50:14 UTC
New commit detected on ManageIQ/linux_admin/master:

https://github.com/ManageIQ/linux_admin/commit/ec2ba4a0d56a58d35377fb6cf78ff7e37030ad00
commit ec2ba4a0d56a58d35377fb6cf78ff7e37030ad00
Author:     Nick Carboni <ncarboni>
AuthorDate: Fri May 10 15:00:10 2019 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Fri May 10 15:00:10 2019 -0400

    Support nvme device partition naming

    This commit collects the disk model from the parted output
    and uses that to change how we construct the partition path.

    Right now we keep the previous behavior of <device_path><partition_id>
    in all cases except nvme when we use <device_path>p<partition_id>.
    Previously, we would list a path which didn't exist for nvme devices.

    https://bugzilla.redhat.com/show_bug.cgi?id=1629853

 lib/linux_admin/disk.rb | 20 +-
 lib/linux_admin/partition.rb | 2 +-
 spec/disk_spec.rb | 135 +-
 3 files changed, 117 insertions(+), 40 deletions(-)

Comment 17 CFME Bot 2019-05-14 21:27:33 UTC
New commit detected on ManageIQ/manageiq-appliance_console/master:

https://github.com/ManageIQ/manageiq-appliance_console/commit/b7cb2f9f0962a7d7f2306de396b5814d12794a01
commit b7cb2f9f0962a7d7f2306de396b5814d12794a01
Author:     Nick Carboni <ncarboni>
AuthorDate: Tue May 14 17:06:19 2019 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Tue May 14 17:06:19 2019 -0400

    Pull in version 1.2.3 of linux admin for nvme device fix

    https://bugzilla.redhat.com/show_bug.cgi?id=1629853

 manageiq-appliance_console.gemspec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 19 CFME Bot 2019-06-10 21:01:13 UTC
New commit detected on ManageIQ/manageiq-appliance/master:

https://github.com/ManageIQ/manageiq-appliance/commit/75ce77ffa125ab85aa493def3a6804eddd46968a
commit 75ce77ffa125ab85aa493def3a6804eddd46968a
Author:     Nick Carboni <ncarboni>
AuthorDate: Mon Jun 10 16:20:29 2019 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Mon Jun 10 16:20:29 2019 -0400

    Bump console version to 5.0.0

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1629853
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1670150

 manageiq-appliance-dependencies.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 23 Matouš Mojžíš 2019-07-10 12:50:22 UTC
Closing because it cannot be verified as we don't support EC2 images in 5.11.

Comment 24 Sudhir Mallamprabhakara 2019-08-20 03:28:51 UTC
reverting back to ON_QA for re-validation due to https://bugzilla.redhat.com/show_bug.cgi?id=1671909

Comment 25 Matouš Mojžíš 2020-01-28 10:43:07 UTC
Verified in 5.11.2.0. Database can be created in appliance_console in EC2 instance with instance types like c5d. Appliance_console parses nvme drives correctly.


Note You need to log in before you can comment on or make changes to this bug.