OpenRC 0.35 for FreeBSD

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

OpenRC 0.35 for FreeBSD

Joe Maloney-3
Hello hackers,
I have been working on a single diff version of OpenRC for FreeBSD:

https://github.com/pkgdemon/freebsd/commit/b6885cd533c848a1b4f3582f48e40c883669b35c

Why OpenRC?  The licensing is right, and it's a way of adding modern
features to service management without reinventing the wheel.  That's
my sales pitch.  This newest itteration is a result of a year, and a
half of feedback from the import into TrueOS.  Eventually it will be
upstreamed into TrueOS to further reduce the diff again between
TrueOS, and FreeBSD.

The single commit in this new fork allows coexistence with rc.d.  It
also uses dhcient again although there isn't a service to start it
directly yet but it does get started with netif.  I have just recently
replaced OpenRC's bootmisc service with a dummy service that launches
cleartmp, cleanvar.  Once I replace the remaining 7 or so scripts with
FreeBSD converted scripts I will rework the dependancies to remove the
uncessary dummy scripts during a second audit. I have been working on
a conversion tool which eases some of the conversion of the remaining
89, or so scripts.

As is this implemtnation only touches top level Makefiles, mtree, adds
new files, and adds a modified init which changes pathnames.h to call
/etc/openrc.  This is work in progress so I am not quite done, and I
have been making tickets in the fork to keep track.  I was thinking
for example of making a kenv option which would allow a single init to
switch pathnames settings perhaps.  At the same time I was trying to
avoid being intrusive by touching service, or init.  So therefore
there is service, and rc-service.  There is init, and openrc-init.
There is rc, and openrc.  There is rc.shutdown, and openrc.shutdown.
You just change init_path for loader, and that is that.

I have full details in the wiki at the fork, and tickets for the items
I plan to tackle next:

https://github.com/pkgdemon/freebsd/wiki
https://github.com/pkgdemon/freebsd/issues

I have had a lot of fun working on this learning how base is tied
together, how bsdinstall is started, learning the internals of rc.d
scripts, etc.  I would appreciate any feedback.  Thanks.

Joe Maloney
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

Lars Engels
On Thu, Mar 01, 2018 at 08:02:23PM -0500, Joe Maloney wrote:
> Hello hackers,
> I have been working on a single diff version of OpenRC for FreeBSD:
>
> https://github.com/pkgdemon/freebsd/commit/b6885cd533c848a1b4f3582f48e40c883669b35c

Thanks for your work!

>
> Why OpenRC?  The licensing is right, and it's a way of adding modern
> features to service management without reinventing the wheel.  That's
> my sales pitch.

Hm, that does not convince me. FreeBSD's rc is also BSD licensed and did
not reinvent any wheel.
Could you maybe give some comparison between OpenRC and our rc? What
does OpenRC better?

Thanks!

Lars
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

Alan Somers-2
On Fri, Mar 2, 2018 at 1:37 AM, Lars Engels <[hidden email]> wrote:

> On Thu, Mar 01, 2018 at 08:02:23PM -0500, Joe Maloney wrote:
> > Hello hackers,
> > I have been working on a single diff version of OpenRC for FreeBSD:
> >
> > https://github.com/pkgdemon/freebsd/commit/
> b6885cd533c848a1b4f3582f48e40c883669b35c
>
> Thanks for your work!
>
> >
> > Why OpenRC?  The licensing is right, and it's a way of adding modern
> > features to service management without reinventing the wheel.  That's
> > my sales pitch.
>
> Hm, that does not convince me. FreeBSD's rc is also BSD licensed and did
> not reinvent any wheel.
> Could you maybe give some comparison between OpenRC and our rc? What
> does OpenRC better?
>
> Thanks!
>
> Lars
>

Parallel startup, mainly.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

Gleb Popov
In reply to this post by Joe Maloney-3
On Fri, Mar 2, 2018 at 4:02 AM, Joe Maloney <[hidden email]> wrote:

> Hello hackers,
> I have been working on a single diff version of OpenRC for FreeBSD:
>
> https://github.com/pkgdemon/freebsd/commit/b6885cd533c848a1b4f3582f48e40c
> 883669b35c
>
> Why OpenRC?  The licensing is right, and it's a way of adding modern
> features to service management without reinventing the wheel.  That's
> my sales pitch.  This newest itteration is a result of a year, and a
> half of feedback from the import into TrueOS.  Eventually it will be
> upstreamed into TrueOS to further reduce the diff again between
> TrueOS, and FreeBSD.
>
> The single commit in this new fork allows coexistence with rc.d.  It
> also uses dhcient again although there isn't a service to start it
> directly yet but it does get started with netif.  I have just recently
> replaced OpenRC's bootmisc service with a dummy service that launches
> cleartmp, cleanvar.  Once I replace the remaining 7 or so scripts with
> FreeBSD converted scripts I will rework the dependancies to remove the
> uncessary dummy scripts during a second audit. I have been working on
> a conversion tool which eases some of the conversion of the remaining
> 89, or so scripts.
>
> As is this implemtnation only touches top level Makefiles, mtree, adds
> new files, and adds a modified init which changes pathnames.h to call
> /etc/openrc.  This is work in progress so I am not quite done, and I
> have been making tickets in the fork to keep track.  I was thinking
> for example of making a kenv option which would allow a single init to
> switch pathnames settings perhaps.  At the same time I was trying to
> avoid being intrusive by touching service, or init.  So therefore
> there is service, and rc-service.  There is init, and openrc-init.
> There is rc, and openrc.  There is rc.shutdown, and openrc.shutdown.
> You just change init_path for loader, and that is that.
>
> I have full details in the wiki at the fork, and tickets for the items
> I plan to tackle next:
>
> https://github.com/pkgdemon/freebsd/wiki
> https://github.com/pkgdemon/freebsd/issues
>
> I have had a lot of fun working on this learning how base is tied
> together, how bsdinstall is started, learning the internals of rc.d
> scripts, etc.  I would appreciate any feedback.  Thanks.
>
> Joe Maloney
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[hidden email]"
>

I've been seeing nosh release announcements for a long time and was
thinking that this is what is going to replace current rc. Am I wrong?
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

Jonathan Anderson-2
In reply to this post by Lars Engels
On 2 Mar 2018, at 5:07, Lars Engels wrote:

> On Thu, Mar 01, 2018 at 08:02:23PM -0500, Joe Maloney wrote:
>> [...]
>> Why OpenRC?  The licensing is right, and it's a way of adding modern
>> features to service management without reinventing the wheel.  That's
>> my sales pitch.
>
> Hm, that does not convince me. FreeBSD's rc is also BSD licensed and
> did
> not reinvent any wheel.
> Could you maybe give some comparison between OpenRC and our rc? What
> does OpenRC better?

In addition to asking that question (which is a good one), I think that
we need to understand the differences among the various
permissively-licensed init/inetd replacements. Personally I think that
the time to replace rc is drawing near, but there are a number of
options that I've heard of vying for consideration:

  - finit
  - jobd (is this still a thing?)
  - nosh
  - OpenRC
  - runit

... not to mention more out-there ideas like launchd.

These decisions are never purely technical (as it's a matter of
"technically sound" + "someone is willing to do the work"), but I for
one wouldn't want to switch something as fundamental as the rc system
without having a broad conversation about the merits of the various
options and coming to some kind of rough consensus. Also, of course, I
have an interest in choosing an init system that can play nicely with
sandboxing services, but that's just one consideration among many.


Jon
--
Jonathan Anderson
[hidden email]
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

Jonathan Anderson-2
On 2 Mar 2018, at 12:13, Jonathan Anderson wrote:
>
> [...] there are a number of options that I've heard of vying for
> consideration:
>
>  - finit
>  - jobd (is this still a thing?)
>  - nosh
>  - OpenRC
>  - runit

Oh, and also s6: https://skarnet.org/software/s6/why.html


Jon
--
Jonathan Anderson
[hidden email]
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

Edward Napierala
In reply to this post by Alan Somers-2
On 0302T0828, Alan Somers wrote:

> On Fri, Mar 2, 2018 at 1:37 AM, Lars Engels <[hidden email]> wrote:
>
> > On Thu, Mar 01, 2018 at 08:02:23PM -0500, Joe Maloney wrote:
> > > Hello hackers,
> > > I have been working on a single diff version of OpenRC for FreeBSD:
> > >
> > > https://github.com/pkgdemon/freebsd/commit/
> > b6885cd533c848a1b4f3582f48e40c883669b35c
> >
> > Thanks for your work!
> >
> > >
> > > Why OpenRC?  The licensing is right, and it's a way of adding modern
> > > features to service management without reinventing the wheel.  That's
> > > my sales pitch.
> >
> > Hm, that does not convince me. FreeBSD's rc is also BSD licensed and did
> > not reinvent any wheel.
> > Could you maybe give some comparison between OpenRC and our rc? What
> > does OpenRC better?
> >
> > Thanks!
> >
> > Lars
> >
>
> Parallel startup, mainly.

Some time ago I played with an idea of making it possible within our
existing rcNG infrastructure.  I've modified rcorder(8) to add a "-p"
flag, which modifies its output from the current "one script per line"
to "list of scripts that can be run in parallel per line", using the
existing rc metadata ("PROVIDES" et al), and modified /etc/rc to make
use of that.

I had to give it up due to other obligations, but should anyone want
to pick it up, the code is here:

https://reviews.freebsd.org/D3715

There's also an unrelated review for the "supervise" functionality
for rc scripts, which includes changes for sshd, cron, and syslogd:

https://reviews.freebsd.org/D7474

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

D. Ebdrup
In reply to this post by Joe Maloney-3
On Fri, Mar 2, 2018 at 3:28 AM, Alan Somers <[hidden email]> wrote:

> On Fri, Mar 2, 2018 at 1:37 AM, Lars Engels <[hidden email]> wrote:
>
> > On Thu, Mar 01, 2018 at 08:02:23PM -0500, Joe Maloney wrote:
> > > Hello hackers,
> > > I have been working on a single diff version of OpenRC for FreeBSD:
> > >
> > > https://github.com/pkgdemon/freebsd/commit/b6885cd533c848a1b4f3582f48e40c883669b35c
> >
> > Thanks for your work!
> >
> > >
> > > Why OpenRC?  The licensing is right, and it's a way of adding modern
> > > features to service management without reinventing the wheel.  That's
> > > my sales pitch.
> >
> > Hm, that does not convince me. FreeBSD's rc is also BSD licensed and did
> > not reinvent any wheel.
> > Could you maybe give some comparison between OpenRC and our rc? What
> > does OpenRC better?
> >
> > Thanks!
> >
> > Lars
> >

> Parallel startup, mainly.

This is absolutely not intended to in any way take away from the work
that you have done and I don't expect you to answer, but I have to
admit that I'm a bit worried about OpenRC since one of the main things
it does better still appears to have a rather big and unsolved bug in
the form of [1], that has been open since late 2011 according to [2].
And just to make it perfectly clear, I'm not saying that it's an
unsolvable problem, but I do think it's one that needs to be solved
before OpenRC can be imported.

Mind you, I would love to have parallel service start-up - especially
for machines with a lot of jails (for example, for non-dependant
service separation) that are currently started sequencially, so I
think it's fantastic work you've already done, and I definitely
encourage you to work on it.

[1] https://github.com/OpenRC/openrc/pull/12
[2] https://bugs.gentoo.org/show_bug.cgi?id=391945

Daniel Ebdrup aka. D. Ebdrup.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

Conrad Meyer-2
In reply to this post by Gleb Popov
On Fri, Mar 2, 2018 at 7:39 AM, Gleb Popov <[hidden email]> wrote:
> I've been seeing nosh release announcements for a long time and was
> thinking that this is what is going to replace current rc. Am I wrong?

You're right that Jonathan does repeatedly spam the FreeBSD mailing
lists with nosh announcements, but you're incorrect that there is any
interest in adopting it as an rc replacement.  IMO it's a non-starter
for a number of reasons and I haven't heard real interest in it from
anyone (except the author, of course).

Best,
Conrad
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

Jonathan Anderson-2
On 4 Mar 2018, at 2:11, Conrad Meyer wrote:

> [...]  IMO [nosh is] a non-starter for a number of reasons [...]

Hi Conrad,

Could you elaborate on those reasons? I'd like to understand the pros
and cons of the various options.


Jon
--
Jonathan Anderson
[hidden email]
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

Mark Linimon-2
In reply to this post by Conrad Meyer-2
On Sat, Mar 03, 2018 at 09:41:46PM -0800, Conrad Meyer wrote:
> You're right that Jonathan does repeatedly spam the FreeBSD mailing
> lists with nosh announcements

I agree that he's promoting his work, but don't quite agree that it
rises to the level of "spam".

No, I don't know its technical merits/demerits.

mcl
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

Ian Lepore-3
On Sun, 2018-03-04 at 08:41 -0600, Mark Linimon wrote:

> On Sat, Mar 03, 2018 at 09:41:46PM -0800, Conrad Meyer wrote:
> >
> > You're right that Jonathan does repeatedly spam the FreeBSD mailing
> > lists with nosh announcements
> I agree that he's promoting his work, but don't quite agree that it
> rises to the level of "spam".
>
> No, I don't know its technical merits/demerits.
>
> mcl
>

It may not be as annoying and off-topic as contact-list or fake-viagra
offerings, but when you compare it to all the other advertising we
tolerate on these lists (absolutely none at all), I've always
considered it to be spam, and wondered why only one person/organization
appears to be allowed to do it.

-- Ian
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: OpenRC 0.35 for FreeBSD

Jan Bramkamp-2
In reply to this post by Jonathan Anderson-2
On 02.03.18 17:11, Jonathan Anderson wrote:

> On 2 Mar 2018, at 12:13, Jonathan Anderson wrote:
>>
>> [...] there are a number of options that I've heard of vying for
>> consideration:
>>
>>  - finit
>>  - jobd (is this still a thing?)
>>  - nosh
>>  - OpenRC
>>  - runit
>
> Oh, and also s6: https://skarnet.org/software/s6/why.html

I've run s6 + s6-rc as init replacement for FreeBSD 11.1 on my laptop
for over a year. The init_path kenv simplifies testing alternative init
systems a lot. It works really well and required only minimal porting.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

S6-init was: OpenRC 0.35 for FreeBSD

Mark Saad-5


> On Mar 6, 2018, at 7:34 AM, Jan Bramkamp <[hidden email]> wrote:
>
>> On 02.03.18 17:11, Jonathan Anderson wrote:
>>> On 2 Mar 2018, at 12:13, Jonathan Anderson wrote:
>>>
>>> [...] there are a number of options that I've heard of vying for consideration:
>>>
>>>  - finit
>>>  - jobd (is this still a thing?)
>>>  - nosh
>>>  - OpenRC
>>>  - runit
>> Oh, and also s6: https://skarnet.org/software/s6/why.html
>
> I've run s6 + s6-rc as init replacement for FreeBSD 11.1 on my laptop for over a year. The init_path kenv simplifies testing alternative init systems a lot. It works really well and required only minimal porting.

Jan
  I am interested to know more ; do you have any notes ? Also did you ever try runit? Again it’s another similar project but if I remember it’s in ports .



Mark Saad | [hidden email]

> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[hidden email]"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: S6-init was: OpenRC 0.35 for FreeBSD

Jan Bramkamp-2
On 06.03.18 15:16, Mark Saad wrote:

>
>
>> On Mar 6, 2018, at 7:34 AM, Jan Bramkamp <[hidden email]> wrote:
>>
>>> On 02.03.18 17:11, Jonathan Anderson wrote:
>>>> On 2 Mar 2018, at 12:13, Jonathan Anderson wrote:
>>>>
>>>> [...] there are a number of options that I've heard of vying for consideration:
>>>>
>>>>   - finit
>>>>   - jobd (is this still a thing?)
>>>>   - nosh
>>>>   - OpenRC
>>>>   - runit
>>> Oh, and also s6: https://skarnet.org/software/s6/why.html
>>
>> I've run s6 + s6-rc as init replacement for FreeBSD 11.1 on my laptop for over a year. The init_path kenv simplifies testing alternative init systems a lot. It works really well and required only minimal porting.
>
> Jan
>    I am interested to know more ; do you have any notes ? Also did you ever try runit? Again it’s another similar project but if I remember it’s in ports .

I used runit as init replacement on my previous laptop, but found it
limitations to annoying. Runit is a pure process supervisor. The only
state runit tracks are supervised processes and there are is no support
for dependencies. And while it supports readiness checks those are
implemented by polling every 100ms. The only way to track state with
runit is to wrap it with a sleeping process.

I'm still using runit on my servers. On those I have start runsv from a
rc.d script. This runsv provides a default log replacing readproctile
style hacks and spawns the runsvdir. The result looks like this:

daemon---runsv-+-runsvdir-+-runsv-+-rspamd-1.6.6---35*[rspamd-1.6.6]
                |          |       `-svlogd
                |          |-runsv-+-socklog
                |          |       `-svlogd
                |          |-runsv-+-dovecot-+-anvil
                |          |       |         |-auth
                |          |       |         |-config
                |          |       |         `-log
                |          |       `-svlogd
                |          |-2*[runsv]
                |          |-runsv---master-+-anvil
                |          |                |-cleanup
                |          |                |-7*[dnsblog]
                |          |                |-2*[lmtp]
                |          |                |-2*[local]
                |          |                |-pickup
                |          |                |-postscreen
                |          |                |-qmgr
                |          |                |-smtpd
                |          |                |-tlsmgr
                |          |                `-trivial-rewrite
                |          |-runsv-+-sshd---sshd---sshd---zsh-+-cat
                |          |       |                          `-dtpstree
                |          |       `-svlogd
                |          |-runsv-+-redis-server
                |          |       `-svlogd
                |          |-runsv-+-nginx---nginx
                |          |       `-svlogd
                |          `-runsv---spiped
                `-svlogd

Runit is a fine process supervisor, but the development ended years ago
with a "finished" product. The author decided that process supervision
is enough and didn't try to write the missing service manager on top of
runit. An other downside of runit compared to s6 is that it uses polling
instead of proper readiness notification. If you have questions
regarding s6 or s6-rc there are the #s6 (and #s6-offtopic) IRC channels
on freenode and the skarware mailing lists
(http://skarnet.org/lists.html#skaware).

I did keep notes. I just didn't publish them because they are nothing
more than an unstructured brain dump. I'm happy to answer any questions.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"