Re: [Bug 430224] Re: init: support chroots

2014-07-28 Thread Dimitri John Ledkov
On 19 June 2014 14:15, Dashamir Hoxha 430...@bugs.launchpad.net wrote:
 Just for the record, when I install Ubuntu Trusty (14.04) as a chroot
 inside Ubuntu Trusty (14.04) this problem does not happen. The problem
 here is with starting mysql inside the chroot: `service mysql start`. It
 tries to start the mysql of the main (host) system.

 The easy workaround for this (which was not so easy for me to find) is to 
 start mysql like this: `/etc/init.d/mysql start`
 I hope this is useful to someone, since systemd may need some time to 
 become working and stable. By the way, I tried to test it on 14.04 and it 
 didn't work.


In 14.04, chroot support in upstart is turned off by default, to
enable please boot with --chroot-sessions kernel cmdline option
(which is passed to init) see $ man 8 init , for more details. After
that service mysql start will work inside the chroot.

However, instead of using chroots I strongly recommend for you to use
lxc container, which is almost as lightweight as chroot, but has extra
protections against affecting the host system and it has fully working
upstart inside.

-- 
Regards,

Dimitri.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2014-06-19 Thread Dashamir Hoxha
Just for the record, when I install Ubuntu Trusty (14.04) as a chroot
inside Ubuntu Trusty (14.04) this problem does not happen. The problem
here is with starting mysql inside the chroot: `service mysql start`. It
tries to start the mysql of the main (host) system.

The easy workaround for this (which was not so easy for me to find) is to start 
mysql like this: `/etc/init.d/mysql start`
I hope this is useful to someone, since systemd may need some time to become 
working and stable. By the way, I tried to test it on 14.04 and it didn't work.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2014-06-01 Thread Dashamir Hoxha
I have installed Ubuntu Trusty (14.04) as a chroot inside Debian Wheezy (7) and 
this problem happens there too.
The workaround by Martin on the last comment (#58) worked well.
Thanks Martin and Ericks.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2014-06-01 Thread gouri
# Workaround and future

It may be of interest to observe that future releases of Ubuntu (after 14.04) 
will no longer use upstart but systemd.
Ref: [Mark Shuttleworth » Blog Archive » Losing 
graciously](http://www.markshuttleworth.com/archives/1316)

In the strict context of this bug report which aims at having traditional 
chroot work in an upstart context, this information should be considered a 
workaround at best.
In the broader context of making some software future-proof, systemd seems like 
the target to study. Systemd provides containers which can be thought of like 
chroot done right.

Good news is: it appears one can test systemd with existing Ubuntu
releases (from 13.04 onward, I haven't tested myself):

* [How can I replace upstart with systemd? - Ask 
Ubuntu](http://askubuntu.com/questions/420917/how-can-i-replace-upstart-with-systemd)
* [systemd - Ubuntu Wiki](https://wiki.ubuntu.com/systemd)

Thank you for your attention.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 430224] Re: init: support chroots

2012-07-20 Thread memartin
I've come across this problem while setting up a headless 12.04 server
via debootstrap and chroot. To be able to upgrade or install services
(like mdadm, which requires postfix) I had to use Ericks workaround and
divert initctl.

It worked fine, however, there seems to be something missing in Ericks
proposed command to delete the divert. Maybe this is the cause for his
problems with gdm afterwards.

Here's what worked for me:

Set the divert:

# dpkg-divert --local --rename --add /sbin/initctl
# ln -s /bin/true /sbin/initctl

Remove the divert:

# rm /sbin/initctl
# dpkg-divert --local --rename --remove /sbin/initctl

Note the added '--rename' option that was missing in Ericks post.
Without this, dpkg-divert says it removed the divert, however,
/sbin/initctl.distrib is not renamed back to the original initctl
command. Which in consequence breaks all services.

Took me a while to find out why my headless remote system got stuck at boot ;-)
Hope this is of help to someone, since the underlying problem seems to persist.

Cheerz, Martin.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-08-17 Thread Rolf Leggewie
I've opened bug 826544 against update-manager to propose that
hardy-lucid updates should currently not happen until this ticket is
properly resolved. (I guess I should add that the ticket clearly states
that hardy-lucid updates are fine as long as it does not involve an
update in a chroot/vserver type of situation)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-08-17 Thread Rolf Leggewie
I've opened bug 826544 against update-manager to propose that
hardy-lucid updates should currently not happen until this ticket is
properly resolved.

It's great to hear that OpenVZ, LXC, Virtuozzo and whatnot hosts are not
affected (if that is indeed the case).  I don't know what my hoster is
running and I shouldn't have to.  From some of the messages I exchanged
with the owner I'd venture to guess that he is running linux-
vserver.org.  FWIW.  I've had plans to replicate that setup locally, but
never got around to it.

So, where are we?  It seems that Clint's efforts to backport upstart
have lately stalled.  And unless I am mistaken that was about fixing the
host side of things anyhow.  Upstart-dummy was put forward as a possible
workaround.  I've read the page a few times but I'm not yet sure I fully
understand the necessary steps.  I'd actually like to see that script
packaged so that things are easier to replicate on different machines.
I'm not much of a wizzard when it comes to packaging python, so I'd
appreciate some collaboration for further evaluation.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 430224] Re: init: support chroots

2011-07-18 Thread Simon Déziel
On 07/17/2011 12:52 PM, Clint Byrum wrote:
 Excerpts from Rolf Leggewie's message of Sun Jul 17 14:47:43 UTC 2011:
 My apologies for keeping on mixing up hardy and dapper.  I appreciate
 your work, but if you look at comment 27 and my situation it may not be
 enough.

 I am running a vserver on some hosting service out there (I actually
 have no idea what OS they use for the host).  I am running hardy and
 think time has come to upgrade to lucid.  I go through the motions which
 include a reboot and boom, without warning I am COMPLETELY shut off from
 my vserver.  ssh does not come up because it relies on a working
 upstart.  People lucky enough not to have upgraded yet from hardy are
 currently left without any upgrade path at all and without a warning of
 the potential upstart trouble.

 Steve and Daniel warned about potential problems very early on, almost
 two years ago, but it seems that interest in investigating them
 thoroughly was bypassed in favor of pushing upstart out the door.
 That's the beef I have with it.

 If thanks to your efforts we see a backport of a working upstart to
 lucid then I think some code changes should be pushed to hardy as well
 (probably into upstart-manager) that will refuse an update hardy-lucid
 when running inside a vserver/chroot when that PPA-solution you provide
 is not available (Please enable PPA XY before continuing with the
 release update to lucid!)

 
 AHH..
 
 I think actually the upstart-dummy program might actually work for
 you. I've talked to the author about patching and maintaining it.. but
 never knew if there was a good enough reason to do so.
 
 It wouldn't be perfect, but it might work for this situation.
 
 Until then, I believe OpenVZ and LXC work fine for providing lucid
 and later.

I run many Lucid containers based on OpenVZ and Virtuozzo with great
success. The only problem regarding SSH is discussed in LP: 634900. The
fix to this problem is basically to comment the oom never line in
/etc/init/ssh.conf.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-07-17 Thread Rolf Leggewie
Clynt, thank you for taking this up.

My point is essentially the same as was raised by Lukas in comment 27.
We need to be sure that a lucid guest will work no matter the host OS.
I'm not opposed to a PPA workaround but IMHO some code should be added
probably to dapper somewhere to make sure that if it's detected that
dapper is running inside a chroot/vserver an update to lucid is not
performed without that PPA workaround.  Or else the user will run into
the situation where the vserver is completely unreachable because ssh is
down (happened to me, booh!).

I will have to say that I'm a bit disappointed this wasn't taken into
account seriously much earlier.  The warnings were there early enough.

Your PPA was building packages for natty right?  I'm not sure what
direction it is you're taking there, but I'm sure you will let me know.
Are you trying to fix the host side?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-07-17 Thread Rolf Leggewie
I see you also attempted to build lucid packages, I guess they were
added after I went to bed last night.  None of the packages built
successfully, though.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 430224] Re: init: support chroots

2011-07-17 Thread Clint Byrum
Excerpts from Rolf Leggewie's message of Sun Jul 17 09:09:58 UTC 2011:
 Clynt, thank you for taking this up.
 
 My point is essentially the same as was raised by Lukas in comment 27.
 We need to be sure that a lucid guest will work no matter the host OS.
 I'm not opposed to a PPA workaround but IMHO some code should be added
 probably to dapper somewhere to make sure that if it's detected that
 dapper is running inside a chroot/vserver an update to lucid is not
 performed without that PPA workaround.  Or else the user will run into
 the situation where the vserver is completely unreachable because ssh is
 down (happened to me, booh!).
 
 I will have to say that I'm a bit disappointed this wasn't taken into
 account seriously much earlier.  The warnings were there early enough.
 
 Your PPA was building packages for natty right?  I'm not sure what
 direction it is you're taking there, but I'm sure you will let me know.
 Are you trying to fix the host side?

I want to provide a chroot-capable upstart for all relevant versions
of Ubuntu, namely maverick and lucid (natty has chroot support). Hardy
isn't going to happen, as, while it has upstart, that version of upstart
is incompatible with the versions in 10.04 and later. That does mean that
you won't be able to use Hardy to host chroots for anything after it. For
that, you might want to look into the upstart-dummy program here:

http://blogs.balabit.com/2011/01/21/using-upstart-in-a-chroot/

We test what we can, and respond to what is raised. Sometimes the rapid
pace of development causes a situation like this, where a fundamental
change is made and users only have 1 cycle to test it out (IIRC, ssh was
moved to upstart in 9.10). This situation is at least going to be handled
in 12.04, so you should be safe in waiting for it, and then leap frogging
to it by upgrading to 10.04 first (sorry not sure if your ssh will work)
and then to 12.04.

So right now, I'd suggest running tests in 11.04, to make sure we actually
solved your problem and don't just think we did.

Anyway, the PPA is still empty because the packages haven't been able
to build yet, but I'll keep working on it.. watch the PPA and here
for updates.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-07-17 Thread Rolf Leggewie
My apologies for keeping on mixing up hardy and dapper.  I appreciate
your work, but if you look at comment 27 and my situation it may not be
enough.

I am running a vserver on some hosting service out there (I actually
have no idea what OS they use for the host).  I am running hardy and
think time has come to upgrade to lucid.  I go through the motions which
include a reboot and boom, without warning I am COMPLETELY shut off from
my vserver.  ssh does not come up because it relies on a working
upstart.  People lucky enough not to have upgraded yet from hardy are
currently left without any upgrade path at all and without a warning of
the potential upstart trouble.

Steve and Daniel warned about potential problems very early on, almost
two years ago, but it seems that interest in investigating them
thoroughly was bypassed in favor of pushing upstart out the door.
That's the beef I have with it.

If thanks to your efforts we see a backport of a working upstart to
lucid then I think some code changes should be pushed to hardy as well
(probably into upstart-manager) that will refuse an update hardy-lucid
when running inside a vserver/chroot when that PPA-solution you provide
is not available (Please enable PPA XY before continuing with the
release update to lucid!)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-07-17 Thread Rolf Leggewie
When we talk about releases we need to carefully differentiate whether
we talk about host or guest.  I'm usually more concerned about the guest
side of things.  If you have control over the host your options are
obviosly much better.  Although thinking about it, it's not really
pretty, either, I guess.  Because if I understand the comments here
correctly then none of the currently available LTS are candidates for
hosting a bunch of vservers because of problems with upstart.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 430224] Re: init: support chroots

2011-07-17 Thread Clint Byrum
Excerpts from Rolf Leggewie's message of Sun Jul 17 14:47:43 UTC 2011:
 My apologies for keeping on mixing up hardy and dapper.  I appreciate
 your work, but if you look at comment 27 and my situation it may not be
 enough.
 
 I am running a vserver on some hosting service out there (I actually
 have no idea what OS they use for the host).  I am running hardy and
 think time has come to upgrade to lucid.  I go through the motions which
 include a reboot and boom, without warning I am COMPLETELY shut off from
 my vserver.  ssh does not come up because it relies on a working
 upstart.  People lucky enough not to have upgraded yet from hardy are
 currently left without any upgrade path at all and without a warning of
 the potential upstart trouble.
 
 Steve and Daniel warned about potential problems very early on, almost
 two years ago, but it seems that interest in investigating them
 thoroughly was bypassed in favor of pushing upstart out the door.
 That's the beef I have with it.
 
 If thanks to your efforts we see a backport of a working upstart to
 lucid then I think some code changes should be pushed to hardy as well
 (probably into upstart-manager) that will refuse an update hardy-lucid
 when running inside a vserver/chroot when that PPA-solution you provide
 is not available (Please enable PPA XY before continuing with the
 release update to lucid!)
 

AHH..

I think actually the upstart-dummy program might actually work for
you. I've talked to the author about patching and maintaining it.. but
never knew if there was a good enough reason to do so.

It wouldn't be perfect, but it might work for this situation.

Until then, I believe OpenVZ and LXC work fine for providing lucid
and later.  Maybe look into a provider that uses containers like that,
rather than just chroot jails. You get the added benefit of network
isolation. For the provider there is really no additional cost other
than running an extra init for each container. Thats an extra 24k or so.

As far as stopping update-manager from upgrading.. thats not a bad idea
at all. Is that already proposed as a bug somewhere else?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-06-27 Thread Rolf Leggewie
OK

What can we do about lucid?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-06-17 Thread James Hunt
Chroot support is now available in Upstart 1.3.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-06-17 Thread Rolf Leggewie
Thank you, James.  Does this ticket need to be reopened for oneiric?
1.3 has not yet been released to any Ubuntu series.  I'm surprised
things seem to be working for Clynt.  Are you running a self-compiled
package?

Does the host or the guest need to have upstart = 1.3?  I suppose it's
for the host in which case I really think we need some kind of a
backport, even to lucid-updates.  All hardy hosts on a vserver currently
have no working upgrade path.

** Changed in: upstart (Ubuntu)
   Status: Fix Released = In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-06-17 Thread Clint Byrum
Its already available in Natty and Oneiric. It was made as an Ubuntu-
specific patch for 0.9.x.

** Changed in: upstart (Ubuntu)
   Status: In Progress = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-06-16 Thread James Hunt
** Changed in: upstart
   Status: In Progress = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-06-16 Thread Rolf Leggewie
James, thank you for working on this.  Can you please leave a short
comment how this was fixed and when it's due to hit Ubuntu?  Are we
going to see a backport of the fix?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-06-16 Thread Clint Byrum
Rolf, this is actually available in natty.

I'm not entirely certain of the mechanics thus far, but I know that
schroot takes advantage of it perfectly. You can see how it works by
setting up an sbuild environment and then schrooting in, and installing
mysql. It will install mysql, and start the upstart job *inside* the
chroot.

Marking Fix Released in the Ubuntu task.

** Changed in: upstart (Ubuntu)
   Status: Invalid = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-05-05 Thread Rolf Leggewie
This breakage is really another major nuisance that upstart creates.
Booh!  I waited for a while before updating my vserver to lucid assuming
that the wrinkles would be ironed out by now only to find that the
system is now completely unusable (not even ssh will start).

Colin, will that code need to run on the host or guest?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-05-05 Thread Rolf Leggewie
Would it be possible to see something similar to what Peter proposed in
comment 35 available as a package (officially if at all possible)?  Not
being able to use the latest LTS as a vserver is a very terrible joke.
I'd even be willing to help with the packaging.  Peter, are you taking
the bait?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-05-05 Thread Peter Gyongyosi
Rolf, my solution is more a hack than a real solution -- it works fine
in the very controlled environment I'm using but even I wouldn't
recommend adding it officially to any distribution. The way I'd go is to
backport the new upstart that is said to include support for chroots
(it'll be need to be installed in the guests). I plan to play around
with it in the upcoming weeks if I have the time and report back about
my results.

Scott, are there any plans to officially backport a newer upstart (that
has support for chroots) to Lucid? Are there any incompatible changes
that'd make it more difficult than just compiling  packaging it?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-05-05 Thread Clint Byrum
The new upstart has a lot of other things that make it a little too
invasive for lucid-backports. Certainly we can create a PPA for it
though.

Peter, would it be that hard to make upstart-dummy work for 99% of cases
with a little bit of TLC development? I feel a bit silly as I just
posted on your blog before reading this comment. ;)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-05-05 Thread gyp
Clint, the honest answer is that I don't know :) The problem is that
it's really just a bring-me-back-my-good-old-system-V-init type of hack,
and any boot process that truly relies on upstart doing its more
advanced things (handling dependencies, using triggers, restarting
failed services etc.) would fail miserably. I could manually check and
fix all the ~15 services that are started this way in my case, but I'm
not sure it's what people want to do. However, the good news is that in
my case, none of the initscripts had to be modified, but I was not
comfortable until I've manually checked all of them.

That being said, if you took a look at what it does and as a someone
having deeper knowledge of the ubuntu boot process think that it could
work for others, too, I guess it could be at least something for the
guys trying to run lucid in a chroot instead of the current well, it's
not working state of things.

Regarding your question on my blog (sorry, the commenting system there's
a mess, I haven't looked at it since the web guys moved it to wordpress,
I tried to fix things now) about bringing it to Launchpad: of course,
feel free to do that. It indeed does not have a bug tracker or anything
as I did not mean it to be a proper released product but just something
I could give back to the FOSS community. And I'm happy to handle bug
entries and fix small issues as they come up, so you can count me as an
active developer base :)  There's one thing though: it relies heavily on
having an additional feature in start-stop-daemon, so that'd need to be
added to that, too. I've sent the patch for it in to the dpkg devs, but
the guys there were a bit reluctant to include it upstream as they
thought it could allow for even more nasty hacks :) That discussion can
be found here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610719


** Bug watch added: Debian Bug tracker #610719
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610719

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-03-11 Thread Scott James Remnant
** Changed in: upstart
   Status: Triaged = In Progress

** Changed in: upstart
 Assignee: (unassigned) = James Hunt (jamesodhunt)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2011-01-21 Thread Peter Gyongyosi
We've been hit by this, too and managed to create a workaround that
requires no changes in the initscripts of the services and still allows
starting them the traditional way in a Lucid-based chroot. See the
(quite long) description of or problems and our solution in this blog
post: http://gyp.blogs.balabit.com/2011/01/using-upstart-in-a-chroot/

To quote the most important part:

Thus we wrote “upstart-dummy“, an almost-drop-in replacement for
Upstart. It’s a Python script that can be put in place of the standard
Upstart installation in /sbin/initctl. The commands “start”, “stop”,
“restart”, “reload” and “status” are symlinked to /sbin/initctl by
default and this script is able handle it when it is called through
these symlinks. It tries to find the appropriate config file for the
service, parse it and run the necessary commands, including pre-start,
post-stop etc. scripts that can be found in them. What it cannot do
though, and this is why it’s not a complete replacement, is to work as
proper standalone init process: it is not able to figure out the
dependencies and does not know what services it needs to start on a
certain runlevel. But if you’re using it on a system that kept the
System V init compatibility layer (and Lucid is one of them), all you
need to do is to re-add the symlinks in “/etc/rc*.d” to “/etc/init.d/“,
which will be a symlink to “/lib/init/upstart-job“, which will call this
fake Upstart daemon, which will, this time, indeed work in a chroot.
After this, you can simply start “/etc/init.d/rcS” and “/etc/init.d/rc
2” (which are still there in a stock Lucid) which will boot the chrooted
system properly.

It might not be suitable for everyone but it did the job for us.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 430224] Re: init: support chroots

2011-01-21 Thread Colin Watson
Code to support chroot sessions has been written (lp:~canonical-
scott/upstart/session-support), and will hopefully land in the not too
distant future.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2010-11-09 Thread hubert depesz lubaczewski
I have setup where I put clients in chroots, each client has it's own
chroot. has been running on jaunty, and everything was great.

Now I upgraded one chroot to lucid, and I can't start services in client
chroot:

[chroot] # /etc/init.d/atd start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service atd start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start atd
start: Unable to connect to Upstart: Failed to connect to socket 
/com/ubuntu/upstart: Connection refused

[chroot] # start atd
start: Unable to connect to Upstart: Failed to connect to socket 
/com/ubuntu/upstart: Connection refused

While all talk about future enhancements is great - what I can do *now*
to get the atd/crond/others to run in the chroot?

-- 
init: support chroots
https://bugs.launchpad.net/bugs/430224
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2010-10-28 Thread Nico Stöckigt
if you are not able to make the mounts like described above try it like
when using a Live-CD:

# sudo mount -o bind /dev /mnt/dev
# sudo mount -o bind /sys /mnt/sys
# sudo mount -t proc /proc /mnt/proc
# sudo cp /mnt/proc/mounts /mnt/etc/mtab
# sudo chroot /mnt /bin/bash

see also: http://wiki.ubuntuusers.de/chroot/Live-CD

hopefully you might recover things now...

-- 
init: support chroots
https://bugs.launchpad.net/bugs/430224
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2010-09-16 Thread kenorb
The same problem.
I need to run some service in chroot.
I've done:
mount -R /dev /mnt/dev
mount -R /proc /mnt/proc
mount -R /var/run /mnt/var/run
mkdir -m 777 /var/run/mysqld
chroot /mnt
Everything works fine, but still can't figure out how to run simple service!
Why /etc/init.d/mysql start doesn't work anymore?

Similar issues:
http://newyork.ubuntuforums.org/showthread.php?t=1506533page=2

Workaround is to run it manually:
mysqld --user mysql

-- 
init: support chroots
https://bugs.launchpad.net/bugs/430224
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2010-07-29 Thread Liraz
This really is a major pain for system builders. Had to work around this
problem today to allow TKLPatch to work with Lucid. My approach was to
temporarily lobotomize upstart, replacing it with a shell script that
reproduces the sysvinit functionality in the old init scripts:

http://github.com/turnkeylinux/tklpatch/commit/a2bd433ed9483b5faaa631098eb372eecc0e4f12

This way we can run start and stop mysql normally inside chroot. It's
a hack, but if we need we can extend this approach to other services as
well. Maybe someone else will find the approach useful.

Other server services which are known to use upstart in Lucid are samba,
vsftpd, squid. But I think for tklpatch we only need the ability to
start mysql within the chroot (e.g., to manipulate the databases).

If upstart can't support chrooted services out of the box, it would be
nice if it was at least configurable (e.g., via an environment variable)
so you could enable a workaround of some kind for when you actually do
need to start/stop services inside chroot. I don't see why you couldn't
bypass communication with the supervision god-process over dbus and just
execute the initialization hooks directly. You know, the way we've been
doing it with sysvinit forever...

That way you get all the wiz bang async service management stuff while
still allowing services to work when you don't need/want it.

-- 
init: support chroots
https://bugs.launchpad.net/bugs/430224
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2010-06-30 Thread Josef Johansson
I followed http://linux-vserver.org/Upstart_issues regarding this
problem in connection with VServer and upstart. It fixed it.

I don't know if this sheds any light over a possible way to do things,
but I hope so :)

Regards

-- 
init: support chroots
https://bugs.launchpad.net/bugs/430224
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2010-06-30 Thread Josef Johansson
Fixed it for mysql /apache that I installed anyhow.. not for deactivating swap 
and what not. 
so I could do stop/start mysql , but it still gets connection refused when the 
vserver shuts down.
Oh well.

-- 
init: support chroots
https://bugs.launchpad.net/bugs/430224
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2010-06-16 Thread zimbatm
When chrooting on a broken system, I'd like at least to have a way to
start the services manually. I don't care about supervision. Just that,
for example, mysqld is started with the system defaults so that I can
check it's state.

What about adding an option: `start --chroot service_name` where the
service would be run with the /etc/defaults/service-name , but that
would not fork/background.

-- 
init: support chroots
https://bugs.launchpad.net/bugs/430224
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2010-05-10 Thread Lukas Kolbe
Using a global upstart instance to manage the chroot wouldn't work -
simply because you want to be able to run a Ubuntu chroot from a Debian
Lenny host, or a RHEL host, or whatever. (We actually serve a Lucid
netboot nfs-root from Debian Etch atm). You can't expect every linux
distribution in the world to use upstart.

Just a hint to keep that in mind when fixing this bug, please.

-- 
init: support chroots
https://bugs.launchpad.net/bugs/430224
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 430224] Re: init: support chroots

2010-04-07 Thread Scott James Remnant
Moved this to be an Upstream bug.

I think that the most probably implementation will be that you declare
chroots in /etc/init.conf that you wish the init daemon to manage.  init
will then also look in CHROOT/etc/init for jobs, and record these as
belonging to that chroot.  All actions on these jobs will first result
in the chroot() to the right location.

To figure out still is how to make sure that start apache within a
chroot, starts the apache within the chroot and not the one outside.

It makes sense that initctl list only shows the jobs in your chroot
(or the real system).

The difficult bit is going to be dealing with things like events; I
think logically events are global (you can only have one udev running) -
but this means that started apache is an event - and that means
chroots won't necessarily work right?

** Summary changed:

- misc: packages cannot be upgraded in a chroot
+ init: support chroots

** Also affects: upstart
   Importance: Undecided
   Status: New

** Changed in: upstart
   Status: New = Triaged

** Changed in: upstart
   Importance: Undecided = Wishlist

** Changed in: upstart (Ubuntu)
   Status: Confirmed = Invalid

-- 
init: support chroots
https://bugs.launchpad.net/bugs/430224
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs