ldomctl: download: select new configuration

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

ldomctl: download: select new configuration

Klemens Nanni-2
The example in the manual implies that the download command also selects
it:

        # ldomctl init-system ldom.conf
        # cd ..
        # ldomctl delete openbsd
        # ldomctl download openbsd
        # ldomctl list
        factory-default [current]
        openbsd [next]

But `ldomctl select openbsd' is required between downloading and listing
to get this result - at least on my T4 machine `download' never selected
any configuration, however I vaguely remember that this was the case
with older machines.

kettenis: Has this really been missing all the time or could there be
differences in the mdstore protocol and/or firmware that cause this?

Diff below explicitly selects configuration in code.

Feedback? OK?

Index: ldomctl.c
===================================================================
RCS file: /cvs/src/usr.sbin/ldomctl/ldomctl.c,v
retrieving revision 1.31
diff -u -p -r1.31 ldomctl.c
--- ldomctl.c 28 Dec 2019 18:36:02 -0000 1.31
+++ ldomctl.c 30 Dec 2019 19:51:59 -0000
@@ -415,6 +415,7 @@ download(int argc, char **argv)
  ds_conn_handle(dc);
 
  mdstore_download(dc, argv[1]);
+ mdstore_select(dc, argv[1]);
 }
 
 void

Reply | Threaded
Open this post in threaded view
|

Re: ldomctl: download: select new configuration

Mark Kettenis
> Date: Mon, 30 Dec 2019 21:07:59 +0100
> From: Klemens Nanni <[hidden email]>
>
> The example in the manual implies that the download command also selects
> it:
>
> # ldomctl init-system ldom.conf
> # cd ..
> # ldomctl delete openbsd
> # ldomctl download openbsd
> # ldomctl list
> factory-default [current]
> openbsd [next]
>
> But `ldomctl select openbsd' is required between downloading and listing
> to get this result - at least on my T4 machine `download' never selected
> any configuration, however I vaguely remember that this was the case
> with older machines.
>
> kettenis: Has this really been missing all the time or could there be
> differences in the mdstore protocol and/or firmware that cause this?
>
> Diff below explicitly selects configuration in code.
>
> Feedback? OK?

I can't remember.  Maybe someone with a t1k/t2k or t5120/t5140 can
test this?

It makes sense for the download command not to immediately select a
configuration.  So maybe just the documentation needs changing?

> Index: ldomctl.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ldomctl/ldomctl.c,v
> retrieving revision 1.31
> diff -u -p -r1.31 ldomctl.c
> --- ldomctl.c 28 Dec 2019 18:36:02 -0000 1.31
> +++ ldomctl.c 30 Dec 2019 19:51:59 -0000
> @@ -415,6 +415,7 @@ download(int argc, char **argv)
>   ds_conn_handle(dc);
>  
>   mdstore_download(dc, argv[1]);
> + mdstore_select(dc, argv[1]);
>  }
>  
>  void
>
>

Reply | Threaded
Open this post in threaded view
|

Re: ldomctl: download: select new configuration

Klemens Nanni-2
On Fri, Jan 03, 2020 at 08:27:21PM +0100, Mark Kettenis wrote:
> I can't remember.  Maybe someone with a t1k/t2k or t5120/t5140 can
> test this?
Hopefully;  I don't have such machines anymore.

> It makes sense for the download command not to immediately select a
> configuration.  So maybe just the documentation needs changing?
I'm totally fine either way as long as documentation and code is in sync.

Automatic select upon download makes sense for me since I usually want
to run the configuration (right away) I just build, especially in our
situation where config changes require machine resets (I think Solaris
calls this "delayed configuration").

Manual update below for convenience but I want to hear feedback from
users of above mentioned machines before changing this either way.


Index: ldomctl.8
===================================================================
RCS file: /cvs/src/usr.sbin/ldomctl/ldomctl.8,v
retrieving revision 1.21
diff -u -p -r1.21 ldomctl.8
--- ldomctl.8 30 Dec 2019 20:10:48 -0000 1.21
+++ ldomctl.8 3 Jan 2020 19:40:36 -0000
@@ -53,7 +53,6 @@ Delete the specified configuration from
 .It Cm download Ar directory
 Save a logical domain configuration to non-volatile storage on the
 service processor.
-The configuration will take effect after the machine is reset.
 The name of the configuration is taken from the name of the
 .Ar directory
 which must contain files created with the

Reply | Threaded
Open this post in threaded view
|

Re: ldomctl: download: select new configuration

Klemens Nanni-2
On Fri, Jan 03, 2020 at 08:40:56PM +0100, Klemens Nanni wrote:
> Manual update below for convenience but I want to hear feedback from
> users of above mentioned machines before changing this either way.
kettenis confirmed that at least a T5120 automatically selects the new
config, I'm pretty confident my T5240 did the same.

Here's a minimal diff to reflect this machine dependent behaviour.

Feedback? OK?


Index: ldomctl.8
===================================================================
RCS file: /cvs/src/usr.sbin/ldomctl/ldomctl.8,v
retrieving revision 1.23
diff -u -p -r1.23 ldomctl.8
--- ldomctl.8 4 Jan 2020 18:45:26 -0000 1.23
+++ ldomctl.8 4 Jan 2020 18:58:22 -0000
@@ -53,7 +53,8 @@ Delete the specified configuration from
 .It Cm download Ar directory
 Save a logical domain configuration to non-volatile storage on the
 service processor.
-The configuration will take effect after the machine is reset.
+Depending on the firmware, the configuration will be selected automatically and
+take effect after the machine is reset.
 The name of the configuration is taken from the name of the
 .Ar directory
 which must contain files created with the

Reply | Threaded
Open this post in threaded view
|

Re: ldomctl: download: select new configuration

Mark Kettenis
> Date: Sat, 4 Jan 2020 20:01:59 +0100
> From: Klemens Nanni <[hidden email]>
>
> On Fri, Jan 03, 2020 at 08:40:56PM +0100, Klemens Nanni wrote:
> > Manual update below for convenience but I want to hear feedback from
> > users of above mentioned machines before changing this either way.
> kettenis confirmed that at least a T5120 automatically selects the new
> config, I'm pretty confident my T5240 did the same.
>
> Here's a minimal diff to reflect this machine dependent behaviour.
>
> Feedback? OK?

Probably should say that depending on the firmware the new
configuration will have to be explicitly selected?

> Index: ldomctl.8
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ldomctl/ldomctl.8,v
> retrieving revision 1.23
> diff -u -p -r1.23 ldomctl.8
> --- ldomctl.8 4 Jan 2020 18:45:26 -0000 1.23
> +++ ldomctl.8 4 Jan 2020 18:58:22 -0000
> @@ -53,7 +53,8 @@ Delete the specified configuration from
>  .It Cm download Ar directory
>  Save a logical domain configuration to non-volatile storage on the
>  service processor.
> -The configuration will take effect after the machine is reset.
> +Depending on the firmware, the configuration will be selected automatically and
> +take effect after the machine is reset.
>  The name of the configuration is taken from the name of the
>  .Ar directory
>  which must contain files created with the
>

Reply | Threaded
Open this post in threaded view
|

Re: ldomctl: download: select new configuration

Klemens Nanni-2
On Sat, Jan 04, 2020 at 08:16:50PM +0100, Mark Kettenis wrote:
> Probably should say that depending on the firmware the new
> configuration will have to be explicitly selected?
I wanted to explicitly document behaviour specific to certain firmware,
the `select' command already explains how to pick a config and `list'
already tells how to check all configs.

This way seems like less repitition and goes in line with how you prefer
`download' should not select configs automatically, e.g. stating how
some firmware still does it implies that it is not the default action we
actively take in ldomctl.

Reply | Threaded
Open this post in threaded view
|

Re: ldomctl: download: select new configuration

Mike Larkin-2
In reply to this post by Mark Kettenis
On Fri, Jan 03, 2020 at 08:27:21PM +0100, Mark Kettenis wrote:

> > Date: Mon, 30 Dec 2019 21:07:59 +0100
> > From: Klemens Nanni <[hidden email]>
> >
> > The example in the manual implies that the download command also selects
> > it:
> >
> > # ldomctl init-system ldom.conf
> > # cd ..
> > # ldomctl delete openbsd
> > # ldomctl download openbsd
> > # ldomctl list
> > factory-default [current]
> > openbsd [next]
> >
> > But `ldomctl select openbsd' is required between downloading and listing
> > to get this result - at least on my T4 machine `download' never selected
> > any configuration, however I vaguely remember that this was the case
> > with older machines.
> >
> > kettenis: Has this really been missing all the time or could there be
> > differences in the mdstore protocol and/or firmware that cause this?
> >
> > Diff below explicitly selects configuration in code.
> >
> > Feedback? OK?
>
> I can't remember.  Maybe someone with a t1k/t2k or t5120/t5140 can
> test this?
>

Do you still need testing here? I could reinstall my t5240 if nobody has
tested yet...

-ml

> It makes sense for the download command not to immediately select a
> configuration.  So maybe just the documentation needs changing?
>
> > Index: ldomctl.c
> > ===================================================================
> > RCS file: /cvs/src/usr.sbin/ldomctl/ldomctl.c,v
> > retrieving revision 1.31
> > diff -u -p -r1.31 ldomctl.c
> > --- ldomctl.c 28 Dec 2019 18:36:02 -0000 1.31
> > +++ ldomctl.c 30 Dec 2019 19:51:59 -0000
> > @@ -415,6 +415,7 @@ download(int argc, char **argv)
> >   ds_conn_handle(dc);
> >  
> >   mdstore_download(dc, argv[1]);
> > + mdstore_select(dc, argv[1]);
> >  }
> >  
> >  void
> >
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: ldomctl: download: select new configuration

Klemens Nanni-2
On Mon, Jan 06, 2020 at 10:19:41PM -0800, Mike Larkin wrote:
> Do you still need testing here? I could reinstall my t5240 if nobody has
> tested yet...
Thanks, but Mark already confirmed that T5120 machines do select new
configurations automatically.

If you're still in for testing, I'd like to know how many guests you
can spin up your machine.  It seems that some machines and/or firmware
versions impose a software limit of maximum guests;  on my T4-2 this
seems to be 8 at the moment, presumably because that is how many cores
(not threads) this machine has per CPU.

Reply | Threaded
Open this post in threaded view
|

Re: ldomctl: download: select new configuration

David Riley-3
On Jan 7, 2020, at 04:12, Klemens Nanni <[hidden email]> wrote:

>
> On Mon, Jan 06, 2020 at 10:19:41PM -0800, Mike Larkin wrote:
>> Do you still need testing here? I could reinstall my t5240 if nobody has
>> tested yet...
> Thanks, but Mark already confirmed that T5120 machines do select new
> configurations automatically.
>
> If you're still in for testing, I'd like to know how many guests you
> can spin up your machine.  It seems that some machines and/or firmware
> versions impose a software limit of maximum guests;  on my T4-2 this
> seems to be 8 at the moment, presumably because that is how many cores
> (not threads) this machine has per CPU.

Hm, I also have a T5240 with a generous allotment of RAM that I could try. I don’t recall the firmware version, but I’ve been meaning to put OpenBSD on it for a while (I don’t spin it up much because it’s a noisy power hog that I can hear from outside the basement).


- Dave
Reply | Threaded
Open this post in threaded view
|

Re: ldomctl: download: select new configuration

Klemens Nanni-2
On Tue, Jan 07, 2020 at 09:50:46AM -0500, David Riley wrote:
> Hm, I also have a T5240 with a generous allotment of RAM that I could try. I don’t recall the firmware version, but I’ve been meaning to put OpenBSD on it for a while (I don’t spin it up much because it’s a noisy power hog that I can hear from outside the basement).
I'd appreciate tests.  RAM doesn't really matter, you don't even need to
install anything in the guest.  Basically just define as many guets as
one CPU has cores (not threads), see if that config boots.

Then define more guests and check again.

A bit tedious since you need to reset the machine everytime and wait for
the hypervisor to tell you whether the config was excepted shortly
before dropping the primary domain into OBP.