Page MenuHomePhabricator

Revive the HostFile backend on cloudcuminXXXX
Open, MediumPublic

Description

I use this backend now and then, for incremental work (like, use cumin to determine a list of hosts with a problem, then target execution on that list). I'm not clear on why this backend is restricted to openstack backends, but it seems to no longer work even on cloudcumin1001 which is now our preferred host for acting on openstack VMs.

andrew@cloudcumin1001:~$ sudo cumin F{"./bustedresolv.txt"} hostname
Caught InvalidQueryError exception: Unable to parse the query 'F{./bustedresolv.txt}' neither with the default backend 'puppetdb' nor with the global grammar:
puppetdb: Expected end of text, found '{'  (at char 1), (line:1, col:2)
global: Expected {Combine:({Combine:({D | K | O | P "{"}) SkipTo:("}") "}"}) | Combine:({"A" ":" W:(ABCD...)}) | {"(" Forward: {Group:({{Combine:({Combine:({D | K | O | P "{"}) SkipTo:("}") "}"}) | Combine:({"A" ":" W:(ABCD...)})} | {{"(" : ...} ")"}}) [Group:({{{{"and not" | "and"} | "xor"} | "or"} {{Combine:({Combine:({D | K | O | P "{"}) SkipTo:("}") "}"}) | Combine:({"A" ":" W:(ABCD...)})} | {{"(" : ...} ")"}}})]...} ")"}}, found 'F'  (at char 0), (line:1, col:1)


andrew@cloudcumin1001:~$ sudo cumin --backend openstack  F{"./bustedresolv.txt"} hostname
Caught InvalidQueryError exception: Unable to parse the query 'F{./bustedresolv.txt}' neither with the default backend 'openstack' nor with the global grammar:
openstack: Expected {Group:("*") | {Group:(Combine:({W:(abcd...) ":" {quotedString using single or double quotes | W:(0123...)}}))}...}, found 'F'  (at char 0), (line:1, col:1)
global: Expected {Combine:({Combine:({D | K | O | P "{"}) SkipTo:("}") "}"}) | Combine:({"A" ":" W:(ABCD...)}) | {"(" Forward: {Group:({{Combine:({Combine:({D | K | O | P "{"}) SkipTo:("}") "}"}) | Combine:({"A" ":" W:(ABCD...)})} | {{"(" : ...} ")"}}) [Group:({{{{"and not" | "and"} | "xor"} | "or"} {{Combine:({Combine:({D | K | O | P "{"}) SkipTo:("}") "}"}) | Combine:({"A" ":" W:(ABCD...)})} | {{"(" : ...} ")"}}})]...} ")"}}, found 'F'  (at char 0), (line:1, col:1)

Please let me know if I'm just making a syntax error here!

Event Timeline

Andrew triaged this task as Medium priority.Nov 25 2024, 7:20 PM

@Andrew the host file backend is not a cumin official backend. Cumin allows to plug in externally developed backends and the host file one was developed for WMCS specifically in T185967.

I see it's still in puppet at ./modules/profile/files/openstack/eqiad1/cumin/cumin_file_backend.py and referenced by profile::openstack::eqiad1::cumin::master, but no host seems to have that profile installed currently, that's why it's not available.

fnegri subscribed.