GithubHelp home page GithubHelp logo

Add option for specifying a domain about pdsh HOT 6 OPEN

maaand avatar maaand commented on August 10, 2024
Add option for specifying a domain

from pdsh.

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 10, 2024
what version of pdsh are you using? A host suffix works in recent versions:


grondo@atlas1 ~ >pdsh -qw az-[1,2].llnl.gov | tail -1
az-1.llnl.gov,az-2.llnl.gov

I'm assuming that does what you need?

NB: By default pdsh will strip the domain name in the output.
There is an undocumented option -K that will keep the domain
name, if, for example, you have sets of hosts from different
domains.

Original comment by [email protected] on 26 May 2011 at 4:53

from pdsh.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 10, 2024
The current method you describe works fine for a couple of hosts, but for the 
case where I want to do many disparate cases, having to include the domain in 
each case is clumsy. E.G.

pdsh -w az[1,4].domain.com,dc[3,6,8].domain.com,la-[1-10,13,115].domian.com -- 
command

VS

pdsh -H domain.com -w az[1,4],dc[3,6,8],la[1-10,13,115] -- command

Much cleaner and quicker to enter IMHO, also I would extend the concept for 
differnt domains like so:

pdsh -w 
az[1,3]domain.com,dc[1-10].domain.com,dcx[1,4].different.com,dal[1,3,5].differen
t.com -- command

could be

pdsh -H domain.com -w az[1,3],dc[1-10] -H different -w dcx[1,4],dal[1,3,5] -- 
command

Each -H would modify the succeeding -w list.

Original comment by [email protected] on 26 May 2011 at 11:37

from pdsh.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 10, 2024
I was thinking about this request and I think that a more generic solution, if 
acceptable to you, might be more palatable. What if there was a way, either 
within
-w or with a new option like -H, to add generic prefix or suffix to all 
subsuquent hosts. 

For your case you would be able to do

 pdsh -H .domain.com -w hosts... -H .other.com -w hosts,... 

but this would also be useful to target all hosts with a common suffix, e.g.

 pdsh -H -eth2 -w a,b

would target a-eth2, b-eth2


Original comment by [email protected] on 4 Jun 2011 at 8:17

from pdsh.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 10, 2024
:) I thought that was what I said :)

Original comment by [email protected] on 4 Jun 2011 at 8:22

from pdsh.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 10, 2024
oh, ok. The only difference is that you will have to provide the leading dot 
when specifying the domain when working with an arbitrary suffix instead of a 
"host domain" specific option. e.g.:

 -H .domain.com

vs

 -H domain.com

I'm also going experiment with a syntax to add this functionality to -w instead
of using up a new option

Original comment by [email protected] on 4 Jun 2011 at 8:28

from pdsh.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 10, 2024
Maybe something like

-w host1.domain1.com,host2,host1.domain2.com,host2

Original comment by [email protected] on 4 Jun 2011 at 8:36

from pdsh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.