Re: LXD bootstrap inside KVM failed

2017-08-15 Thread John Meinel
If you set up a space in MAAS and you declare that the VM is in that space,
then when you deploy something into a container, MAAS and Juju will
coordinate to get a Container set up onto a bridge connected to the
interface in the VM that is connected to the same space, with an IP address
from the range you declared in MAAS for that space and subnet. This also
scales to support multiple interfaces in different spaces, and however many
containers you request.
The only reason you end up private, is because you probably haven't
actually asked to be anywhere else. (Note this works the same for a machine
that is actually a VM as for a physical machine.)

John
=:->


On Tue, Aug 8, 2017 at 2:06 PM, Muhammad Yousuf Khan 
wrote:

> Thank you very much for the understanding right Mark. yes you are connect
> i was doing that however on your advice i manage to install it on new VM
> now one step is clear. but the problem is i notice. LXD is creating its own
> subnet and hide the guest behind the NAT. now the problem is how can LAN
> computers see LXD containers behind NAT. can't we use it the way we use it
> in bridge style. where it get the IP from LAN DHCP? instead of hiding
> behind NAT?
>
> in the context of same case. the whole idea deploying services like mysql,
> kyenotes any others will be fail as all the services will be behind NAT how
> come openstack services will integrate each other.
>
> Any knowledge sharing and tip will be highly appreciated.
> Thank,
> MYK
>
>
>
> On Tue, Aug 8, 2017 at 1:07 PM, Mark Shuttleworth  wrote:
>
>> On 08/08/17 08:31, Ante Karamatić wrote:
>>
>> If you want to run LXD on the same host where bind is running, you just
>> have to configure bind to *not* listen on LXD network:
>>
>> https://www.cyberciti.biz/faq/unix-linux-bsd-bind-dns-listen
>> on-configuration/
>>
>> uto, 8. kol 2017. 09:04 Muhammad Yousuf Khan  je
>> napisao:
>>
>>> Thanks for the update Ante. but since MAAS also used Bind for its own
>>> DNS resolution. how come one can use juju or lxd in absence of bind.
>>> any tip will be highly appreciated.
>>>
>>> Thanks,
>>> MYK
>>>
>>
>> MYK, if I understand your problem, you are running a MAAS controller on
>> the VM (which means bind is running) and you want to bootstrap a LXD
>> localhost Juju controller on that same machine. The question is why you
>> need to bootstrap a local Juju on a MAAS controller?
>>
>> As Ante says, you can configure the MAAS bind to avoid grabbing the lxd
>> network interfaces, which ill allow LXD's dnsmasq to work alongside bind
>> (because bind is focused on the main network interfaces, and dnsmasq is
>> grabbing the lxd network interfaces). But that's fiddly, you would need to
>> look carefully over the bind config files and make sure you don't
>> inadvertently break MAAS. If you are not familiar with bind configuration,
>> I don't recommend this approach.
>>
>> The easy answer is just to create a separate VM that points resolv.conf
>> at the MAAS DNS server, and bootstrap Juju locally in that VM. You can even
>> IIRC use MAAS to create that new VM, using the 'pod' functionality in 2.2.
>>
>> Mark
>>
>
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: LXD bootstrap inside KVM failed

2017-08-08 Thread Muhammad Yousuf Khan
Thanks Alot mark for sharing your though i appreciate help from everyone in
this forum. btw i am not the geek but i think i did it. for me below trick
is working. Being part of the community i believe in sharing. i did it like
this.

on a system other then MAAS (Member of MAAS ofcourse)

- ssh to the host.

- install pkg bridge-utils.

- sudo nano /etc/network/interfaces

(my default interface file )
auto lo
iface lo inet loopback
dns-nameservers 10.x.x.10
dns-search maas

auto enp0s25
iface enp0s25 inet static
   gateway 10.x.x.1
   address 10.x.x.166/24
   mtu 1500
auto enp3s0
iface enp3s0 inet manual
mtu 1500

(My interface file after making changes)
auto lo
iface lo inet loopback
dns-nameservers 10.x.x.10
dns-search maas

auto enp0s25
#iface enp0s25 inet static
#   gateway 10.x.x.1
#   address 10.x.x.166/24
#   mtu 1500
auto br0
iface br0 inet static
gateway 10.x.x.1
address 10.x.x.166/24
bridge-ifaces enp0s25
bridge-ports enp0s25
up ifconfig enp0s25 up
iface enp0s25 inet manual


auto enp3s0
iface enp3s0 inet manual
mtu 1500



( at this point bring up your bridge interface br0)
and also "sudo passwd ubuntu" because there are changes that you may loose
the ssh via MAAS due to change in ip so that you can access the machine via
console monitor.

( next )

- install pkg lxc
- sed -i 's/lxc.network.link = lxcbr0/lxc.network.link = br0/'
/etc/lxc/default.conf
( this command use to change the bridge interface name in lxc file)

- lxc profile edit default

thats all. i can now access juju GUI. i belive this process should be
followed on every machine that you wana bridge to LAN. not just for JUJU
bootstramp.

for more details please visit this link

https://insights.ubuntu.com/2015/11/10/converting-eth0-to-br0-and-getting-all-your-lxc-or-lxd-onto-your-lan/


now juju bootstrap
you will see it will bind the IP from your LAN. :) hope this help someone.

Thanks,
MYK








On Tue, Aug 8, 2017 at 4:03 PM, Mark Shuttleworth  wrote:

>
> Well, everything you want to do here is cleanly possible with MAAS, Juju
> and LXD, but you will need to dig into the tools and understand how the
> model in Juju describes machines and networking.
>
> Last, there is a particular set of gotchas around networking (which as you
> point out is the tricky part in general) with containers. This is a
> development focus in Juju currently and we hope to have a crisp "just
> works" story for MAAS and some public clouds by 2.3.0. Till then you will
> need to be something of an expert, but if you figure that out, it's amazing
> what is possible.
>
> Mark
>
>
> On 08/08/17 11:06, Muhammad Yousuf Khan wrote:
>
> Thank you very much for the understanding right Mark. yes you are connect
> i was doing that however on your advice i manage to install it on new VM
> now one step is clear. but the problem is i notice. LXD is creating its own
> subnet and hide the guest behind the NAT. now the problem is how can LAN
> computers see LXD containers behind NAT. can't we use it the way we use it
> in bridge style. where it get the IP from LAN DHCP? instead of hiding
> behind NAT?
>
> in the context of same case. the whole idea deploying services like mysql,
> kyenotes any others will be fail as all the services will be behind NAT how
> come openstack services will integrate each other.
>
> Any knowledge sharing and tip will be highly appreciated.
> Thank,
> MYK
>
>
>
> On Tue, Aug 8, 2017 at 1:07 PM, Mark Shuttleworth  wrote:
>
>> On 08/08/17 08:31, Ante Karamatić wrote:
>>
>> If you want to run LXD on the same host where bind is running, you just
>> have to configure bind to *not* listen on LXD network:
>>
>> https://www.cyberciti.biz/faq/unix-linux-bsd-bind-dns-listen
>> on-configuration/
>>
>> uto, 8. kol 2017. 09:04 Muhammad Yousuf Khan  je
>> napisao:
>>
>>> Thanks for the update Ante. but since MAAS also used Bind for its own
>>> DNS resolution. how come one can use juju or lxd in absence of bind.
>>> any tip will be highly appreciated.
>>>
>>> Thanks,
>>> MYK
>>>
>>
>> MYK, if I understand your problem, you are running a MAAS controller on
>> the VM (which means bind is running) and you want to bootstrap a LXD
>> localhost Juju controller on that same machine. The question is why you
>> need to bootstrap a local Juju on a MAAS controller?
>>
>> As Ante says, you can configure the MAAS bind to avoid grabbing the lxd
>> network interfaces, which ill allow LXD's dnsmasq to work alongside bind
>> (because bind is focused on the main network interfaces, and dnsmasq is
>> grabbing the lxd network interfaces). But that's fiddly, you would need to
>> look carefully over the bind config files and make sure you don't
>> inadvertently break MAAS. If you are not familiar with bind configuration,
>> I don't recommend this approach.
>>
>> The easy answer is just to create a separate VM that points resolv.conf
>> at the MAAS DNS server, and bootstrap Juju locally in that VM. You can even
>> IIRC use MAAS to create th

Re: LXD bootstrap inside KVM failed

2017-08-08 Thread Mark Shuttleworth

Well, everything you want to do here is cleanly possible with MAAS, Juju
and LXD, but you will need to dig into the tools and understand how the
model in Juju describes machines and networking.

Last, there is a particular set of gotchas around networking (which as
you point out is the tricky part in general) with containers. This is a
development focus in Juju currently and we hope to have a crisp "just
works" story for MAAS and some public clouds by 2.3.0. Till then you
will need to be something of an expert, but if you figure that out, it's
amazing what is possible.

Mark

On 08/08/17 11:06, Muhammad Yousuf Khan wrote:
> Thank you very much for the understanding right Mark. yes you are
> connect i was doing that however on your advice i manage to install it
> on new VM now one step is clear. but the problem is i notice. LXD is
> creating its own subnet and hide the guest behind the NAT. now the
> problem is how can LAN computers see LXD containers behind NAT. can't
> we use it the way we use it in bridge style. where it get the IP from
> LAN DHCP? instead of hiding behind NAT?
>
> in the context of same case. the whole idea deploying services like
> mysql, kyenotes any others will be fail as all the services will be
> behind NAT how come openstack services will integrate each other.
>
> Any knowledge sharing and tip will be highly appreciated.
> Thank,
> MYK
>
>
>
> On Tue, Aug 8, 2017 at 1:07 PM, Mark Shuttleworth  > wrote:
>
> On 08/08/17 08:31, Ante Karamatić wrote:
>> If you want to run LXD on the same host where bind is running,
>> you just have to configure bind to *not* listen on LXD network:
>>
>> 
>> https://www.cyberciti.biz/faq/unix-linux-bsd-bind-dns-listenon-configuration/
>> 
>> 
>>
>> uto, 8. kol 2017. 09:04 Muhammad Yousuf Khan > > je napisao:
>>
>> Thanks for the update Ante. but since MAAS also used Bind for
>> its own DNS resolution. how come one can use juju or lxd in
>> absence of bind. 
>> any tip will be highly appreciated.
>>
>> Thanks,
>> MYK
>>
>
> MYK, if I understand your problem, you are running a MAAS
> controller on the VM (which means bind is running) and you want to
> bootstrap a LXD localhost Juju controller on that same machine.
> The question is why you need to bootstrap a local Juju on a MAAS
> controller?
>
> As Ante says, you can configure the MAAS bind to avoid grabbing
> the lxd network interfaces, which ill allow LXD's dnsmasq to work
> alongside bind (because bind is focused on the main network
> interfaces, and dnsmasq is grabbing the lxd network interfaces).
> But that's fiddly, you would need to look carefully over the bind
> config files and make sure you don't inadvertently break MAAS. If
> you are not familiar with bind configuration, I don't recommend
> this approach.
>
> The easy answer is just to create a separate VM that points
> resolv.conf at the MAAS DNS server, and bootstrap Juju locally in
> that VM. You can even IIRC use MAAS to create that new VM, using
> the 'pod' functionality in 2.2.
>
> Mark
>
>

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


Re: LXD bootstrap inside KVM failed

2017-08-08 Thread Muhammad Yousuf Khan
Thank you very much for the understanding right Mark. yes you are connect i
was doing that however on your advice i manage to install it on new VM now
one step is clear. but the problem is i notice. LXD is creating its own
subnet and hide the guest behind the NAT. now the problem is how can LAN
computers see LXD containers behind NAT. can't we use it the way we use it
in bridge style. where it get the IP from LAN DHCP? instead of hiding
behind NAT?

in the context of same case. the whole idea deploying services like mysql,
kyenotes any others will be fail as all the services will be behind NAT how
come openstack services will integrate each other.

Any knowledge sharing and tip will be highly appreciated.
Thank,
MYK



On Tue, Aug 8, 2017 at 1:07 PM, Mark Shuttleworth  wrote:

> On 08/08/17 08:31, Ante Karamatić wrote:
>
> If you want to run LXD on the same host where bind is running, you just
> have to configure bind to *not* listen on LXD network:
>
> https://www.cyberciti.biz/faq/unix-linux-bsd-bind-dns-
> listenon-configuration/
>
> uto, 8. kol 2017. 09:04 Muhammad Yousuf Khan  je
> napisao:
>
>> Thanks for the update Ante. but since MAAS also used Bind for its own DNS
>> resolution. how come one can use juju or lxd in absence of bind.
>> any tip will be highly appreciated.
>>
>> Thanks,
>> MYK
>>
>
> MYK, if I understand your problem, you are running a MAAS controller on
> the VM (which means bind is running) and you want to bootstrap a LXD
> localhost Juju controller on that same machine. The question is why you
> need to bootstrap a local Juju on a MAAS controller?
>
> As Ante says, you can configure the MAAS bind to avoid grabbing the lxd
> network interfaces, which ill allow LXD's dnsmasq to work alongside bind
> (because bind is focused on the main network interfaces, and dnsmasq is
> grabbing the lxd network interfaces). But that's fiddly, you would need to
> look carefully over the bind config files and make sure you don't
> inadvertently break MAAS. If you are not familiar with bind configuration,
> I don't recommend this approach.
>
> The easy answer is just to create a separate VM that points resolv.conf at
> the MAAS DNS server, and bootstrap Juju locally in that VM. You can even
> IIRC use MAAS to create that new VM, using the 'pod' functionality in 2.2.
>
> Mark
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: LXD bootstrap inside KVM failed

2017-08-08 Thread Mark Shuttleworth
On 08/08/17 08:31, Ante Karamatić wrote:
> If you want to run LXD on the same host where bind is running, you
> just have to configure bind to *not* listen on LXD network:
>
> https://www.cyberciti.biz/faq/unix-linux-bsd-bind-dns-listenon-configuration/
>
> uto, 8. kol 2017. 09:04 Muhammad Yousuf Khan  > je napisao:
>
> Thanks for the update Ante. but since MAAS also used Bind for its
> own DNS resolution. how come one can use juju or lxd in absence of
> bind. 
> any tip will be highly appreciated.
>
> Thanks,
> MYK
>

MYK, if I understand your problem, you are running a MAAS controller on
the VM (which means bind is running) and you want to bootstrap a LXD
localhost Juju controller on that same machine. The question is why you
need to bootstrap a local Juju on a MAAS controller?

As Ante says, you can configure the MAAS bind to avoid grabbing the lxd
network interfaces, which ill allow LXD's dnsmasq to work alongside bind
(because bind is focused on the main network interfaces, and dnsmasq is
grabbing the lxd network interfaces). But that's fiddly, you would need
to look carefully over the bind config files and make sure you don't
inadvertently break MAAS. If you are not familiar with bind
configuration, I don't recommend this approach.

The easy answer is just to create a separate VM that points resolv.conf
at the MAAS DNS server, and bootstrap Juju locally in that VM. You can
even IIRC use MAAS to create that new VM, using the 'pod' functionality
in 2.2.

Mark
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: LXD bootstrap inside KVM failed

2017-08-08 Thread Ante Karamatić
If you want to run LXD on the same host where bind is running, you just
have to configure bind to *not* listen on LXD network:

https://www.cyberciti.biz/faq/unix-linux-bsd-bind-dns-listenon-configuration/

uto, 8. kol 2017. 09:04 Muhammad Yousuf Khan  je napisao:

> Thanks for the update Ante. but since MAAS also used Bind for its own DNS
> resolution. how come one can use juju or lxd in absence of bind.
> any tip will be highly appreciated.
>
> Thanks,
> MYK
>
> On Tue, Aug 8, 2017 at 11:19 AM, Ante Karamatić <
> ante.karama...@canonical.com> wrote:
>
>> When one installs bind, and doesn't configure it, it listens on all
>> interfaces.
>>
>> Since LXD uses dnsmasq on LXD network (which uses the same port as bind),
>> starting dnsmasq fails and therefore LXD too.
>>
>> We should not disable people's bind, because they must have installed it
>> for a reason. Maybe bind, by default, should listen only on localhost.
>>
>> Or... LXD systemd service detects running service on port 53 on LXD's
>> network and provides meaningful message.
>>
>> We can't solve this like we did with apache and nginx (autodetect, change
>> port), because dns needs to be on port 53.
>>
>> Either way, juju can't do much here...
>>
>>
>> uto, 8. kol 2017. 03:52 Tim Penhey  je napisao:
>>
>>> Yep, that is pretty strange. Why was bind running?
>>>
>>> Tim
>>>
>>> On 03/08/17 07:45, fengxia wrote:
>>> > For anyone, the solution is rather strange:
>>> >
>>> > $ sudo service stop bind9
>>> >
>>> > $ sudo lxd start
>>> >
>>> > Reference: https://github.com/lxc/lxd/issues/2046
>>> >
>>> >
>>> > On 08/02/2017 03:33 PM, fengxia wrote:
>>> >> Hi Juju,
>>> >>
>>> >> I have a 16.04 KVM. Installed juju and LXD from apt.
>>> >>
>>> >> $ juju bootstrap localhost test
>>> >>
>>> >> ERROR creating LXD client: can't connect to the local LXD server: Get
>>> >> http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read:
>>> >> connection reset by peer
>>> >>
>>> >> Please install LXD by running:
>>> >> $ sudo apt-get install lxd
>>> >> and then configure it with:
>>> >> $ newgrp lxd
>>> >> $ lxd init
>>> >>
>>> >> Tried the suggested commands. Rebooted KVM. No avail.
>>> >>
>>> >> Is this because I'm running LXD inside KVM?
>>> >>
>>> >
>>>
>>> --
>>> Juju mailing list
>>> Juju@lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>
>> --
>> Ante Karamatić
>> ante.karama...@canonical.com
>> Canonical
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>>
> --
Ante Karamatić
ante.karama...@canonical.com
Canonical
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: LXD bootstrap inside KVM failed

2017-08-08 Thread Muhammad Yousuf Khan
Thanks for the update Ante. but since MAAS also used Bind for its own DNS
resolution. how come one can use juju or lxd in absence of bind.
any tip will be highly appreciated.

Thanks,
MYK

On Tue, Aug 8, 2017 at 11:19 AM, Ante Karamatić <
ante.karama...@canonical.com> wrote:

> When one installs bind, and doesn't configure it, it listens on all
> interfaces.
>
> Since LXD uses dnsmasq on LXD network (which uses the same port as bind),
> starting dnsmasq fails and therefore LXD too.
>
> We should not disable people's bind, because they must have installed it
> for a reason. Maybe bind, by default, should listen only on localhost.
>
> Or... LXD systemd service detects running service on port 53 on LXD's
> network and provides meaningful message.
>
> We can't solve this like we did with apache and nginx (autodetect, change
> port), because dns needs to be on port 53.
>
> Either way, juju can't do much here...
>
>
> uto, 8. kol 2017. 03:52 Tim Penhey  je napisao:
>
>> Yep, that is pretty strange. Why was bind running?
>>
>> Tim
>>
>> On 03/08/17 07:45, fengxia wrote:
>> > For anyone, the solution is rather strange:
>> >
>> > $ sudo service stop bind9
>> >
>> > $ sudo lxd start
>> >
>> > Reference: https://github.com/lxc/lxd/issues/2046
>> >
>> >
>> > On 08/02/2017 03:33 PM, fengxia wrote:
>> >> Hi Juju,
>> >>
>> >> I have a 16.04 KVM. Installed juju and LXD from apt.
>> >>
>> >> $ juju bootstrap localhost test
>> >>
>> >> ERROR creating LXD client: can't connect to the local LXD server: Get
>> >> http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read:
>> >> connection reset by peer
>> >>
>> >> Please install LXD by running:
>> >> $ sudo apt-get install lxd
>> >> and then configure it with:
>> >> $ newgrp lxd
>> >> $ lxd init
>> >>
>> >> Tried the suggested commands. Rebooted KVM. No avail.
>> >>
>> >> Is this because I'm running LXD inside KVM?
>> >>
>> >
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/
>> mailman/listinfo/juju
>>
> --
> Ante Karamatić
> ante.karama...@canonical.com
> Canonical
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: LXD bootstrap inside KVM failed

2017-08-07 Thread Ante Karamatić
When one installs bind, and doesn't configure it, it listens on all
interfaces.

Since LXD uses dnsmasq on LXD network (which uses the same port as bind),
starting dnsmasq fails and therefore LXD too.

We should not disable people's bind, because they must have installed it
for a reason. Maybe bind, by default, should listen only on localhost.

Or... LXD systemd service detects running service on port 53 on LXD's
network and provides meaningful message.

We can't solve this like we did with apache and nginx (autodetect, change
port), because dns needs to be on port 53.

Either way, juju can't do much here...

uto, 8. kol 2017. 03:52 Tim Penhey  je napisao:

> Yep, that is pretty strange. Why was bind running?
>
> Tim
>
> On 03/08/17 07:45, fengxia wrote:
> > For anyone, the solution is rather strange:
> >
> > $ sudo service stop bind9
> >
> > $ sudo lxd start
> >
> > Reference: https://github.com/lxc/lxd/issues/2046
> >
> >
> > On 08/02/2017 03:33 PM, fengxia wrote:
> >> Hi Juju,
> >>
> >> I have a 16.04 KVM. Installed juju and LXD from apt.
> >>
> >> $ juju bootstrap localhost test
> >>
> >> ERROR creating LXD client: can't connect to the local LXD server: Get
> >> http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read:
> >> connection reset by peer
> >>
> >> Please install LXD by running:
> >> $ sudo apt-get install lxd
> >> and then configure it with:
> >> $ newgrp lxd
> >> $ lxd init
> >>
> >> Tried the suggested commands. Rebooted KVM. No avail.
> >>
> >> Is this because I'm running LXD inside KVM?
> >>
> >
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-- 
Ante Karamatić
ante.karama...@canonical.com
Canonical
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: LXD bootstrap inside KVM failed

2017-08-07 Thread Muhammad Yousuf Khan
Having same issue. And wasted my whole day on this. now after loosing the
battle. I am going to try this on physical server . Hope to see the
solution for this.
On Aug 8, 2017 6:52 AM, "Tim Penhey"  wrote:

> Yep, that is pretty strange. Why was bind running?
>
> Tim
>
> On 03/08/17 07:45, fengxia wrote:
> > For anyone, the solution is rather strange:
> >
> > $ sudo service stop bind9
> >
> > $ sudo lxd start
> >
> > Reference: https://github.com/lxc/lxd/issues/2046
> >
> >
> > On 08/02/2017 03:33 PM, fengxia wrote:
> >> Hi Juju,
> >>
> >> I have a 16.04 KVM. Installed juju and LXD from apt.
> >>
> >> $ juju bootstrap localhost test
> >>
> >> ERROR creating LXD client: can't connect to the local LXD server: Get
> >> http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read:
> >> connection reset by peer
> >>
> >> Please install LXD by running:
> >> $ sudo apt-get install lxd
> >> and then configure it with:
> >> $ newgrp lxd
> >> $ lxd init
> >>
> >> Tried the suggested commands. Rebooted KVM. No avail.
> >>
> >> Is this because I'm running LXD inside KVM?
> >>
> >
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: LXD bootstrap inside KVM failed

2017-08-07 Thread Tim Penhey
Yep, that is pretty strange. Why was bind running?

Tim

On 03/08/17 07:45, fengxia wrote:
> For anyone, the solution is rather strange:
> 
> $ sudo service stop bind9
> 
> $ sudo lxd start
> 
> Reference: https://github.com/lxc/lxd/issues/2046
> 
> 
> On 08/02/2017 03:33 PM, fengxia wrote:
>> Hi Juju,
>>
>> I have a 16.04 KVM. Installed juju and LXD from apt.
>>
>> $ juju bootstrap localhost test
>>
>> ERROR creating LXD client: can't connect to the local LXD server: Get
>> http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read:
>> connection reset by peer
>>
>> Please install LXD by running:
>> $ sudo apt-get install lxd
>> and then configure it with:
>> $ newgrp lxd
>> $ lxd init
>>
>> Tried the suggested commands. Rebooted KVM. No avail.
>>
>> Is this because I'm running LXD inside KVM?
>>
> 

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


Re: LXD bootstrap inside KVM failed

2017-08-02 Thread fengxia

For anyone, the solution is rather strange:

$ sudo service stop bind9

$ sudo lxd start

Reference: https://github.com/lxc/lxd/issues/2046


On 08/02/2017 03:33 PM, fengxia wrote:

Hi Juju,

I have a 16.04 KVM. Installed juju and LXD from apt.

$ juju bootstrap localhost test

ERROR creating LXD client: can't connect to the local LXD server: Get 
http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read: 
connection reset by peer


Please install LXD by running:
$ sudo apt-get install lxd
and then configure it with:
$ newgrp lxd
$ lxd init

Tried the suggested commands. Rebooted KVM. No avail.

Is this because I'm running LXD inside KVM?



--
Feng xia
Engineer
Lenovo USA

Phone: 5088011794
fx...@lenovo.com

Lenovo.com
Twitter | Facebook | Instagram | Blogs | Forums


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


Re: LXD bootstrap inside KVM failed

2017-08-02 Thread fengxia

When running the service:

$ sudo service lxd start

Failed with:

A dependency job for lxd.service failed. See 'journalctl -xe' for details.

More info from $ service lxd status:

-- Subject: Unit lxd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit lxd.service has failed.
--
-- The result is dependency.
Aug 02 15:40:00 mail.lctc-buildbot.labs.lenovo.com systemd[1]: 
lxd.service: Job lxd.service/start failed with result 'dependency'.
Aug 02 15:40:00 mail.lctc-buildbot.labs.lenovo.com systemd[1]: 
lxd-bridge.service: Unit entered failed state.
Aug 02 15:40:00 mail.lctc-buildbot.labs.lenovo.com systemd[1]: 
lxd-bridge.service: Failed with result 'exit-code'.
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4314]: 
pam_unix(cron:session): session opened for user www-data by (uid=0)
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4317]: 
(www-data) CMD ([ -x /usr/share/awstats/tools/update.sh ] && 
/usr/share/awstats/tools/update.sh)
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4314]: 
pam_unix(cron:session): session closed for user www-data
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4315]: 
pam_unix(cron:session): session opened for user root by (uid=0)
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4321]: (root) 
CMD (   test -x /etc/cron.daily/popularity-contest && 
/etc/cron.daily/popularity-contest --crond
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4316]: 
pam_unix(cron:session): session opened for user sogo by (uid=0)
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4322]: (sogo) 
CMD (/usr/sbin/sogo-tool expire-sessions 30 >/dev/null 2>&1; 
/usr/sbin/sogo-ealarms-notify >/dev
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4315]: 
pam_unix(cron:session): session closed for user root
Aug 02 15:40:02 mail.lctc-buildbot.labs.lenovo.com CRON[4316]: 
pam_unix(cron:session): session closed for user sogo




On 08/02/2017 03:33 PM, fengxia wrote:

Hi Juju,

I have a 16.04 KVM. Installed juju and LXD from apt.

$ juju bootstrap localhost test

ERROR creating LXD client: can't connect to the local LXD server: Get 
http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read: 
connection reset by peer


Please install LXD by running:
$ sudo apt-get install lxd
and then configure it with:
$ newgrp lxd
$ lxd init

Tried the suggested commands. Rebooted KVM. No avail.

Is this because I'm running LXD inside KVM?



--
Feng xia
Engineer
Lenovo USA

Phone: 5088011794
fx...@lenovo.com

Lenovo.com
Twitter | Facebook | Instagram | Blogs | Forums


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


Re: LXD bootstrap inside KVM failed

2017-08-02 Thread fengxia

Here is an update. Manually run this command,

$ sudo lxd --group lxd

Then $ lxc list works. So the LXD service was not started after reboot. 
Permission issue?


On 08/02/2017 03:33 PM, fengxia wrote:

Hi Juju,

I have a 16.04 KVM. Installed juju and LXD from apt.

$ juju bootstrap localhost test

ERROR creating LXD client: can't connect to the local LXD server: Get 
http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read: 
connection reset by peer


Please install LXD by running:
$ sudo apt-get install lxd
and then configure it with:
$ newgrp lxd
$ lxd init

Tried the suggested commands. Rebooted KVM. No avail.

Is this because I'm running LXD inside KVM?



--
Feng xia
Engineer
Lenovo USA

Phone: 5088011794
fx...@lenovo.com

Lenovo.com
Twitter | Facebook | Instagram | Blogs | Forums


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


LXD bootstrap inside KVM failed

2017-08-02 Thread fengxia

Hi Juju,

I have a 16.04 KVM. Installed juju and LXD from apt.

$ juju bootstrap localhost test

ERROR creating LXD client: can't connect to the local LXD server: Get 
http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read: 
connection reset by peer


Please install LXD by running:
$ sudo apt-get install lxd
and then configure it with:
$ newgrp lxd
$ lxd init

Tried the suggested commands. Rebooted KVM. No avail.

Is this because I'm running LXD inside KVM?

--
Feng xia
Engineer
Lenovo USA

Phone: 5088011794
fx...@lenovo.com

Lenovo.com
Twitter | Facebook | Instagram | Blogs | Forums


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