kubernetes-[master,worker] snap install fail due to missing proxy

Bug #1694743 reported by Patrizio Bassi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juju Charms Collection
Incomplete
Undecided
Unassigned

Bug Description

despite setting model proxy, and even proxy specific variables for kubernated-workers as specified in https://jujucharms.com/canonical-kubernetes/ ,

the deploy of a canonical-kubernetes bundle in a net with a proxy server fails to reach internet.

kubernates master and worker fail due to to snap not to use the proxy.

kubernetes-master/0* error idle 5 192.168.0.11 hook failed: "install"
kubernetes-worker/0* error idle 6 192.168.0.17 hook failed: "install"
kubernetes-worker/1 error idle 7 192.168.0.8 hook failed: "install"
kubernetes-worker/2 error idle 8 192.168.0.21 hook failed: "install"

workaround:
juju ssh <unit>
copy proxy setting in /etc/environment
sudo systemctl restart snapd.service
exit
and juju resolved <units>

Revision history for this message
Charles Butler (lazypower) wrote :

recent versions of the charms should support the proxy settings on the model if they are declared and pass them to the snapd systemd environment.

If you're using an earlier set of the charms, there is a snap_proxy configuration option that would need to be set in order to get snapd to respect the proxy. As snapd runs in a systemd service your environment profile does seem to do the trick, but was not the original solution to the issue.

This change landed in layer-snap about a month ago and is present in the latest two revisions of the kubernetes master and worker charms.

Revision history for this message
Patrizio Bassi (patrizio-bassi) wrote : Re: [Bug 1694743] Re: kubernetes-[master, worker] snap install fail due to missing proxy

Hi charles,

I'm using latest bundle but it doesn't seem to work as you mentioned.

Which revision is expeted to ship this fix?

Patrizio

Il giorno mer 31 mag 2017 alle 19:11 Charles Butler <
<email address hidden>> ha scritto:

> recent versions of the charms should support the proxy settings on the
> model if they are declared and pass them to the snapd systemd
> environment.
>
> If you're using an earlier set of the charms, there is a snap_proxy
> configuration option that would need to be set in order to get snapd to
> respect the proxy. As snapd runs in a systemd service your environment
> profile does seem to do the trick, but was not the original solution to
> the issue.
>
> This change landed in layer-snap about a month ago and is present in the
> latest two revisions of the kubernetes master and worker charms.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1694743
>
> Title:
> kubernetes-[master,worker] snap install fail due to missing proxy
>
> Status in Juju Charms Collection:
> New
>
> Bug description:
> despite setting model proxy, and even proxy specific variables for
> kubernated-workers as specified in https://jujucharms.com/canonical-
> kubernetes/ ,
>
> the deploy of a canonical-kubernetes bundle in a net with a proxy
> server fails to reach internet.
>
> kubernates master and worker fail due to to snap not to use the proxy.
>
> kubernetes-master/0* error idle 5 192.168.0.11
> hook failed: "install"
> kubernetes-worker/0* error idle 6 192.168.0.17
> hook failed: "install"
> kubernetes-worker/1 error idle 7 192.168.0.8
> hook failed: "install"
> kubernetes-worker/2 error idle 8 192.168.0.21
> hook failed: "install"
>
>
> workaround:
> juju ssh <unit>
> copy proxy setting in /etc/environment
> sudo systemctl restart snapd.service
> exit
> and juju resolved <units>
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/charms/+bug/1694743/+subscriptions
>
--

Patrizio Bassi
www.patriziobassi.it
http://piazzadelpopolo.patriziobassi.it

Revision history for this message
Charles Butler (lazypower) wrote :
Revision history for this message
Patrizio Bassi (patrizio-bassi) wrote :

Charles, for master charm we don't gave http_proxy variables, only for
workers

Patrizio

Il giorno mer 31 mag 2017 alle 19:41 Charles Butler <
<email address hidden>> ha scritto:

> xref with https://github.com/juju-solutions/bundle-canonical-
> kubernetes/issues/270
>
> ** Bug watch added:
> github.com/juju-solutions/bundle-canonical-kubernetes/issues #270
>
> https://github.com/juju-solutions/bundle-canonical-kubernetes/issues/270
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1694743
>
> Title:
> kubernetes-[master,worker] snap install fail due to missing proxy
>
> Status in Juju Charms Collection:
> New
>
> Bug description:
> despite setting model proxy, and even proxy specific variables for
> kubernated-workers as specified in https://jujucharms.com/canonical-
> kubernetes/ ,
>
> the deploy of a canonical-kubernetes bundle in a net with a proxy
> server fails to reach internet.
>
> kubernates master and worker fail due to to snap not to use the proxy.
>
> kubernetes-master/0* error idle 5 192.168.0.11
> hook failed: "install"
> kubernetes-worker/0* error idle 6 192.168.0.17
> hook failed: "install"
> kubernetes-worker/1 error idle 7 192.168.0.8
> hook failed: "install"
> kubernetes-worker/2 error idle 8 192.168.0.21
> hook failed: "install"
>
>
> workaround:
> juju ssh <unit>
> copy proxy setting in /etc/environment
> sudo systemctl restart snapd.service
> exit
> and juju resolved <units>
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/charms/+bug/1694743/+subscriptions
>
--

Patrizio Bassi
www.patriziobassi.it
http://piazzadelpopolo.patriziobassi.it

Revision history for this message
Charles Butler (lazypower) wrote :

Try setting the snap_proxy configuration value on both the worker and the masters and this should unblock you.

As indicated previously the fix to read the proxy configuration from model config went out with the bundles as of revision 31 forward (for kubernetes core) and revision 36 forward (canonical kubernetes) bundles.

you can set these config options like so:

juju config kubernetes-master snap_proxy=http://my.proxy.ip:3600
juju config kubernetes-worker snap_proxy=http://my.proxy.ip:3600

regardless of model config, these values will populate in the snapd proxy configuration and should get you moving.

Revision history for this message
Patrizio Bassi (patrizio-bassi) wrote :

Charles,

yes, it works, it's a good and clean workaround, waiting for "final" fix
however (i.e. etcd charm doesn't need it either)

but at the moment i'm deploying :)

Thank you
Patrizio

2017-05-31 23:27 GMT+02:00 Charles Butler <email address hidden>:

> Try setting the snap_proxy configuration value on both the worker and
> the masters and this should unblock you.
>
> As indicated previously the fix to read the proxy configuration from
> model config went out with the bundles as of revision 31 forward (for
> kubernetes core) and revision 36 forward (canonical kubernetes) bundles.
>
> you can set these config options like so:
>
> juju config kubernetes-master snap_proxy=http://my.proxy.ip:3600
> juju config kubernetes-worker snap_proxy=http://my.proxy.ip:3600
>
> regardless of model config, these values will populate in the snapd
> proxy configuration and should get you moving.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1694743
>
> Title:
> kubernetes-[master,worker] snap install fail due to missing proxy
>
> Status in Juju Charms Collection:
> New
>
> Bug description:
> despite setting model proxy, and even proxy specific variables for
> kubernated-workers as specified in https://jujucharms.com/canonical-
> kubernetes/ ,
>
> the deploy of a canonical-kubernetes bundle in a net with a proxy
> server fails to reach internet.
>
> kubernates master and worker fail due to to snap not to use the proxy.
>
> kubernetes-master/0* error idle 5 192.168.0.11
> hook failed: "install"
> kubernetes-worker/0* error idle 6 192.168.0.17
> hook failed: "install"
> kubernetes-worker/1 error idle 7 192.168.0.8
> hook failed: "install"
> kubernetes-worker/2 error idle 8 192.168.0.21
> hook failed: "install"
>
>
> workaround:
> juju ssh <unit>
> copy proxy setting in /etc/environment
> sudo systemctl restart snapd.service
> exit
> and juju resolved <units>
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/charms/+bug/1694743/+subscriptions
>

--

Patrizio Bassi
www.patriziobassi.it
http://piazzadelpopolo.patriziobassi.it

Revision history for this message
Charles Butler (lazypower) wrote :

I'm glad this worked! I'm going to close this bug as incomplete as we have an open and running bug series for this issue over on the github repository. Should you encounter any further issues I encourage you to file/update the bugs there.

Thanks and all the best

Changed in charms:
status: New → Incomplete
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.