Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misconfiguration of sources.list on lxc container #41

Open
alff opened this issue Aug 29, 2013 · 12 comments
Open

Misconfiguration of sources.list on lxc container #41

alff opened this issue Aug 29, 2013 · 12 comments

Comments

@alff
Copy link

alff commented Aug 29, 2013

Hi @chrisroberts,
i'm using 'develop' branch (47a657b) and trying to 'init' vagabond environment. It fails when container start command 'apt-get update' with error like:
"STDERR: W: Failed to fetch http://10.0.3.1:3142/archive.ubuntu.com/ubuntu/dists/precise/main/binary-amd64/Packages 403 URL seems to be made for proxy but contains apt-cacher-ng port. Inconsistent apt configuration?"
After some diging i've found that apt-proxy settings on client is doubled.
According to this
https://www.unix-ag.uni-kl.de/~bloch/acng/html/config-servquick.html#config-client
for correct work we have to set up proxy settings by sources.list or apt.conf.d but not both variants at same time. In default container i see both variants and that why it won't work.
Host and guest os is ubuntu 12.04.

@chrisroberts
Copy link
Owner

So the values in the sources.list are set to the host cacher within the container, correct?

@alff
Copy link
Author

alff commented Aug 29, 2013

It means if we left '01-vagabond-proxy' on container then '/etc/apt/sources.list' should be like this:
http://paste.openstack.org/show/45429/
or
'sources.list' should be have proxy ip with proxy port and don't have '01-vagabond-proxy' file in /etc/apt/sources.list.d/'.
I've found step where is vagabond-proxy file is creating (vagabond cookbook) but i didn't find where is sources.list fill by data.

@chrisroberts
Copy link
Owner

Okay, I have it replicated and see what's going on. The $MIRROR is provided to debootstrap and so it populates the sources.list with it, and then we dump it into the config via the initialization commands, which ends up doubling it up. I'll get this fixed up shortly. Thanks so much for finding and reporting this :)

@rayrod2030
Copy link

Is there a workaround for this?

@chrisroberts
Copy link
Owner

@rayrod2030 Sorry, the long weekend has me playing catchup. @alff just kicked a PR to the backing cookbook (chrisroberts/chef-vagabond#5) that I'll be merging shortly and reworking slightly so it can support containers pre and post lxc cookbook latest.

@chrisroberts
Copy link
Owner

@alff's PR is merged in the cookbook dev branch. If you are running on the current develop branch here, it will pickup the changes in that cookbook automatically (syncs every hour). If you have an existing ubuntu_1204 container, just delete it sudo lxc-destroy -n ubuntu_1204 and let it recreate it.

Thanks @alff !

@alff
Copy link
Author

alff commented Sep 4, 2013

@chrisroberts thank you my friend!
I've added another one little fix on PR to my previous commit. Now it should work.

@rayrod2030
Copy link

I have tried stopping/deleting my existing lxc container and then running vagabond init again and I'm still seeing the same error. I've tried reinstalling the gem and it's pulling and installing the latest vagabond develop commit. How can I check that it's pulling the latest chef-vagabond cookbook code? Is it cached somewhere while vagabond runs?

@chrisroberts chrisroberts reopened this Sep 4, 2013
@chrisroberts
Copy link
Owner

Yes, it's cached in /tmp. You can force an update using VAGABOND_FORCE_VENDOR=true, or just killing out the directory itself.

@alff
Copy link
Author

alff commented Sep 4, 2013

Yeah, i prefer to completely erase of '/tmp/vagabond' before re-provision with newest internal cookbooks.

@chrisroberts
Copy link
Owner

Well full removal would mean loss of some state information stored there.

@rayrod2030
Copy link

Brilliant that did it! Thanks @chrisroberts and @alff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants