-
Notifications
You must be signed in to change notification settings - Fork 43
Make ansible use the "lxd" transport instead of ssh #94
Conversation
Travis fails for reasons that seem similar to the problems I had with tox. This will require some debugging. I'll forget the idea of slipping this PR into v0.3. |
Codecov Report
@@ Coverage Diff @@
## master #94 +/- ##
==========================================
+ Coverage 93.1% 93.43% +0.33%
==========================================
Files 45 45
Lines 1261 1264 +3
==========================================
+ Hits 1174 1181 +7
+ Misses 87 83 -4
Continue to review full report at Codecov.
|
Oh, I've noticed that ansible actions like |
Hi @hsoft, I noticed in a recent change the setup.py was changed to this: packages=['lxdock'] instead of find_packages() as it was before... Now as I recall having done this myself a number of years ago, using just ['lxdock'] won't include subpackages so this will likely break the installer, it also breaks if people build a debian package from this for example it won't include the subpackages lxdock,cli, lxdock.conf, lxdock.guest, etc. in the package which is probably not what you want. |
@robvdl I can't seem to reproduce the issue: installing the |
This last commit transforms makes the @ellmetha you haven't commented yet. Are you available for reviews? Should I ask @lingxiaoyang instead? |
Oh, well, I'm having troubles on travis with re-using the persistent container for SSH-related things. I think I'll have to revert to using fresh containers... |
Hmm the Travis build is still failing though. 🤔 |
@ellmetha yes, I know. It's puzzling me because it doesn't fail locally on tox. Working on it... |
The "lxd" transport in ansible allows us to provision our containers without SSH, directly through "lxc exec" calls! I had the idea for quite a while that I should explore the possibility of plugging "lxc exec" into ansible, but I didn't know that the plug was already there, ready to be used! Had I known that, I would have used it from the start, it would have saved me SSH fiddling... I've also performed some "drive by" improvements of the affected tests by parametrizing them. I've also converted the modified test in `test_container` so it uses the global re-usable container rather than a new one. It's less elegant, but faster. Our integration tests are soooo slow...
Oh, I think I have it! It seems like it was simply a matter of copying the .ssh folder in |
The "lxd" transport in ansible allows us to provision our containers
without SSH, directly through "lxc exec" calls!
I had the idea for quite a while that I should explore the possibility
of plugging "lxc exec" into ansible, but I didn't know that the plug was
already there, ready to be used! Had I known that, I would have used it
from the start, it would have saved me SSH fiddling...
Also, you know that small "HOME=" line in tox.ini? I've spent hours
debugging this. My tests would fail only when running into tox, not
when running directly through pytest. That was very puzzling. Live and
learn...