[Starlingx-discuss] Fedora Libvirt patch - required to deploy on Fedora 28, probably other non-ubuntu specific
sending in my fedora modifications needed to spin up on Fedora 28, removing the Ubuntu specific items, created on my local tree with git format-patch -1 437353d3b108e7a92c0d5c48c81d334f07940dc3 (the git rev is my specific commit to my local tree) noted the machine='pc-i440fx-xenial' and seclabel pieces are not required in Fedora, also note in the docs Installing Requirements and Dependencies Install the required packages and configure QEMU. This only needs to be done once per host. (NOTE: this script only knows about Ubuntu at this time): $SCRIPTS/install_packages.sh the above breaks permissions on libvirt in Fedora and most likely others rendering it useless we dont use user = "root" group = "root" and obviously, we (IMHO) shouldnt be running it as group root anyway, in Fedora there is a libvirt group 0001-fixup-for-fedora.patch From 437353d3b108e7a92c0d5c48c81d334f07940dc3 Mon Sep 17 00:00:00 2001 From: OutBack Dingo <outbackdingo@gmail.com> Date: Mon, 10 Sep 2018 05:46:58 +0200 Subject: [PATCH] fixup for fedora --- deployment/libvirt/compute.xml | 6 +----- deployment/libvirt/controller.xml | 6 +----- deployment/libvirt/controller_allinone.xml | 6 +----- deployment/libvirt/setup_allinone.sh | 4 ---- 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/deployment/libvirt/compute.xml b/deployment/libvirt/compute.xml index 85474c0..4bdc812 100644 --- a/deployment/libvirt/compute.xml +++ b/deployment/libvirt/compute.xml @@ -7,7 +7,7 @@ <partition>/machine</partition> </resource> <os> - <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type> + <type arch='x86_64'>hvm</type> </os> <features> <acpi/> @@ -108,8 +108,4 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> - <seclabel type='dynamic' model='apparmor' relabel='yes'> - <label>libvirt-608ab5c8-8d11-4bdd-885f-f8b5fee12ff0</label> - <imagelabel>libvirt-608ab5c8-8d11-4bdd-885f-f8b5fee12ff0</imagelabel> - </seclabel> </domain> diff --git a/deployment/libvirt/controller.xml b/deployment/libvirt/controller.xml index e346813..65c4d01 100644 --- a/deployment/libvirt/controller.xml +++ b/deployment/libvirt/controller.xml @@ -7,7 +7,7 @@ <partition>/machine</partition> </resource> <os> - <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type> + <type arch='x86_64'>hvm</type> </os> <features> <acpi/> @@ -122,9 +122,5 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> - <seclabel type='dynamic' model='apparmor' relabel='yes'> - <label>libvirt-6afab2ba-0ed0-45cb-b1bd-985e211a48de</label> - <imagelabel>libvirt-6afab2ba-0ed0-45cb-b1bd-985e211a48de</imagelabel> - </seclabel> </domain> diff --git a/deployment/libvirt/controller_allinone.xml b/deployment/libvirt/controller_allinone.xml index 9249183..83e8fe6 100644 --- a/deployment/libvirt/controller_allinone.xml +++ b/deployment/libvirt/controller_allinone.xml @@ -7,7 +7,7 @@ <partition>/machine</partition> </resource> <os> - <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type> + <type arch='x86_64'>hvm</type> </os> <features> <acpi/> @@ -122,9 +122,5 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> - <seclabel type='dynamic' model='apparmor' relabel='yes'> - <label>libvirt-6afab2ba-0ed0-45cb-b1bd-985e211a48de</label> - <imagelabel>libvirt-6afab2ba-0ed0-45cb-b1bd-985e211a48de</imagelabel> - </seclabel> </domain> diff --git a/deployment/libvirt/setup_allinone.sh b/deployment/libvirt/setup_allinone.sh index b228efc..dcf1607 100755 --- a/deployment/libvirt/setup_allinone.sh +++ b/deployment/libvirt/setup_allinone.sh @@ -28,10 +28,6 @@ fi ISOIMAGE=$(readlink -f "$ISOIMAGE") FILETYPE=$(file --mime-type -b ${ISOIMAGE}) -if ([ "$FILETYPE" != "application/x-iso9660-image" ]); then - echo "$ISOIMAGE is not an application/x-iso9660-image type" - exit -1 -fi BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr} CONTROLLER=${CONTROLLER:-controller-allinone} -- 2.17.1
Hi, Thanks for the patch. I'm also using Fedora for the deployment and I've seen this problems as well as other in the creation of the docker images[0] for building. This part of the building and deployment process is in an early stage of development and thus, there are bugs and lack of functionality on some parts. Like you pointed out, the support for more flavors in hosts for virtual deployments is one of the missing parts and we are happy to receive feedback :) What you think about sending this patch as a review for the stx-tools[1] repository? It would be good to have it landed. Anyway, I have two open questions regarding you patch (not necessary question to you). 1) Is it possible to remove the seclabel from the ubuntu version as well? Having this will block us to have these xml definitions, we would need to "generate" this xml files based on the host that we will use. 2) Why was needed to remove the check for "application/x-iso9660-image"? Thanks again for all your feedback. -Erich [0] https://storyboard.openstack.org/#!/story/2002560 [1] http://git.starlingx.io/cgit/stx-tools From: "scottk@optimcloud.com" <scottk@optimcloud.com> Date: Sunday, September 9, 2018 at 10:57 PM To: "starlingx-discuss@lists.starlingx.io" <starlingx-discuss@lists.starlingx.io> Subject: [Starlingx-discuss] Fedora Libvirt patch - required to deploy on Fedora 28, probably other non-ubuntu specific
September 10, 2018 6:16 AM, "Cordoba Malibran, Erich" <erich.cordoba.malibran@intel.com> wrote:
Hi,
Thanks for the patch. I'm also using Fedora for the deployment and I've seen this problems as well as other in the creation of the docker images[0] for building.
I had 0 issues creating the docker images on fedora 28 that was all pretty straight forward using docker-ce other then some things in the guide from inside the image, after they got fixed up i did get an iso
This part of the building and deployment process is in an early stage of development and thus, there are bugs and lack of functionality on some parts. Like you pointed out, the support for more flavors in hosts for virtual deployments is one of the missing parts and we are happy to receive feedback :)
My thoughts as well but it seems these were the tools used originally for the work, i believe its now they are starting to work slowly towards a more generic structure
What you think about sending this patch as a review for the stx-tools[1] repository? It would be good to have it landed.
Id be happy to even help further, and forward it to the list, but I would prefer to wait for the invite, plus i probably need creds and such setup so i could. Its gone to the mailing list as of now, they also from a prior email have already negated the libvirt iso file check https://github.com/Nossiac/mtk-openwrt-feeds/blob/master/about-mtk-wifi.md it plainly didnt work on my system, as soon as it was removed it moved me forward
Anyway, I have two open questions regarding you patch (not necessary question to you). 1) Is it possible to remove the seclabel from the ubuntu version as well? Having this will block us to have these xml definitions, we would need to "generate" this xml files based on the host that we will use.
Youll see in my patch i also edited the XML defs, across the board i belive they can also be made more generic and still be functional
2) Why was needed to remove the check for "application/x-iso9660-image"?
The call simply errored out on my system under KDE, its a mime-type def also i dont see what it would be required, as we could use gcow2 or raw filesystem images also in the future. I saw it as not needed.
Thanks again for all your feedback.
-Erich
[0] https://storyboard.openstack.org/#!/story/2002560 [1] http://git.starlingx.io/cgit/stx-tools
From: "scottk@optimcloud.com" <scottk@optimcloud.com> Date: Sunday, September 9, 2018 at 10:57 PM To: "starlingx-discuss@lists.starlingx.io" <starlingx-discuss@lists.starlingx.io> Subject: [Starlingx-discuss] Fedora Libvirt patch - required to deploy on Fedora 28, probably other non-ubuntu specific
On Mon, Sep 10, 2018 at 1:03 AM, <scottk@optimcloud.com> wrote:
Id be happy to even help further, and forward it to the list, but I would prefer to wait for the invite, plus i probably need creds and such setup so i could.
Here is your invitation. Some legal theories say that we are unable to contribute your patch from an email to Gerrit because the required declarations are not met with that process. No matter, we want to encourage direct contributions anyway. You need to set up an Ubuntu One account (I know, right?) because that is what OpenStack's Gerrit (which we also use) uses for single sign-on. If you have one already, great! The steps to setting up Gerrit are in the "Account Setup" section of the OpenStack Developer's Guide [0] One thing that StarlingX does do differently than OpenStack is we require a Signed-Off-By footer in the commit messages, which of course git will do for you with 'git commit -s'.
Its gone to the mailing list as of now, they also from a prior email have already negated the libvirt iso file check
https://github.com/Nossiac/mtk-openwrt-feeds/blob/master/about-mtk-wifi.md
As much as I love OpenWRT this doesn't seem to be the link you intended... dt [0] https://docs.openstack.org/infra/manual/developers.html#account-setup -- Dean Troyer dtroyer@gmail.com
September 10, 2018 9:31 AM, "Dean Troyer" <dtroyer@gmail.com> wrote:
On Mon, Sep 10, 2018 at 1:03 AM, <scottk@optimcloud.com> wrote:
Id be happy to even help further, and forward it to the list, but I would prefer to wait for the invite, plus i probably need creds and such setup so i could.
Here is your invitation. Some legal theories say that we are unable to contribute your patch from an email to Gerrit because the required declarations are not met with that process. No matter, we want to encourage direct contributions anyway.
You need to set up an Ubuntu One account (I know, right?) because that
OOOOMG..... my furby just burst into flames.....
is what OpenStack's Gerrit (which we also use) uses for single sign-on. If you have one already, great! The steps to setting up Gerrit are in the "Account Setup" section of the OpenStack Developer's Guide [0]
I probably have a UBONE account from previous work ages ago :)
One thing that StarlingX does do differently than OpenStack is we require a Signed-Off-By footer in the commit messages, which of course git will do for you with 'git commit -s'.
Yupp got it.... same for WRT, and others :)
Its gone to the mailing list as of now, they also from a prior email have already negated the libvirt iso file check
https://github.com/Nossiac/mtk-openwrt-feeds/blob/master/about-mtk-wifi.md
As much as I love OpenWRT this doesn't seem to be the link you intended...
LOL no it wasnt, the link i intended was https://review.openstack.org/600877
dt
[0] https://docs.openstack.org/infra/manual/developers.html#account-setup
--
Dean Troyer dtroyer@gmail.com
On 2018-09-10 02:03 AM, scottk@optimcloud.com wrote:
September 10, 2018 6:16 AM, "Cordoba Malibran, Erich" <erich.cordoba.malibran@intel.com> wrote:
Hi,
Thanks for the patch. I'm also using Fedora for the deployment and I've seen this problems as well as other in the creation of the docker images[0] for building. I had 0 issues creating the docker images on fedora 28 that was all pretty straight forward using docker-ce other then some things in the guide from inside the image, after they got fixed up i did get an iso
This part of the building and deployment process is in an early stage of development and thus, there are bugs and lack of functionality on some parts. Like you pointed out, the support for more flavors in hosts for virtual deployments is one of the missing parts and we are happy to receive feedback :) My thoughts as well but it seems these were the tools used originally for the work, i believe its now they are starting to work slowly towards a more generic structure
What you think about sending this patch as a review for the stx-tools[1] repository? It would be good to have it landed. Id be happy to even help further, and forward it to the list, but I would prefer to wait for the invite, plus i probably need creds and such setup so i could.
Its gone to the mailing list as of now, they also from a prior email have already negated the libvirt iso file check
https://github.com/Nossiac/mtk-openwrt-feeds/blob/master/about-mtk-wifi.md
it plainly didnt work on my system, as soon as it was removed it moved me forward
Anyway, I have two open questions regarding you patch (not necessary question to you). 1) Is it possible to remove the seclabel from the ubuntu version as well? Having this will block us to have these xml definitions, we would need to "generate" this xml files based on the host that we will use. Youll see in my patch i also edited the XML defs, across the board i belive they can also be made more generic and still be functional
2) Why was needed to remove the check for "application/x-iso9660-image"? The call simply errored out on my system under KDE, its a mime-type def also i dont see what it would be required, as we could use gcow2 or raw filesystem images also in the future. I saw it as not needed.
I'd like to understand why it errored on your system. What is the value of $FILETYPE for you? The command line option for variable "ISOIMAGE" is "-i: StarlingX ISO image". And is inserted into xml as: <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='ISO'/> # <=== sed "s;ISO;$ISOIMAGE;" Let's defer changes to the parameter checking until gcow2/raw are considered as options. Or, if you know that those fs types can be inserted into a CDROM, then also rephrase the usage() text and variable "ISOIMAGE". M
Thanks again for all your feedback.
-Erich
[0] https://storyboard.openstack.org/#!/story/2002560 [1] http://git.starlingx.io/cgit/stx-tools
From: "scottk@optimcloud.com" <scottk@optimcloud.com> Date: Sunday, September 9, 2018 at 10:57 PM To: "starlingx-discuss@lists.starlingx.io" <starlingx-discuss@lists.starlingx.io> Subject: [Starlingx-discuss] Fedora Libvirt patch - required to deploy on Fedora 28, probably other non-ubuntu specific
Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
Hi Scott, Please add me to the review when you get it to gerrit. I've made similar changes. I recently touched xml in this commits under review: https://review.openstack.org/#/c/601276/ (deployment: libvirt: remove macs from xml) https://review.openstack.org/#/c/601278/ (deployment: libvirt: remove pci, bus, controllers) https://review.openstack.org/#/c/601279/ (deployment: libvirt: update machine type and model) On 2018-09-09 11:57 PM, scottk@optimcloud.com wrote:
sending in my fedora modifications needed to spin up on Fedora 28, removing the Ubuntu specific items, created on my local tree with git format-patch -1 437353d3b108e7a92c0d5c48c81d334f07940dc3 (the git rev is my specific commit to my local tree)
noted the machine='pc-i440fx-xenial' and seclabel pieces are not required in Fedora, also note in the docs
I recommend being explicit about the hardware models (machine and cpu model), in order to stabilize testing across host machines. I want to suggest using q35 because it is newer. But 'pc-i440fx-xenial' is listed as default in "kvm -M ?"
Installing Requirements and Dependencies Install the required packages and configure QEMU. This only needs to be done once per host. (NOTE: this script only knows about Ubuntu at this time):
$SCRIPTS/install_packages.sh
the above breaks permissions on libvirt in Fedora and most likely others rendering it useless
we dont use user = "root" group = "root"
and obviously, we (IMHO) shouldnt be running it as group root anyway, in Fedora there is a libvirt group 0001-fixup-for-fedora.patch From 437353d3b108e7a92c0d5c48c81d334f07940dc3 Mon Sep 17 00:00:00 2001 From: OutBack Dingo <outbackdingo@gmail.com> Date: Mon, 10 Sep 2018 05:46:58 +0200 Subject: [PATCH] fixup for fedora
--- deployment/libvirt/compute.xml | 6 +----- deployment/libvirt/controller.xml | 6 +----- deployment/libvirt/controller_allinone.xml | 6 +----- deployment/libvirt/setup_allinone.sh | 4 ---- 4 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/deployment/libvirt/compute.xml b/deployment/libvirt/compute.xml index 85474c0..4bdc812 100644 --- a/deployment/libvirt/compute.xml +++ b/deployment/libvirt/compute.xml @@ -7,7 +7,7 @@ <partition>/machine</partition> </resource> <os> - <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type> + <type arch='x86_64'>hvm</type>
I'd want to be explicit with a machine here so that all users run the same emulated hardware.
</os> <features> <acpi/> @@ -108,8 +108,4 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> - <seclabel type='dynamic' model='apparmor' relabel='yes'> - <label>libvirt-608ab5c8-8d11-4bdd-885f-f8b5fee12ff0</label> - <imagelabel>libvirt-608ab5c8-8d11-4bdd-885f-f8b5fee12ff0</imagelabel> - </seclabel>
libvirt will add it back into the DOMAIN xml when the domain is defined, so I agree that one would not want it in the xml template used to define the nodes. M
</domain> diff --git a/deployment/libvirt/controller.xml b/deployment/libvirt/controller.xml index e346813..65c4d01 100644 --- a/deployment/libvirt/controller.xml +++ b/deployment/libvirt/controller.xml @@ -7,7 +7,7 @@ <partition>/machine</partition> </resource> <os> - <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type> + <type arch='x86_64'>hvm</type> </os> <features> <acpi/> @@ -122,9 +122,5 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> - <seclabel type='dynamic' model='apparmor' relabel='yes'> - <label>libvirt-6afab2ba-0ed0-45cb-b1bd-985e211a48de</label> - <imagelabel>libvirt-6afab2ba-0ed0-45cb-b1bd-985e211a48de</imagelabel> - </seclabel> </domain> diff --git a/deployment/libvirt/controller_allinone.xml b/deployment/libvirt/controller_allinone.xml index 9249183..83e8fe6 100644 --- a/deployment/libvirt/controller_allinone.xml +++ b/deployment/libvirt/controller_allinone.xml @@ -7,7 +7,7 @@ <partition>/machine</partition> </resource> <os> - <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type> + <type arch='x86_64'>hvm</type> </os> <features> <acpi/> @@ -122,9 +122,5 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> - <seclabel type='dynamic' model='apparmor' relabel='yes'> - <label>libvirt-6afab2ba-0ed0-45cb-b1bd-985e211a48de</label> - <imagelabel>libvirt-6afab2ba-0ed0-45cb-b1bd-985e211a48de</imagelabel> - </seclabel> </domain> diff --git a/deployment/libvirt/setup_allinone.sh b/deployment/libvirt/setup_allinone.sh index b228efc..dcf1607 100755 --- a/deployment/libvirt/setup_allinone.sh +++ b/deployment/libvirt/setup_allinone.sh @@ -28,10 +28,6 @@ fi ISOIMAGE=$(readlink -f "$ISOIMAGE") FILETYPE=$(file --mime-type -b ${ISOIMAGE}) -if ([ "$FILETYPE" != "application/x-iso9660-image" ]); then - echo "$ISOIMAGE is not an application/x-iso9660-image type" - exit -1 -fi
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr} CONTROLLER=${CONTROLLER:-controller-allinone}
_______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
participants (4)
-
Cordoba Malibran, Erich
-
Dean Troyer
-
Michel Thebeau
-
scottk@optimcloud.com