package changer does not inherit proxy settings from landscape-client

Bug #381241 reported by Andreas Hasenack on 2009-05-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
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) on 2009-06-05
Changed in landscape-client:
assignee: nobody → Thomas Herve (therve)
status: New → In Progress
tags: added: review
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.

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!

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!

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:

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.

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).

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.

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
Thomas Herve (therve) wrote :

Thanks, merged in r115.

Changed in landscape-client:
status: In Progress → Fix Committed
Jamu Kakar (jkakar) on 2009-06-23
tags: added: needs-testing
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  Edit
Everyone can see this information.

Other bug subscribers