local provider should use cloud images

Bug #915520 reported by Nick Barcet
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pyjuju
Fix Released
High
Clint Byrum

Bug Description

Update: The underlying issue here is that the local provider/lxc should be using cloud images instead of the minimal debootstrap we're getting with lxc.

juju on oneiric with lxc provider

Any time I invoke a command that uses perl in a unit, I receive the following errors:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Tags: local

Related branches

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Seems like this is a documentation bug. We should make it clear what the user can and cannot expect from the environment. I'd rather do that than get heavy handed about the container creation.

The other option is to make an LXC template that uses the Ubuntu cloud images. But that would then put bare metal installs as the second class citizen to LXC and EC2, so I think its better to simply document this and fix bugs as they come up. If you need a locale, you probably need a package which provides one, or a config option to configure it.

Changed in juju:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Scott Moser (smoser) wrote : Re: [Bug 915520] Re: locale is not set on lxc containers

On Mon, 23 Jan 2012, Clint Byrum wrote:

> The other option is to make an LXC template that uses the Ubuntu cloud
> images. But that would then put bare metal installs as the second class
> citizen to LXC and EC2, so I think its better to simply document this
> and fix bugs as they come up. If you need a locale, you probably need a
> package which provides one, or a config option to configure it.

I don't follow that statement.
At the moment, LXC would be the "second class citizen". bare metal (via
cobbler/orchestra) and EC2 will have a sane locale set. So setting one in
lxc would put it on equal footing.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Excerpts from Scott Moser's message of Mon Jan 23 18:37:49 UTC 2012:
> On Mon, 23 Jan 2012, Clint Byrum wrote:
>
> > The other option is to make an LXC template that uses the Ubuntu cloud
> > images. But that would then put bare metal installs as the second class
> > citizen to LXC and EC2, so I think its better to simply document this
> > and fix bugs as they come up. If you need a locale, you probably need a
> > package which provides one, or a config option to configure it.
>
> I don't follow that statement.
> At the moment, LXC would be the "second class citizen". bare metal (via
> cobbler/orchestra) and EC2 will have a sane locale set. So setting one in
> lxc would put it on equal footing.
>

I mean in a broader sense, not in this particular bug.

If we fix *this* in LXC by using the cloud images, then EC2 and Orchestra
are using the same source, which is great, but it also means that
providers that can't use the cloud images become more prone to problems.

In many ways, using the minimal install of Ubuntu will help to make the
charms more robust to changes in the default seeds of the cloud images
because people will need to document *everything* they need, since they
can really only count on having juju and the minimal Ubuntu install.

Revision history for this message
Scott Moser (smoser) wrote :

On Mon, 23 Jan 2012, Clint Byrum wrote:

> In many ways, using the minimal install of Ubuntu will help to make the
> charms more robust to changes in the default seeds of the cloud images
> because people will need to document *everything* they need, since they
> can really only count on having juju and the minimal Ubuntu install.

This is true, but assuming a sane set of packages is reasonable and
desirable. Such a simplification is made all over ubuntu.
Having an absolute minimal install is just going to result in fighting
random issues that are fixed if you take the more common path.

my personal feeling is that the 'lxc create -t ubuntu' is unreasonably
small, which will only cause long term loss of developer time chasing "it
doesn't work on lxc" bugs.

One should at least be able to assume anything in server^ task set.
Can a charm even expect 'essential' packages?

tags: added: local
Changed in juju:
milestone: none → florence
summary: - locale is not set on lxc containers
+ local provider should use cloud images
description: updated
Changed in juju:
importance: Medium → High
Revision history for this message
Patrick Hetu (patrick-hetu) wrote :

I really think this would be a great feature. Using Ubuntu's qcow2 images mounted via nbd devices would make instances creation
extremely fast and will use a lot less disk space.

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

is there a way for us to install the server task set into the container? we're primarily cloning a template container when creating units, so the amortized cost is fairly small albeit at the cost of more time waiting for the first unit (while the template container is created).

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

This appears to do the trick..

sudo apt-get install tasksel && tasksel --task-packages cloud-image | xargs sudo apt-get install

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

from smoser on juju ml ->

  For what its worth, there is now:
     lxc-create -t ubuntu-cloud
  which should do most of your work for you.

  You can pass '--userdata' to get your juju cloud-init user data run.

  This will only work for precise and oneiric systems, but I think thats
  probably enough for you.

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

switching out to the cloud template appears like it will be too disruptive at this point, although a useful change. It would drop our custom shell scripts and libvirt usage as the it would standardize on cloud-init and builtin lxc capabilities, but it would also entail breakage for existing local environments and require some additional testing time.. fwiw.. there's a wip lp:~hazmat/juju/local-cloud-img but i think its post precise atm.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Agreed Kapil.. seems like this will require some refactoring to make work right, and would be a good thing to target at the "galapagos" series, so I've moved it to that.

Changed in juju:
milestone: florence → galapagos
Changed in juju:
milestone: galapagos → honolulu
Changed in juju:
milestone: 0.6 → 0.7
status: Confirmed → In Progress
assignee: nobody → Clint Byrum (clint-fewbar)
Changed in juju:
milestone: 0.7 → 0.6
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.