package changer does not inherit proxy settings from landscape-client

Bug #381241 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Medium
Thomas Herve

Bug Description

smart itself imports/inherits the proxy settings from landscape-client when run in the command line. But when smart is imported in landscape-client, this does not happen.

Changed in landscape-client:
importance: Undecided → Medium
milestone: none → 1.3.2
Thomas Herve (therve)
Changed in landscape-client:
assignee: nobody → Thomas Herve (therve)
status: New → In Progress
tags: added: review
Revision history for this message
Thomas Herve (therve) wrote :

This is ready to review in the attached branch. I'm not super happy about the test, but I think the code change is correct.

Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote : Re: [Bug 381241] Re: package changer does not inherit proxy settings from landscape-client

The test is a bit obscure indeed, but it fails correctly if the
changes are reverted, so it's fine for me.

It would be nice to test that the branch actually works for real, that
could be probably done during the testing week though.

+1!

Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

The test is a bit obscure indeed, but it fails correctly if the
changes are reverted, so it's fine for me.

It would be nice to test that the branch actually works for real, that
could be probably done during the testing week though.

+1!

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

I get this test failure (running with "trial -r glib2 landscape"):

[FAIL]: landscape.package.tests.test_facade.SmartFacadeTest.test_init_landscape_plugins

Traceback (most recent call last):
  File "/home/andreas/canonical/landscape-client/therve/smart-init/landscape/tests/mocker.py", line 102, in test_method_wrapper
    result = test_method()
  File "/home/andreas/canonical/landscape-client/therve/smart-init/landscape/package/tests/test_facade.py", line 484, in test_init_landscape_plugins
    self.assertTrue(smart.sysconf.get("use-landscape-proxies"))
twisted.trial.unittest.FailTest:

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

If I install smart 1.2 in my machine, then the test passes. I had the default intrepid build (smart 1.1.1), which doesn't have the use-landscape-proxies option. Interestingly enough, even if I set that option to True in smart 1.1.1, the test still doesn't pass.

Don't know if this is a bug in the test or not. I guess we could require smart >= 1.2, as free suggested.

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

Yes, the test requires smart >= 1.2. I think it's an acceptable requirement? (it's only for the test, not the actual implementation).

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

I setup a proxy and forced the client machine to go through it. Using previous landscape-client, smart didn't use the proxy and got connection refused errors. Upgrading to the client from this branch made it work.

I just got a feeling that the failed activity when the old client was being used would stay in "delivered" state forever. I will leave the client vm running for a while in that state, with the old client, to see if it will transition to "failed".

QA + 1.

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

Thanks for the fix, and sorry for not catching this earlier, and for implementing such a bad API in the first place. +1!

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

Thanks, merged in r115.

Changed in landscape-client:
status: In Progress → Fix Committed
Jamu Kakar (jkakar)
tags: added: needs-testing
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Tested again with client 1.3.2.1 in jaunty, smart now honors the proxy setting in landscape/client.conf when called from the package-changer. Started the test with the original jaunty client, where smart ignores the proxy setting.

qa + 1

tags: removed: needs-testing
Changed in landscape-client:
status: Fix Committed → Fix Released
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.