Sorry Paul and thanks Nicholas,

Yes - the service manifests indeed belong under /opt/custom/smf/ so that
they are imported automatically by SmartOS and I have have the method
script saved as /opt/custom/bin/svc-guesthandler - the latter is
configurable via the service, but if it suits You, just stick with the
default.

As for the example tagging command, that's entirely my fault, caused by
my ineptitude regarding Markdown. What I wanted to display is revealed
by the actual commit:

https://github.com/tgerczei/smartos-guesthandler/commit/f7acdb6c01dbdf5bed728e6c4b990bfc57ca646a

I failed to have literal backslashes displayed in order to facilitate
the escaping, as it has already been pointed out. I'll also add the
information about dropping the manifests under /opt/custom/smf in the
README, for posterity. Thanks for the feedback and please keep it coming!

T.

On 2018-07-06 18:34, Nicholas George wrote:
> 1. You drop the files in /opt/custom/smf and SmartOS will import them
> during startup, you don't need to import them manually.
> 2. Pretty sure you're just missing the escapes for the double quotes
> in that command, but I'm not currently at a system where I can check.
> vmadm list -Ho uuid | while read UUID; do vmadm update $UUID <<<
> "{\"set_tags\":{\"priority\": 0}}"; done
>
> On Fri, Jul 6, 2018 at 12:15 PM, Paul Sture <smar...@chingola.ch
> <mailto:smar...@chingola.ch>> wrote:
>
>     On 6 Jul 2018, at 15:54, Tamás Gérczei wrote:
>
>         Hi,
>
>         Yup, this is a rudimentary implementation of what Jussi had
>         said. I
>         still use it myself, it still works as far as I can tell. Let
>         me know
>         how it fares!
>
>
>     Well, I'm not having a very good afternoon here, so please bear
>     with me...
>
>     Please note I am running release joyent_20180621T003454Z here.
>
>     1. Where am I supposed to place the .xml files? I tried doing an
>     svcs import on
>        them, and that seemed to work, but on a reboot I don't see them
>     registered
>        in svcs
>
>     2. Neither of the vmadm update commands given in README.md work,
>     failing with
>        syntax errors.  E.g.
>
>     # vmadm list -Ho uuid | while read UUID; do vmadm update $UUID <<<
>     "{"set_tags":{"priority": 0}}"; done
>
>     Invalid JSON payload: Unexpected token s
>     Invalid JSON payload: Unexpected token s
>     Invalid JSON payload: Unexpected token s
>     Invalid JSON payload: Unexpected token s
>
>     I've tried variations on that command, to no avail. Instead I put
>     the JSON into individual .json files, and that does work:
>
>     # cat tags_priority_0.json
>      {"set_tags": {"priority": 0}}
>
>     # vmadm get <UUID> |json tags
> {
>   "label": "package build",
>   "owner": "psture",
>   "priority": 0
> }
> 
> Sorry, like I said, I'm not having a good afternoon and I'm stuck...
> 
> On 2018-07-06 14:31, Paul Sture wrote:
> 
> On 6 Jul 2018, at 13:04, Fred Liu wrote:
> 
> Hi,
> 
> Not sure there are already similar discussions here.
> As far as I know, if I just reboot smartos, the server
> will
> *simultaneously* boot all the VMs in running status
> before the reboot.
> That will give the following issues:
> 
> 1) : huge io pressure on storage. It will take longer
> time to finalize
> all the VMs' boot compared with non-simultaneous boot
> pattern.
> 
> 2) : If there are dependancies among these VMs, there
> would be failed
> VM boots.
> 
> From my thinking, the VM boots are just like the
> service we initialize.
> 
> Is it possible to boot VMs the way like SMF?
> 
> I haven't tested this myself, but it's been suggested on
> this list
> several times:
> 
> <https://github.com/tgerczei/smartos-guesthandler
> <https://github.com/tgerczei/smartos-guesthandler>>
> 
> *smartos-discuss* | Archives
> <https://www.listbox.com/member/archive/184463/=now> | Modify
> <https://www.listbox.com/member/?> Your Subscription
>       [Powered by Listbox] <https://www.listbox.com>



-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125
Powered by Listbox: https://www.listbox.com

Reply via email to