Re: Upstart 0.5.0, /proc, and telinit

2009-02-23 Thread Mark Rosenstand
On Tue, Sep 23, 2008 at 10:46 PM, Scott James Remnant
sc...@netsplit.com wrote:
 On Tue, 2008-08-26 at 15:29 -0700, Jeff Oliver wrote:

 I too have a problem with attempting to use upstart as early start /init
 process.  I'm attempting to use upstart in a embedded environment, so I
 have an initramfs built into my kernel that is a complete root
 filesystem.  Unfortunately, upstart depends on /proc, which isn't
 mounted yet.

 This is a bug.


 I ended up rearranging the process_spawn function in that
 area to attempt to open /proc, but if it fails, i removed the
 process_error_abort call.  If it succeeds, then attempt to write the
 oom_adj value as normal.  It seems to work fine for my setup.  It at
 least allows me to run rc.sysinit (or whatever other script) that will
 mount /proc.

 Rather than ignoring the error, which would mean a job configuration
 detail would not be set, the patch should instead only attempt to set it
 if there is an OOM adjustment (ie. it's non-default).

 Would you be willing to adjust the patch and assign copyright to
 Canonical?

 http://upstart.ubuntu.com/wiki/CopyrightAssignment

Is this the only thing that keeps upstart from working on non-initrd
systems? Seems it didn't make it into 0.5.1 :(

-- 
upstart-devel mailing list
upstart-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel


Re: Upstart 0.5.0, /proc, and telinit

2009-02-23 Thread Scott James Remnant
On Mon, 2009-02-23 at 13:14 +0100, Mark Rosenstand wrote:

 Is this the only thing that keeps upstart from working on non-initrd
 systems? Seems it didn't make it into 0.5.1 :(
 
Nobody has supplied a patch.

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?


signature.asc
Description: This is a digitally signed message part
-- 
upstart-devel mailing list
upstart-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel


Re: Upstart 0.5.0, /proc, and telinit

2009-02-23 Thread Kevin Hunter
Preface my following response with the fact that I'm not an Upstart
developer, merely an interested end-user of this project.

At 7:44am -0500 on Mon, 23 Feb 2009, Scott James Remnant wrote:
 On Mon, 2009-02-23 at 13:14 +0100, Mark Rosenstand wrote:
 Is this the only thing that keeps upstart from working on non-initrd
 systems? Seems it didn't make it into 0.5.1 :(

 Nobody has supplied a patch.

I can't speak for others, but I objected to assigning the copyright to
someone else.  At a first glance of Would you be willing to adjust the
patch and assign copyright to Canonical? sounds like Give us your
work.  To be blunt, if I wrote it, why should you profit? Even if only
in the Free sense?

However, after I actually RTFM, these two points alleviated my gut reaction:

---
5. Canonical grants back to you a non-exclusive, royalty-free, and
perpetual right to use, modify, and distribute the Assigned
Contributions as you wish.

6. Canonical will make the Assigned Contributions available under a
Free Software Licence, according to the definition of that term
published by the Free Software Foundation.  Such a licence will, at
minimum, permit people receiving the software, without payment of a
royalty to Canonical, to use, modify and redistribute under the same
licence.  Canonical may also make the Assigned Contributions available
under other license terms.
---

Since I would likely release personal work under a Free software
license, these would satisfy me.

However, I see no mention of attribution.  I appreciate seeing who a
project's major contributors are, either on a webpage, or in some file
in the code repo. Call me conceited, but if I were a major contributor
of a project, either past or present, I'd expect the same.

In short, lacking a good argument not to be, I'm comfortable with the
license, modulo the fact that there is no item to guarantee recognition.
For some of us, especially in these lay-off times, recognition of our
contributions is the difference between a job and no-job.

Kevin

-- 
upstart-devel mailing list
upstart-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel


Re: Upstart 0.5.0, /proc, and telinit

2009-02-23 Thread Kees Jongenburger
On Mon, Feb 23, 2009 at 1:44 PM, Scott James Remnant sc...@netsplit.com wrote:
 On Mon, 2009-02-23 at 13:14 +0100, Mark Rosenstand wrote:

 Is this the only thing that keeps upstart from working on non-initrd
 systems? Seems it didn't make it into 0.5.1 :(

 Nobody has supplied a patch.
Just like other features of upstart they are not documented.
If some developer expected the /proc to be mounted when starting the
init it surely must have
been some choice.

As to documenting we have the same problem. Is something not working
by design or not?
it's up to a developer to provide a clean syntax for the jobs file.

greetings

-- 
upstart-devel mailing list
upstart-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel


Re: Upstart 0.5.0, /proc, and telinit

2009-02-23 Thread Adam Sampson
Scott James Remnant sc...@netsplit.com writes:

 Nobody has supplied a patch.

Well, here's what I'm using happily, but I suspect a little more finesse
would be useful. ;)

http://offog.org/darcs/garstow/sys/upstart/files/mountproc.diff

-- 
Adam Sampson a...@offog.org http://offog.org/

-- 
upstart-devel mailing list
upstart-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel


Re: Upstart 0.5.0, /proc, and telinit

2009-02-23 Thread Garrett Cooper
On Mon, Feb 23, 2009 at 2:14 PM, Adam Sampson a...@offog.org wrote:
 Scott James Remnant sc...@netsplit.com writes:

 Nobody has supplied a patch.

 Well, here's what I'm using happily, but I suspect a little more finesse
 would be useful. ;)

 http://offog.org/darcs/garstow/sys/upstart/files/mountproc.diff

Uh, that will almost certainly fail if it can't allocate a shell
because system(3) calls execve(2) and allocates a shell.

Using mount(2), like so, would be better:

#include string.h  /* For strerror(3). */
#include errno.h
#include sys/mount.h
#include linux/kernel.h /* For panic(2). */

/* ... */

if (mount(none, /proc, proc, 0, NULL)  0) {
/* Change to OOM support not available, etc for this instead of a panic? */
panic (Failed to mount /proc: %s\n, strerror(errno));
}

You'll potentially need to do similar for /dev and /dev/console
(we currently do that, but I'm not sure if /dev/console is needed...).
Combined with proper calls to fstab(5) with getent, this should be
solved properly in less than 30 lines.
Cheers,
-Garrett

-- 
upstart-devel mailing list
upstart-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel


Re: Upstart 0.5.0, /proc, and telinit

2009-02-23 Thread Jeff Oliver




First off, I would say that
there is no need to mount /proc, if its not necessary. For the most
part, job files, wouldn't even require /proc to be mounted. Following
on from that logic, there is only 1 place, that I can see, that
actually attempts to use a /proc file, when upstart changes the oom_adj
value. So, first check to see if the job file is even changing that
value, if not, /proc is not needed and skip that step. Second, if it
does need /proc, then what? You could simply fail the job, quietly
ignore the error, or mount proc? I guess that part is up for debate
yet.

It should not use system(), it opens itself up for other problems.

Jeff

Garrett Cooper wrote:

  On Mon, Feb 23, 2009 at 2:14 PM, Adam Sampson a...@offog.org wrote:
  
  
Scott James Remnant sc...@netsplit.com writes:



  Nobody has supplied a patch.
  

Well, here's what I'm using happily, but I suspect a little more finesse
would be useful. ;)

http://offog.org/darcs/garstow/sys/upstart/files/mountproc.diff

  
  
Uh, that will almost certainly fail if it can't allocate a shell
because system(3) calls execve(2) and allocates a shell.

Using mount(2), like so, would be better:

#include string.h  /* For strerror(3). */
#include errno.h
#include sys/mount.h
#include linux/kernel.h /* For panic(2). */

/* ... */

if (mount("none", "/proc", "proc", 0, NULL)  0) {
/* Change to OOM support not available, etc for this instead of a panic? */
panic ("Failed to mount /proc: %s\n", strerror(errno));
}

You'll potentially need to do similar for /dev and /dev/console
(we currently do that, but I'm not sure if /dev/console is needed...).
Combined with proper calls to fstab(5) with getent, this should be
solved properly in less than 30 lines.
Cheers,
-Garrett

  






Disclaimer: The information contained in this transmission, including any
attachments, may contain confidential information of Panasonic Avionics
Corporation. This transmission is intended only for the use of the 
addressee(s) listed above. Unauthorized review, dissemination or other use 
of the information contained in this transmission is strictly prohibited. 
If you have received this transmission in error or have reason to believe 
you are not authorized to receive it, please notify the sender by return 
email and promptly delete the transmission.


-- 
upstart-devel mailing list
upstart-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel