[Ovirt-devel] [PATCH ovirt-node] run storage config script under different selinux context

Darryl Pierce dpierce at redhat.com
Thu Nov 20 20:24:47 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alan Pevec wrote:
> REPOST with fixed ovirt-firstboot
> ovirt-config-storage needs to access libvirt,
> and initscripts run in initrc_t which can't access libvirtd socket
> ---
>  scripts/ovirt-config-setup |    4 +++-
>  scripts/ovirt-firstboot    |    2 +-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/ovirt-config-setup b/scripts/ovirt-config-setup
> index 8408d14..0f53100 100755
> --- a/scripts/ovirt-config-setup
> +++ b/scripts/ovirt-config-setup
> @@ -14,7 +14,9 @@ while true; do
>  
>          case "$OPTION" in
>              "Networking") ovirt-config-networking ; break ;;
> -            "Storage")    ovirt-config-storage    ; break ;;
> +            "Storage")
> +                newrole -t virtd_t -- -c ovirt-config-storage ;
> +                break ;;
>              "Logging")    ovirt-config-logging    ; break ;;
>              "Password")   ovirt-config-password   ; break ;;
>              "Quit")       exit 0 ;;
> diff --git a/scripts/ovirt-firstboot b/scripts/ovirt-firstboot
> index a75319a..a7c88f4 100755
> --- a/scripts/ovirt-firstboot
> +++ b/scripts/ovirt-firstboot
> @@ -31,7 +31,7 @@ start ()
>  {
>      if is_auto_install; then
>          ovirt-config-networking AUTO
> -        ovirt-config-storage AUTO
> +        newrole -t virtd_t -- -c 'ovirt-config-storage AUTO'
>          ovirt-config-logging AUTO
>      else
>          ovirt-config-setup

In running this script plus the other for node-image I'm not able to get
the firstboot system working.

During boot the firstboot script itself never runs.

When I log in as root and run the firstboot script itself, using both
"service ovirt-firstboot start" and "/etc/init.d/ovirt-firstboot start",
I see no output and am dumped directly back to the command prompt.

When I run the ovirt-config-setup menu itself and try to run the storage
configuration I get the error message:

unconfined_u:unconfined_r:virtd_t:s0-s0:c0.c1023: is not a valid context

- --
Darryl L. Pierce <dpierce at redhat.com> : GPG KEYID: 6C4E7F1B
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkklx4sACgkQjaT4DmxOfxuigwCfQOJhmC3l18idLn4TTE01L7Uh
eLYAoKNath7CI77W/fxeUsl0iu5B3y6Q
=ceU5
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dpierce.vcf
Type: text/x-vcard
Size: 319 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20081120/fa1b3889/attachment.vcf>


More information about the ovirt-devel mailing list