Coder Social home page Coder Social logo

Comments (7)

sawanoboly avatar sawanoboly commented on June 22, 2024

hmm... QUERY syntax based on knife search, ssh. It's usage of chef-server/client environment.

https://docs.chef.io/knife_ssh.html
https://docs.chef.io/knife_search.html

If I implement specific usage to knife-zero, then it's getting harder to follow chef-core updates ( and the edge of chef often cases regression ...).

But, I seem to better way to use name or fqdn by default. In that case, there is a need to be careful not to use as a regular expression.

from knife-zero.

patcon avatar patcon commented on June 22, 2024

You're right about it diverging from chef-core. Perhaps it would be welcome there. Created a ticket here for discussion: chef/chef#3526

from knife-zero.

sawanoboly avatar sawanoboly commented on June 22, 2024

Thank you for create issue to core πŸ˜ƒ

from knife-zero.

patcon avatar patcon commented on June 22, 2024

bwaha. the label.

from knife-zero.

patcon avatar patcon commented on June 22, 2024

fyi this would work for knife zero commands. Feel free to offer feedback:
chef/chef#3536

from knife-zero.

sawanoboly avatar sawanoboly commented on June 22, 2024

@patcon great!

I've add below to Gemfile and tested it.

gem 'chef', github: 'patcon/chef', ref: '3526-fuzz-ssh-query'

There are node which is named knife-zero02. It have IP 133.242.xxx.xxx.

$ bundle exec knife node show knife-zero02
Node Name:   knife-zero02
Environment: _default
FQDN:        
IP:          133.242.xxx.xxx
Run List:    
Roles:       
Recipes:     
Platform:    ubuntu 14.04
Tags:        

In this case, I should pass an ipaddress to fuzzy_query.

$ bundle exec knife zero converge 133.242.xxx.xxx -a ipaddress
133.242.xxx.xxx sudo: unable to resolve host knife-zero02
133.242.xxx.xxx Starting Chef Client, version 12.3.0
133.242.xxx.xxx resolving cookbooks for run list: []
133.242.xxx.xxx Synchronizing Cookbooks:
133.242.xxx.xxx Compiling Cookbooks...
133.242.xxx.xxx [2015-06-16T15:01:09+09:00] WARN: Node knife-zero02 has an empty run list.
133.242.xxx.xxx Converging 0 resources
133.242.xxx.xxx [2015-06-16T15:01:09+09:00] WARN: Could not find whitelist attribute fqdn/.
133.242.xxx.xxx [2015-06-16T15:01:09+09:00] WARN: Could not find whitelist attribute cloud.
133.242.xxx.xxx 
133.242.xxx.xxx Running handlers:
133.242.xxx.xxx Running handlers complete
133.242.xxx.xxx Chef Client finished, 0/0 resources updated in 1.760414153 seconds

How about include name to fuzzy target?

$ bundle exec knife zero converge knife-zero02 -a ipaddress
FATAL: No nodes returned from search!

from knife-zero.

patcon avatar patcon commented on June 22, 2024

I'm down, but it sounds like Lamont thinks this logic should match the search logic, so maybe mention the idea in the chef issue?

Also, I'll make sure to leave it around this time, but I'd recommend against using my feature branches on your master, as my habit is to delete them after merge, and sometimes they break :)

from knife-zero.

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.