need to set proxy for smart too

Bug #236884 reported by Andreas Hasenack
10
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Medium
Gustavo Niemeyer
Landscape Server
Fix Released
Medium
Gustavo Niemeyer
Smart Package Manager
Fix Released
Undecided
Gustavo Niemeyer
landscape-client (Ubuntu)
Fix Released
Undecided
Unassigned
Declined for Jaunty by Mathias Gug
Intrepid
Invalid
Undecided
Unassigned
smart (Ubuntu)
Fix Released
Undecided
Unassigned
Declined for Jaunty by Mathias Gug
Intrepid
Fix Released
Undecided
Unassigned

Bug Description

The Landscape Team has proposed an SRU to solve this bug.

Statement explaining the impact
=====================

It's possible to have a client machine in a situation where landscape itself is using a proxy, but not smart. In networks where the only way out is via a proxy, this means that that machine would never be able to perform package operations, nor report the packages it has installed and available.

Even if smart checks the http_proxy env var, it's entirely possible the admin didn't set it. A contributing factor is that the landscape-config wizard explicitly asks for a proxy, so it's not unreasonable for the admin to assume smart would be setup too.

How the bug has been addressed
======================

Introducing a new smart plugin that inherits the proxy settings from the landscape-client configuration file.

Detailed instructions how to reproduce the bug
==============================

Simply install landscape-client in an environment using a proxy.

Changed in landscape:
importance: Undecided → Low
milestone: none → mthood+1
Changed in landscape:
milestone: thames → thames-pre-3
assignee: nobody → niemeyer
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

I'm pushing this back to thames as I don't want to rush this in today. We have to write
a parser for the apt.conf format, which is a bit flexible, and I won't be around in the
next week as I'll be on holiday, and thus wouldn't be able to fix any issues.

Changed in landscape:
importance: Low → Medium
milestone: thames-pre-3 → thames
status: New → Confirmed
Changed in landscape:
milestone: thames → thames-pre-4
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Moving to pre-5

Changed in landscape:
milestone: thames-pre-4 → thames-pre-5
Revision history for this message
Christopher Armstrong (radix) wrote :

Gustavo, the description of the ticket does not make it clear why we need to write a parser for apt.conf. It looks like this ticket is just about configuring smart to use the http proxy that is specified during landscape-config.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Setting it during landscape-config was the original suggestion yes.

Following apt's proxy configuration everytime seems superior (like we do follow sources.list), though.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

I'm fine with going either way. Using the proxy configuration from landscape-config
indeed sounds reasonable, even more if we consider that we'll likely have cases in
the future where landscape could be setup in a system where APT wasn't ever used.
We'd probably have to make Smart understand Landscape's configuration file (which
shouldn't be hard), so that current wedged systems would unblock.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Btw, just for the record, Matt Z. had a nice idea the other day: we could use apt-config to
get the proxy configuration from APT without any complex parsing. Of course, if we're
using Landscape's setup, that won't matter.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Using the landscape setup seems like a nice compromise. landscape will have to have a correct proxy configuration at all times in order to work properly. If landscape-client isn't working, it doesn't matter if smart is using the right proxy or not.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Pushed for thames-pre-6.

Changed in landscape:
milestone: thames-pre-5 → thames-pre-6
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Moved to thames-pre-7.

Changed in landscape:
milestone: thames-pre-6 → thames-pre-7
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Pushing for thames-pre-8

Changed in landscape:
milestone: thames-pre-7 → thames-pre-8
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Pushed for thames-pre-9

Changed in landscape:
milestone: thames-pre-8 → thames-pre-9
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Unfortunately there's no time to add this for Intrepid, so I'll postpone this one for the next major
milestone so that I can focus on helping to push the major features of 1.2.

Changed in landscape:
milestone: thames-pre-9 → later
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This just happened to a real customer. shang debugged it and indeed it was a missing proxy setting for smart. The "smart update" cronjob was always stuck at this customer.

The customer said he did configure a proxy via landscape-config, but that smart didn't get that setting.

Changed in landscape:
milestone: later → mountainview-pre-2
Changed in landscape-client:
status: New → Confirmed
status: New → Confirmed
importance: Undecided → Medium
Thomas Herve (therve)
Changed in landscape:
assignee: niemeyer → therve
Revision history for this message
Thomas Herve (therve) wrote :

This is ready to review in the attached branch.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hmm, I wonder how we should deal with ftp proxies. It's not something that landscape-client uses, so it won't ask for this information, but apt/smart repositories can surely be ftp://. Should we ask that too or assume the same proxy for ftp?

Revision history for this message
Thomas Herve (therve) wrote :

Hum I don't really know what to do...

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

So, the suggestion is to have the wizard also ask for the ftp proxy. So, three questions:
- http proxy
- https proxy
- ftp proxy

But for the last two, assume the same answer as for the first one, to minimize typing.

On another note, while running the wizard, I get this:
(...)
Enable script execution? [y/N]y

By default, scripts are restricted to the 'landscape' and
'nobody' users. Please enter a comma-delimited list of users
that scripts will be restricted to. To allow scripts to be run
by any user, enter "ALL".

Script users: ALL
'NoneType' object has no attribute 'set'
Aborting Landscape configuration
root@hardy-vm:~#

Changed in landscape:
milestone: mountainview-pre-2 → mountainview-pre-3
Changed in landscape:
milestone: mountainview-pre-3 → mountainview-pre-4
Changed in landscape:
milestone: mountainview-pre-4 → mountainview-pre-5
Changed in landscape:
milestone: mountainview-pre-5 → mountainview-pre-6
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

A new landscape plugin is working in Smart's trunk. With it, we can set the use-landscape-proxies in the distro.py file of the smartpm package, and get Smart to use the proxies which were set in Landscape itself.

Changed in landscape-client:
assignee: nobody → niemeyer
status: Confirmed → In Progress
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This is going to be fixed in smart.

Changed in landscape-client:
status: Confirmed → Invalid
Changed in smart:
assignee: nobody → niemeyer
status: New → Fix Committed
Changed in landscape-client:
status: In Progress → Invalid
Changed in landscape:
assignee: therve → niemeyer
status: Confirmed → Fix Committed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

A 1.2 smart release is forthcoming. We will deal with the packaging once it's released.

Changed in landscape:
milestone: mountainview-pre-6 → mountainview-pre-7
Changed in landscape:
milestone: mountainview-pre-7 → mountainview-pre-8
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I extensively tested this on Mar 4th, 2009:
- interaction with env proxy vars
- interaction with smart proxy config options
- what happens when landscape-client is not installed
- upgrading smart from a broken situation (no proxy set for smart, but one set for LC) fixes it

qa + 1

Changed in landscape:
status: Fix Committed → Fix Released
Changed in landscape:
milestone: mountainview-pre-8 → mountainview
status: Fix Released → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package smart - 1.2-0ubuntu0.9.04

---------------
smart (1.2-0ubuntu0.9.04) jaunty; urgency=low

  * New upstream release (LP: #349866)
    - Added timeout for smart connections (LP: #268261)
    - New landscape plugin to set proxy for smart too,
      inheriting it from the landscape config (LP: #236884)
    - Support for python 2.6 (LP: #292542)
  * Added patch to fix a fetcher test (LP: #354027)

 -- Andreas Hasenack <email address hidden> Tue, 31 Mar 2009 11:07:00 -0300

Changed in smart (Ubuntu):
status: New → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This wa released in upstream 1.2

Changed in smart:
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This was released in upstream 1.2

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Decoupling server bugs from client ones.

Changed in landscape:
status: Fix Committed → Invalid
description: updated
Changed in smart (Ubuntu):
status: Fix Released → Fix Committed
Changed in landscape-client (Ubuntu):
status: Invalid → Fix Committed
Changed in landscape-client:
status: Invalid → Fix Released
Changed in landscape:
status: Invalid → Fix Released
Mathias Gug (mathiaz)
Changed in smart (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted smart into intrepid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in smart (Ubuntu Intrepid):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package smart - 1.1.1~bzr20081010-0ubuntu1.8.10.0

---------------
smart (1.1.1~bzr20081010-0ubuntu1.8.10.0) intrepid-proposed; urgency=low

  * Bug-fixing SRU (LP: #347983)
    - Added timeout for smart connections (LP: #268261)
    - New landscape plugin to set proxy for smart too,
      inheriting it from the landscape config (LP: #236884)
    - Added 04_detect_plugins crasher fix (LP: #388577)
    - Added 05_curl_timeout fix for failures when downloading big
      packages (LP: #389001)

 -- Free Ekanayaka <email address hidden> Wed, 07 Oct 2009 09:16:59 +0200

Changed in smart (Ubuntu Intrepid):
status: Fix Committed → Fix Released
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Intrepid Ibex reached end-of-life on 30 April 2010 so I am closing the
report. The bug is still marked as having a fix committed in later versions of Ubuntu.

Changed in landscape-client (Ubuntu Intrepid):
status: New → Invalid
Changed in landscape-client (Ubuntu):
status: Fix Committed → Fix Released
tags: removed: needs-package-release verification-needed
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.