Merge lp:~jtv/maas/bug-991553 into lp:maas

Proposed by Jeroen T. Vermeulen on 2012-05-02
Status: Merged
Approved by: Jeroen T. Vermeulen on 2012-05-02
Approved revision: 544
Merged at revision: 541
Proposed branch: lp:~jtv/maas/bug-991553
Merge into: lp:maas
Diff against target: 45 lines (+16/-5) 2 files modified
To merge this branch: bzr merge lp:~jtv/maas/bug-991553
Reviewer Review Type Date Requested Status
Julian Edwards 2012-05-02 Approve on 2012-05-02
Review via email: mp+104328@code.launchpad.net

Commit Message

Documentation patch: run maas-import-isos with your current http_proxy setting.

Description of the Change

As requested by Julian after contribution from Scott. This updates our documentation for the benefit of people who want to run maas-import-isos from behind an http proxy. Running the script in “sudo” gives it an environment without variables such as http_proxy that you might have set in your shell.

Other ways of doing this would include “sudo su” or “sudo -i” (both of which would create a root login environment, including any http_proxy setting from /etc/profile). But what if you run the script on a server that's not normally supposed to talk http to the outside world? The http_proxy setting might be local to your current shell, or might not normally be set for root. Either way, I think this spelling makes the issue explicit. Even if you simply forgot to set http_proxy, this will remind you to set it.

Jeroen

To post a comment you must log in.
Julian Edwards (julian-edwards) wrote :

8 - $ sudo ./scripts/maas-import-isos
9 + $ sudo http_proxy=$http_proxy ./scripts/maas-import-isos

You could do with the same explanation of the proxy here as in INSTALL.txt, otherwise looks great, thanks!

review: Approve
lp:~jtv/maas/bug-991553 updated on 2012-05-02
540. By Jeroen T. Vermeulen on 2012-05-02

Oops that commit didn't belong here.

541. By Jeroen T. Vermeulen on 2012-05-02

Review change.

542. By Jeroen T. Vermeulen on 2012-05-02

Merge trunk.

543. By Jeroen T. Vermeulen on 2012-05-02

Resolving some confusion.

544. By Jeroen T. Vermeulen on 2012-05-02

Typo.

Jeroen T. Vermeulen (jtv) wrote :

Added the explanation to HACKING.txt, though as an after-the-fact note so as not to break the flow of instructions (which should generally work anyway).

Preview Diff

1=== modified file 'HACKING.txt'
2--- HACKING.txt 2012-04-27 12:53:57 +0000
3+++ HACKING.txt 2012-05-02 09:31:19 +0000
4@@ -157,9 +157,14 @@
5 Now run ``maas-import-isos`` to download Ubuntu precise and create the
6 necessary MAAS profiles::
7
8- $ sudo ./scripts/maas-import-isos
9-
10-Add yourself as a user in Cobbler. For convenience, give yourself the
11+ $ sudo http_proxy=$http_proxy ./scripts/maas-import-isos
12+
13+The http_proxy variable is only needed if you're downloading through a
14+proxy; "sudo" wouldn't pass it on to the script without the assignment.
15+Or if you don't have it set but do want to download through a proxy, pass
16+your proxy's URL: "http_proxy=http://proxy.example.com/"
17+
18+Now add yourself as a user in Cobbler. For convenience, give yourself the
19 password ``test``::
20
21 $ sudo htdigest /etc/cobbler/users.digest Cobbler $USER
22
23=== modified file 'INSTALL.txt'
24--- INSTALL.txt 2012-04-11 12:50:17 +0000
25+++ INSTALL.txt 2012-05-02 09:31:19 +0000
26@@ -87,11 +87,17 @@
27 Import the Ubuntu images
28 ========================
29
30-MAAS will check for and download new Ubuntu images once a
31-week. However, you'll need to download them manually the first time::
32+MAAS will check for and download new Ubuntu images once a week.
33+However, you'll need to download them manually the first time::
34
35 $ sudo maas-import-isos
36
37+If you are using an HTTP proxy, bear in mind that the "sudo" will not
38+pass your http_proxy environment variable on to the script. If that is
39+a problem, pass it on explicitly::
40+
41+ $ sudo http_proxy=$http_proxy maas-import-isos
42+
43
44 Next steps
45 ==========