-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test-Layout s390x #483
Test-Layout s390x #483
Conversation
…ate the layout feature to existing encrypted root partition function. Updated the Documentation updated email address
…ate the layout feature to existing encrypted root partition function. Updated the Documentation
… accomodate the layout feature to existing encrypted root partition function. Updated the Documentation" This reverts commit a054be9. reverts
…mmit and accomodate the layout feature to existing encrypted root partition function. Updated the Documentation"" This reverts commit c3c1000. reverting - test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@travier , I am finding difficulty in co-operating statement with s390x layout with eckd and zfcp disk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey firstly thank you so much for working on this. Could we get a issue link as well attached to your commit.
I took a quick look over the PR and I have a few comments, I will have to revisit this once your commits are cleaned up and are easier to follow. Please be sure to include a issue link as well to help my understanding of these changes.
Notably I noticed your commit messages were a bit lengthy and duplicated. It would help me quite a bit if you could do some fixup commits to your changes so that your commits are more appropriate for the changes they entail and not duplicated.
Additionally I did notice your CI is failing on quite a few things that will need to be looked at.
|
||
switch { | ||
case wantMBR && len(sd) != 0: | ||
luksDevice = sd + strconv.Itoa(2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get a comment explaining the luks device value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also why strconv.Itoa()? and not "2" and is there a better way so there is not string magic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add the comment explaining the luks device value..
Also why strconv.Itoa()? and not "2" and is there a better way so there is not string magic?
Yes will add, sd + "2"
@@ -32,6 +32,7 @@ type BootDevice struct { | |||
|
|||
type BootDeviceLuks struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll create a new PR with less clutter on spaces and new line. This PR was not supposed to raised, As i need some assistance is some of the logic in coding which i am not able to meet. I'll work upon.
config/fcos/v1_6_exp/translate.go
Outdated
return r | ||
|
||
if wantLuksDevice && wantLuks { | ||
panic("can't happen") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a very useful panic. Lets add more detail on why this can't happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove and add another logic to check.
config/fcos/v1_6_exp/translate.go
Outdated
@@ -144,11 +143,11 @@ func (c Config) processBootDevice(config *types.Config, ts *translate.Translatio | |||
wantEFIPart = true | |||
case *layout == "ppc64le": | |||
wantPRePPart = true | |||
case *layout == "s390x-zfcp": | |||
case *layout == "s390x-zfcp" && wantLuksDevice: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What makes is "&& wantLuksDevice" relevant to the layout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention is as per the design validation in github issue #453 (comment) by Benjamin. The concern is Sometimes user forgot to provide the device like dasda or sd in luks.device and tend to use the label. For that purpose i made a condition. So that User must provide the device corresponding to the layout.
I'll re-write with another logic as if the wantLuksDevice could not found it panics and crashes rather than just giving an error message like device is must for s390x layouts.
config/fcos/v1_6_exp/translate.go
Outdated
wantMBR = true | ||
case *layout == "s390x-eckd": | ||
case *layout == "s390x-eckd" && wantLuksDevice: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
} | ||
// luksDevice := "/dev/disk/by-partlabel/root" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented out code is a no no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove the commented out code.
} | ||
|
||
// create root filesystem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove the extra line.
config/fcos/v1_6_exp/translate.go
Outdated
@@ -326,9 +299,6 @@ func (c Config) processBootDevice(config *types.Config, ts *translate.Translatio | |||
case wantMirror: | |||
// RAID without LUKS | |||
rootDevice = "/dev/md/md-root" | |||
case wantLuksDevice: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we added a case and then removed it. This makes reviewing this a bit confusing, this change should have been amended to the originating commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make sure that i create a new branch with PR and update without any re-write on existing code.
@@ -198,7 +198,7 @@ The Fedora CoreOS configuration is a YAML document conforming to the following s | |||
* **_should_exist_** (boolean): whether or not the group with the specified `name` should exist. If omitted, it defaults to true. If false, then Ignition will delete the specified group. | |||
* **_system_** (boolean): whether or not the group should be a system group. This only has an effect if the group doesn't exist yet. | |||
* **_boot_device_** (object): describes the desired boot device configuration. At least one of `luks` or `mirror` must be specified. | |||
* **_layout_** (string): the disk layout of the target OS image. Supported values are `aarch64`, `ppc64le`, and `x86_64`. Defaults to `x86_64`. | |||
* **_layout_** (string): the disk layout of the target OS image. Supported values are `aarch64`, `ppc64le`, `s390x-zfcp`, `s390x-eckd`, `s390x-virt` and `x86_64`. Defaults to `x86_64`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"aarch64, ppc64le, and x86_64"
ie : "aarch64, ppc64le,s390x-eckd, s390x-virt, s390x-zfcp, and x86_64. Defaults to x86_64".
I think these were alphabetical lets keep it that way :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update that.
* **_luks_** (object): describes the clevis configuration for encrypting the root filesystem. | ||
* **_tang_** (list of objects): describes a tang server. Every server must have a unique `url`. | ||
* **url** (string): url of the tang server. | ||
* **thumbprint** (string): thumbprint of a trusted signing key. | ||
* **_advertisement_** (string): the advertisement JSON. If not specified, the advertisement is fetched from the tang server during provisioning. | ||
* **_tpm2_** (boolean): whether or not to use a tpm2 device. | ||
* **device** (string): Specifically for s390x `eckd` and `zfcp` disk without `mirror`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If "device" is specifically for s390x maybe we can name it more explicitly rather then "device"? wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about luks.device-s390x
?
See: #453