Skip to content
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

Wrongly generated command line arguments for coreos-installer when using rd.multipath and multipath root disk #21

Closed
vu3oim opened this issue Jun 4, 2022 · 4 comments

Comments

@vu3oim
Copy link

vu3oim commented Jun 4, 2022

In order to enable multipath at first boot of AI discovery image iso, we are trying to to use the aicli's extra_args option.

Following is the command we used to update the host =>
[admin@host ~]$ aicli update host ocphost.aibox.my.net -P extra_args="rd.multipath=default root=/dev/disk/by-label/dm-mpath-root"
Updating Host ocphost.aibox.my.net

Retrieving the values, gives =>
[admin@host ~]$ aicli info host ocphost.aibox.my.net | grep installer_args
installer_args: ["rd.multipath","default","root","/dev/disk/by-label/dm-mpath-root"]

Its splitting that into 4 different array elements.

Now, when we continue with this, the remote host coreos-installer command line arguments are incorrectly formed.

It goes like this =>

[root@ocphost ~]# coreos-installer install --insecure -i /opt/install-dir/master-0d7d1d77-6f44-641a-9611-5190160223cc.ign rd.multipath default root /dev/disk/by-label/dm-mpath-root --append-karg ip=bond0:dhcp --copy-network /dev/sda

coreos-installer exists with an error =>

Journalctl log entries =>

Jun 04 12:19:47 ocphost.aibox.my.net installer[15682]: time="2022-06-04T12:19:47Z" level=info msg="error: Found argument 'default' which wasn't expected, or isn't valid in this context\n\nUSAGE:\n coreos-installer install --ignition-file --insecure\n\nFor more information try --help\n"
Jun 04 12:19:47 ocphost.aibox.my.net installer[15682]: time="2022-06-04T12:19:47Z" level=info msg="failed executing nsenter [--target 1 --cgroup --mount --ipc --pid -- coreos-installer install --insecure -i /opt/install-dir/master-0d7d1d77-6f44-641a-9611-5190160223cc.ign rd.multipath default root /dev/disk/by-label/dm-mpath-root --append-karg ip=bond0:dhcp --copy-network /dev/sda], env vars [PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm container=oci HTTPS_PROXY= OPENSHIFT_BUILD_NAMESPACE=ci-op-fgqbhiwx OPENSHIFT_BUILD_NAME=assisted-installer https_proxy= no_proxy= NO_PROXY= BUILD_LOGLEVEL=0 http_proxy= HTTP_PROXY= HOME=/root HOSTNAME=ocphost.aibox.my.net], error exit status 1, waitStatus 1, Output "error: Found argument 'default' which wasn't expected, or isn't valid in this context\n\nUSAGE:\n coreos-installer install --ignition-file --insecure\n\nFor more information try --help""

Any idea how can this be fixed?

@vu3oim
Copy link
Author

vu3oim commented Jun 4, 2022

Further updates...in case someone is looking for a workaround to this problem.

Since aicli was not working correctly for this use case, we tried instead directly to PATCH the installer-args into the AI Service =>

curl -X 'PATCH' 'http://localhost:8090/api/assisted-install/v2/infra-envs/0e5d8e45-68cb-4e5a-bad2-670eb8aa97be/hosts/997f3531-46ab-e588-f860-473e91c3214b/installer-args' -H 'Content-Type: application/json' -d '{"args": ["--append-karg","rd.multipath=default","--append-karg","root=/dev/disk/by-label/dm-mpath-root"]}'

With this, we are able to get the coreos-installer kargs command line set correctly.

Regards,
Venkat

@karmab
Copy link
Owner

karmab commented Jun 6, 2022

looking at this now

@karmab
Copy link
Owner

karmab commented Jun 6, 2022

this works as expected using the following syntax

aicli update host myhost -P extra_args="--append-karg=rd.multipath=default --append-karg=root=/dev/disk/by-label/dm-mpath-root"

@karmab
Copy link
Owner

karmab commented Jun 6, 2022

this commit 306d60f allows you to alternatively use the following syntax

aicli update host myhost -P extra_args="--append-karg rd.multipath=default --append-karg root=/dev/disk/by-label/dm-mpath-root"

@karmab karmab closed this as completed Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants