2017-01-26 7 views
0

이상한 노드를 제거 할 수없는 명령을 삭제 명령을 칼에서 결과 :칼 내가 부트 스트랩 명령을 사용하여 실수를 내가 노드가 <code>-i</code>라고하고 나는 그 노드를 제거 할 것이다 알려진

knife node delete -i 

Error: invalid option: -i 
USAGE: knife node delete [NODE[,NODE]] (options) 
    -s, --server-url URL    Chef Server URL 
     --chef-zero-host HOST  Host to start chef-zero on 
     --chef-zero-port PORT  Port (or port range) to start chef-zero on. Port ranges like 1000,1010 or 8889-9999 will try all given ports until one works. 
    -k, --key KEY     API Client Key 
     --[no-]color     Use colored output, defaults to enabled 
    -c, --config CONFIG    The configuration file to use 
     --config-option OPTION=VALUE Override a single configuration option 
     --defaults     Accept default values for all questions 
    -d, --disable-editing   Do not open EDITOR, just accept the data as is 
    -e, --editor EDITOR    Set the editor to use for interactive commands 
    -E, --environment ENVIRONMENT Set the Chef environment (except for in searches, where this will be flagrantly ignored) 
     --[no-]fips     Enable fips mode 
    -F, --format FORMAT    Which format to use for output 
     --[no-]listen    Whether a local mode (-z) server binds to a port 
    -z, --local-mode     Point knife commands at local repository instead of server 
    -u, --user USER     API Client Username 
     --print-after    Show the data after a destructive operation 
    -V, --verbose     More verbose output. Use twice for max verbosity 
    -v, --version     Show chef version 
    -y, --yes      Say yes to all prompts for confirmation 
    -h, --help      Show this message 

그래서이 노드를 삭제할 수 없습니다.

의견이 있으십니까?

+0

'나이프 노드 삭제'-i "를 시도해 보셨습니까? 이것이 한 번만 문제가되기를 바랍니다. 웹 인터페이스를 사용할 수도 있습니다 .. – StephenKing

+0

예. 나는 아무것도 시도하지 않았다. 나는 커맨드 라인에서 시도했다. – Robert

답변

2

:

knife exec -E "nodes.search('name:*i') { |n| n.destroy if n.name == '-i' }" 

당신이 경우는 시간이 걸릴 수 있도록 이름, 내가로 끝나는 모든 노드에 걸쳐이 반복됩니다 그 중 한 묶음이라면 이름이 정확히 -i이면 노드를 파괴 할 것입니다.

부트 스트랩의 결과 일 경우 nodes 대신 clients을 사용해야 클라이언트를 사용할 수 있습니다.

0

웹 인터페이스를 사용하여 삭제할 수 있습니다. 커맨드 라인에서 똑같은 기능을 시도했지만 작동하지 않았습니다. 이 같은 명령 줄에서 삭제할 수 있습니다 검은 마법과 칼 간부의 일종으로