shadower,
@shadower@mastodon.social avatar

So despite all the issues, I'm quite keen on Ansible as a "personal server management interface".

But I've always found it incredibly slooooooow. Each (even no-op) task running for tens of seconds was bad enough for me to look at alternatives.

But I thought "hey surely people don't actually put up with this" and... turns out sudo on my machines is really slow.

When I allowed root access and ran Ansible that way, it's pretty speedy! Enough to keep using.

shadower,
@shadower@mastodon.social avatar

I still don't get why this is. 99% of web search says it's to do with host lookup and adding the hostname to /etc/hosts fixes it. This doesn't seem to do anything for me.

The remaining 1% says to just strace the bastard.

Which I'd love to, but: only the first sudo invocation is slow, the rest is fast (so some sort of cache is likely in play).

But I need to run sudo to strace the sudo (I think?) and so the second invocation will just work no probs.

deshipu,
@deshipu@fosstodon.org avatar

deleted_by_author

  • Loading...
  • shadower,
    @shadower@mastodon.social avatar

    @deshipu that definitely helped, thanks!

    But I also needed this:

    strace -f -u <user> sudo ls

    (didn't know about the -u parameter)

    This definitely reproduces the issue and prints out a lot of stuff.

    BRB digging through a pile of shit^Wsyscalls

    shadower,
    @shadower@mastodon.social avatar

    a non-update: I've spent some time digging through strace but I'm none-the-wiser.

    SSH as root works great and whilst it feels a bit icky, it's not really any less secure than "regular user with sudo" as far as I can see.

    (yes password login is disabled on the server, yes the SSH key is password-protected)

    Still want to actually get to the bottom of this, I've got genuine work to do there and as Nanny Ogg wisely said:

    "Tempers Fuggit"

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • cubers
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • JUstTest
  • everett
  • tacticalgear
  • modclub
  • anitta
  • cisconetworking
  • tester
  • ngwrru68w68
  • GTA5RPClips
  • normalnudes
  • megavids
  • Leos
  • provamag3
  • lostlight
  • All magazines