knife-tidy icon indicating copy to clipboard operation
knife-tidy copied to clipboard

Installs, doesn't run

Open cmagnuso-pimco opened this issue 7 years ago • 5 comments

$ sudo gem install knife-tidy Successfully installed knife-tidy-1.1.0 Parsing documentation for knife-tidy-1.1.0 Done installing documentation for knife-tidy after 0 seconds 1 gem installed

$ sudo knife tidy server report --orgs xxx --node-threshold 50 FATAL: Cannot find subcommand for: 'tidy server report --orgs xxx --node-threshold 50'

cmagnuso-pimco avatar Apr 13 '18 18:04 cmagnuso-pimco

@cmagnuso-pimco one way that this can happen is if you install the gem outside of either a ChefDK or Chef client (ie. a stand-alone ruby installation) That is because not all of the Chef libraries are present.

If that was the case here, please install a current ChefDK or chef-client first. Then attempt a re-install of knife-tidy.

If using a ChefDK install then you can install knife-tidy via: chef gem install knife-tidy

Or if using a Chef client install then install knife-tidy via: /opt/opscode/embedded/bin/gem install knife-tidy

With all the chef libraries installed, you shouldn't get the FATAL: Cannot find subcommand error.

jeremymv2 avatar Apr 13 '18 19:04 jeremymv2

Hmm. I’ve had no luck at all. I tried installing the ChefDK both via RPM –Uvh and the curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -c current -P chefdk procedure and still get the problem.

From: Jeremy Miller [mailto:[email protected]] Sent: Friday, April 13, 2018 12:21 PM To: chef-customers/knife-tidy Cc: Magnuson, Chris; Mention Subject: Re: [chef-customers/knife-tidy] Installs, doesn't run (#83)

@cmagnuso-pimcohttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cmagnuso-2Dpimco&d=DwMFaQ&c=91HTncUBNS9Yv-Uuv2IlCA&r=jxY0LkCTDyddBe5fvX4p0kAImf6zMe_KUudTjgoI-JE&m=Q8-PNyM4vK0VYMTJCxXhyKvcRNeov0oNibh35DKTe8E&s=g02OqIbYU8PUL1iKt1ncbsYwpLTMcJVG-YmFuy16hEI&e= one way that this can happen is if you install the gem outside of either a ChefDK or Chef client (ie. a stand-alone ruby installation) That is because not all of the Chef libraries are present.

If that was the case here, please install a current ChefDK or chef-client first. Then attempt a re-install of knife-tidy.

If using a ChefDK installhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_chef_chef-2Ddk-23installation&d=DwMFaQ&c=91HTncUBNS9Yv-Uuv2IlCA&r=jxY0LkCTDyddBe5fvX4p0kAImf6zMe_KUudTjgoI-JE&m=Q8-PNyM4vK0VYMTJCxXhyKvcRNeov0oNibh35DKTe8E&s=RQ4qQKGJB0hAbw4LgIXgL8aCwP0xdHzHJ-Ww_xvkiOg&e= then you can install knife-tidy via: chef gem install knife-tidy

Or if using a Chef client installhttps://urldefense.proofpoint.com/v2/url?u=https-3A__docs.chef.io_install-5Fomnibus.html-23unix-2Dand-2Dlinux&d=DwMFaQ&c=91HTncUBNS9Yv-Uuv2IlCA&r=jxY0LkCTDyddBe5fvX4p0kAImf6zMe_KUudTjgoI-JE&m=Q8-PNyM4vK0VYMTJCxXhyKvcRNeov0oNibh35DKTe8E&s=9F7Kle6UQCuGxne5tLV2BYwgS8jJeu3EohjNMKgg68I&e= then install knife-tidy via: /opt/opscode/embedded/bin/gem install knife-tidy

With all the chef libraries installed, you shouldn't get the FATAL: Cannot find subcommand error.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_chef-2Dcustomers_knife-2Dtidy_issues_83-23issuecomment-2D381236962&d=DwMFaQ&c=91HTncUBNS9Yv-Uuv2IlCA&r=jxY0LkCTDyddBe5fvX4p0kAImf6zMe_KUudTjgoI-JE&m=Q8-PNyM4vK0VYMTJCxXhyKvcRNeov0oNibh35DKTe8E&s=hl1uyXyFpWuJQY7VVaYjmN3BGiZujIQxkxfuvdi_7_c&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AghxDrdQK1nqdWin7FVqHtg2C136vGoVks5toPqSgaJpZM4TT4-5FR&d=DwMFaQ&c=91HTncUBNS9Yv-Uuv2IlCA&r=jxY0LkCTDyddBe5fvX4p0kAImf6zMe_KUudTjgoI-JE&m=Q8-PNyM4vK0VYMTJCxXhyKvcRNeov0oNibh35DKTe8E&s=XvwnVJ3Qzn03F4tKgjngVW_6FmFcBZepVWKSoQ_Wp_o&e=. This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute, alter or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or without error as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise during or as a result of e-mail transmission. If verification is required, please request a hard-copy version. This message is provided for information purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments in any jurisdiction. Securities are offered in the U.S. through PIMCO Investments LLC, distributor and a company of PIMCO LLC.

The individual providing the information herein is an employee of Pacific Investment Management Company LLC ("PIMCO"), an SEC-registered investment adviser. To the extent such individual advises you regarding a PIMCO investment strategy, he or she does so as an associated person of PIMCO. To the extent that any information is provided to you related to a PIMCO-sponsored investment fund ("PIMCO Fund"), it is being provided to you in the individual's capacity as a registered representative of PIMCO Investments LLC ("PI"), an SEC-registered broker-dealer. PI is not registered, and does not intend to register, as a municipal advisor and therefore does not provide advice with respect to the investment of the proceeds of municipal securities or municipal escrow investments. In addition, unless otherwise agreed by PIMCO, this communication and any related attachments are being provided on the express basis that they will not cause PIMCO LLC, or its affiliates, to become an investment advice fiduciary under ERISA or the Internal Revenue Code.

cmagnuso-pimco avatar Apr 13 '18 19:04 cmagnuso-pimco

I have same issue:

[root@ knife-tidy-master]# /opt/opscode/embedded/bin/gem list

*** LOCAL GEMS ***

activesupport (5.1.4) addressable (2.5.2, 2.5.1, 2.4.0) appbundler (0.10.0) artifactory (2.8.2) ast (2.3.0) bcrypt (3.1.11) berkshelf (5.6.5) berkshelf-api-client (3.0.0) bigdecimal (default: 1.3.0) binding_of_caller (0.7.3) buff-config (2.0.0) buff-extensions (2.0.0) buff-ignore (1.2.0) buff-ruby_engine (1.0.0) buff-shell_out (1.1.0) builder (3.2.3) bundler (1.16.1) byebug (9.1.0) celluloid (0.16.0) celluloid-io (0.16.2) chef (12.21.31) chef-config (13.0.118, 12.21.31) chef-zero (5.3.2) chef_backup (0.0.1) cheffish (5.0.1) chefstyle (0.5.0) cleanroom (1.0.0) coderay (1.1.2) concurrent-ruby (1.0.5) debug_inspector (0.0.3) did_you_mean (1.1.0) diff-lcs (1.3) docile (1.1.5) domain_name (0.5.20170404) erubis (2.7.0) faraday (0.13.1, 0.9.2) faraday-http-cache (2.0.0) ffi (1.9.18) ffi-yajl (2.3.1) fuzzyurl (0.9.0) hashie (3.5.6, 3.5.5) highline (1.7.10, 1.6.21) hitimes (1.2.4) http-cookie (1.0.3) httpclient (2.8.3) i18n (0.9.1) iniparse (1.4.4) io-console (default: 0.4.6) ipaddress (0.8.3) json (2.1.0, default: 2.0.4, 1.8.6) knife-ec-backup (2.4.0, 2.2.3) knife-opc (0.3.2) knife-tidy (1.2.0) libyajl2 (1.2.0) method_source (0.9.0) mime-types (2.99.3) mini_portile2 (2.3.0, 2.1.0) minitar (0.6.1) minitest (5.10.3, 5.10.1) mixlib-archive (0.4.1) mixlib-authentication (1.4.2, 1.4.1) mixlib-cli (1.7.0) mixlib-config (2.2.4) mixlib-install (3.8.0, 2.1.5) mixlib-log (1.7.1) mixlib-shellout (2.3.2, 2.2.7) mixlib-versioning (1.2.2) molinillo (0.5.7) multi_json (1.12.2) multipart-post (2.0.0) net-scp (1.2.1) net-sftp (2.1.2) net-ssh (4.2.0) net-ssh-gateway (1.3.0) net-ssh-multi (1.2.1) net-telnet (0.1.1) netrc (0.11.0) nio4r (2.0.0) nokogiri (1.8.2, 1.7.2) octokit (4.7.0) ohai (8.25.1, 8.23.0) omnibus-ctl (0.5.0) openssl (default: 2.0.5) parser (2.4.0.2) pbkdf2 (0.1.0) pg (0.17.1) plist (3.4.0) power_assert (0.4.1) powerpack (0.1.1) proxifier (1.0.3) pry (0.11.3) pry-byebug (3.5.1) pry-remote (0.1.8) pry-stack_explorer (0.4.9.2) psych (default: 2.2.2) public_suffix (3.0.1, 2.0.5) rack (2.0.3) rainbow (2.2.2) rake (12.3.0, 12.0.0) rb-readline (0.5.5) rdoc (default: 5.0.0) redis (3.3.3) rest-client (1.8.0) retriable (3.1.1) retryable (2.0.4) ridley (5.1.0) rspec (3.7.0) rspec-core (3.7.0) rspec-expectations (3.7.0) rspec-its (1.2.0) rspec-mocks (3.7.0) rspec-support (3.7.0) rspec_junit_formatter (0.2.3) rubocop (0.47.1) ruby-prof (0.16.2) ruby-progressbar (1.9.0) ruby-shadow (2.5.0) rubygems-update (2.6.13) sawyer (0.8.1) semverse (2.0.0) sequel (4.47.0) serverspec (2.41.3) sfl (2.3) simplecov (0.13.0) simplecov-html (0.10.2) slop (3.6.0) solve (3.1.0) specinfra (2.72.1) syslog-logger (1.6.8) systemu (2.6.5) test-unit (3.2.3) thor (0.20.0, 0.19.1) thread_safe (0.3.6) timers (4.0.4) tzinfo (1.2.4) unf (0.1.4) unf_ext (0.0.7.4) unicode-display_width (1.3.0) uuidtools (2.1.5, 2.1.3) varia_model (0.6.0) veil (0.3.0) wmi-lite (1.0.0) xmlrpc (0.2.1)

[root@ knife-tidy-master]# /opt/opscode/embedded/bin/knife tidy FATAL: Cannot find subcommand for: 'tidy' Available subcommands: (for details, knife SUB-COMMAND --help)

lukum2118 avatar Jul 25 '18 20:07 lukum2118

There was something that came up that was weird, like whether you were installing it on the Chef server or on a workstation node, the presence of the ChefDK, the version of Ruby, the state of recent solar activity, etc. I didn’t get it working until I worked with Chef support.

CJ

From: lukum2118 [mailto:[email protected]] Sent: Wednesday, July 25, 2018 1:53 PM To: chef-customers/knife-tidy Cc: Magnuson, Chris; Mention Subject: Re: [chef-customers/knife-tidy] Installs, doesn't run (#83)

I have same issue:

[root@ knife-tidy-master]# /opt/opscode/embedded/bin/gem list

*** LOCAL GEMS ***

activesupport (5.1.4) addressable (2.5.2, 2.5.1, 2.4.0) appbundler (0.10.0) artifactory (2.8.2) ast (2.3.0) bcrypt (3.1.11) berkshelf (5.6.5) berkshelf-api-client (3.0.0) bigdecimal (default: 1.3.0) binding_of_caller (0.7.3) buff-config (2.0.0) buff-extensions (2.0.0) buff-ignore (1.2.0) buff-ruby_engine (1.0.0) buff-shell_out (1.1.0) builder (3.2.3) bundler (1.16.1) byebug (9.1.0) celluloid (0.16.0) celluloid-io (0.16.2) chef (12.21.31) chef-config (13.0.118, 12.21.31) chef-zero (5.3.2) chef_backup (0.0.1) cheffish (5.0.1) chefstyle (0.5.0) cleanroom (1.0.0) coderay (1.1.2) concurrent-ruby (1.0.5) debug_inspector (0.0.3) did_you_mean (1.1.0) diff-lcs (1.3) docile (1.1.5) domain_name (0.5.20170404) erubis (2.7.0) faraday (0.13.1, 0.9.2) faraday-http-cache (2.0.0) ffi (1.9.18) ffi-yajl (2.3.1) fuzzyurl (0.9.0) hashie (3.5.6, 3.5.5) highline (1.7.10, 1.6.21) hitimes (1.2.4) http-cookie (1.0.3) httpclient (2.8.3) i18n (0.9.1) iniparse (1.4.4) io-console (default: 0.4.6) ipaddress (0.8.3) json (2.1.0, default: 2.0.4, 1.8.6) knife-ec-backup (2.4.0, 2.2.3) knife-opc (0.3.2) knife-tidy (1.2.0) libyajl2 (1.2.0) method_source (0.9.0) mime-types (2.99.3) mini_portile2 (2.3.0, 2.1.0) minitar (0.6.1) minitest (5.10.3, 5.10.1) mixlib-archive (0.4.1) mixlib-authentication (1.4.2, 1.4.1) mixlib-cli (1.7.0) mixlib-config (2.2.4) mixlib-install (3.8.0, 2.1.5) mixlib-log (1.7.1) mixlib-shellout (2.3.2, 2.2.7) mixlib-versioning (1.2.2) molinillo (0.5.7) multi_json (1.12.2) multipart-post (2.0.0) net-scp (1.2.1) net-sftp (2.1.2) net-ssh (4.2.0) net-ssh-gateway (1.3.0) net-ssh-multi (1.2.1) net-telnet (0.1.1) netrc (0.11.0) nio4r (2.0.0) nokogiri (1.8.2, 1.7.2) octokit (4.7.0) ohai (8.25.1, 8.23.0) omnibus-ctl (0.5.0) openssl (default: 2.0.5) parser (2.4.0.2) pbkdf2 (0.1.0) pg (0.17.1) plist (3.4.0) power_assert (0.4.1) powerpack (0.1.1) proxifier (1.0.3) pry (0.11.3) pry-byebug (3.5.1) pry-remote (0.1.8) pry-stack_explorer (0.4.9.2) psych (default: 2.2.2) public_suffix (3.0.1, 2.0.5) rack (2.0.3) rainbow (2.2.2) rake (12.3.0, 12.0.0) rb-readline (0.5.5) rdoc (default: 5.0.0) redis (3.3.3) rest-client (1.8.0) retriable (3.1.1) retryable (2.0.4) ridley (5.1.0) rspec (3.7.0) rspec-core (3.7.0) rspec-expectations (3.7.0) rspec-its (1.2.0) rspec-mocks (3.7.0) rspec-support (3.7.0) rspec_junit_formatter (0.2.3) rubocop (0.47.1) ruby-prof (0.16.2) ruby-progressbar (1.9.0) ruby-shadow (2.5.0) rubygems-update (2.6.13) sawyer (0.8.1) semverse (2.0.0) sequel (4.47.0) serverspec (2.41.3) sfl (2.3) simplecov (0.13.0) simplecov-html (0.10.2) slop (3.6.0) solve (3.1.0) specinfra (2.72.1) syslog-logger (1.6.8) systemu (2.6.5) test-unit (3.2.3) thor (0.20.0, 0.19.1) thread_safe (0.3.6) timers (4.0.4) tzinfo (1.2.4) unf (0.1.4) unf_ext (0.0.7.4) unicode-display_width (1.3.0) uuidtools (2.1.5, 2.1.3) varia_model (0.6.0) veil (0.3.0) wmi-lite (1.0.0) xmlrpc (0.2.1)

[root@ knife-tidy-master]# /opt/opscode/embedded/bin/knife tidy FATAL: Cannot find subcommand for: 'tidy' Available subcommands: (for details, knife SUB-COMMAND --help)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_chef-2Dcustomers_knife-2Dtidy_issues_83-23issuecomment-2D407891827&d=DwMFaQ&c=91HTncUBNS9Yv-Uuv2IlCA&r=jxY0LkCTDyddBe5fvX4p0kAImf6zMe_KUudTjgoI-JE&m=PxTDcnqrEVJifZLSIcENhPjOmj1qbrjLG3iN6XnBj84&s=zd9W84OCG7d5KxwEQSqmnkIgCxx-j1OxEvgp8O3_c_U&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AghxDkinE3-2DhJBwfuxzVtekzgkq39maEks5uKNrIgaJpZM4TT4-5FR&d=DwMFaQ&c=91HTncUBNS9Yv-Uuv2IlCA&r=jxY0LkCTDyddBe5fvX4p0kAImf6zMe_KUudTjgoI-JE&m=PxTDcnqrEVJifZLSIcENhPjOmj1qbrjLG3iN6XnBj84&s=sJETjwdciJBexl3i60ySNm-0YP40wy_OraMF74yu5BU&e=. This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute, alter or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or without error as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise during or as a result of e-mail transmission. If verification is required, please request a hard-copy version. This message is provided for information purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments in any jurisdiction. Securities are offered in the U.S. through PIMCO Investments LLC, distributor and a company of PIMCO LLC.

The individual providing the information herein is an employee of Pacific Investment Management Company LLC ("PIMCO"), an SEC-registered investment adviser. To the extent such individual advises you regarding a PIMCO investment strategy, he or she does so as an associated person of PIMCO. To the extent that any information is provided to you related to a PIMCO-sponsored investment fund ("PIMCO Fund"), it is being provided to you in the individual's capacity as a registered representative of PIMCO Investments LLC ("PI"), an SEC-registered broker-dealer. PI is not registered, and does not intend to register, as a municipal advisor and therefore does not provide advice with respect to the investment of the proceeds of municipal securities or municipal escrow investments. In addition, unless otherwise agreed by PIMCO, this communication and any related attachments are being provided on the express basis that they will not cause PIMCO LLC, or its affiliates, to become an investment advice fiduciary under ERISA or the Internal Revenue Code.

cmagnuso-pimco avatar Jul 25 '18 20:07 cmagnuso-pimco

well, i noticed that installation is unpredictable. I am using Chef server. On version 12.15.17 I could install it but on 12.17.33 could not. And after an hour of fighting with gem somehow i could install it that Chef instance as well. But on next one I could not install it even after two hours and second one has exactly same gem, ruby, solar phase. I will work with Chef support, thanks

lukum2118 avatar Jul 25 '18 21:07 lukum2118