Chef12 and backup

Ohai Chef’s!

Since the update do Chef12, my backup script has broken:

$ knife backup export -D /backup/chef


Backing up clients vermont2
Backing up clients vermont1
Backing up users
ERROR: You authenticated successfully to https://chef as admin but you are
not authorized for this action
Response: missing read permission

I also tried to use the knife-ec-backup, but I can’t install:

/opt/opscode/embedded/bin/gem install knife-ec-backup

ERROR: Error installing knife-ec-backup:
ohai requires Ruby version >= 2.0.0.

And… how can I get the private key from user “pivotal”?

Thanks a lot!


– Tiago Cruz

On Wed Dec 17 08:04:22 2014, Tiago Cruz wrote:

I also tried to use the knife-ec-backup, but I can't install:

...
# /opt/opscode/embedded/bin/gem install knife-ec-backup
ERROR:  Error installing knife-ec-backup:
ohai requires Ruby version >= 2.0.0.
...

you should be able to fix that by adding --minimal-deps

Thanks Lamont!

Where should I pass this option?

[root@mordor ~]# /opt/opscode/embedded/bin/gem install knife-ec-backup
--minimal-deps
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --minimal-deps

[root@mordor ~]# /opt/opscode/embedded/bin/gem install --minimal-deps
knife-ec-backup
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --minimal-deps

[root@mordor ~]# /opt/opscode/embedded/bin/gem --minimal-deps install
knife-ec-backup
ERROR: Invalid option: --minimal-deps. See 'gem --help'.

Thanks a lot!

On Wed, Dec 17, 2014 at 8:10 PM, Lamont Granquist lamont@chef.io wrote:

On Wed Dec 17 08:04:22 2014, Tiago Cruz wrote:

I also tried to use the knife-ec-backup, but I can't install:

...
# /opt/opscode/embedded/bin/gem install knife-ec-backup
ERROR:  Error installing knife-ec-backup:
ohai requires Ruby version >= 2.0.0.
...

you should be able to fix that by adding --minimal-deps

--
-- Tiago Cruz

yeah, the chef-11 rubygems is ancient and probably doesn't support that
option.

you can do: /opt/chef/embedded/bin/gem update --system which will
update to 2.4.5, but then you'll have all the fun of recompiling all of
the native gems in the bundle and any that you've chef_gem installed
(it'll complain about the need to 'gem pristine' various gems).

i'd advise getting off of chef-11 ASAP. as issues with the old
rubygems become worse we won't be able to solve them by rolling it
forwards in chef-11.

we're going to look at doing the next release of chef-11 with the
maximum rubygems bump that we can make which may make it more
maintainable, but chef-11 may fairly quickly run out of usable runway.

On Wed Dec 17 14:24:50 2014, Tiago Cruz wrote:

Thanks Lamont!

Where should I pass this option?

[root@mordor ~]# /opt/opscode/embedded/bin/gem install knife-ec-backup
--minimal-deps
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --minimal-deps

[root@mordor ~]# /opt/opscode/embedded/bin/gem install --minimal-deps
knife-ec-backup
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --minimal-deps

[root@mordor ~]# /opt/opscode/embedded/bin/gem --minimal-deps install
knife-ec-backup
ERROR: Invalid option: --minimal-deps. See 'gem --help'.

Thanks a lot!

On Wed, Dec 17, 2014 at 8:10 PM, Lamont Granquist <lamont@chef.io
mailto:lamont@chef.io> wrote:

On Wed Dec 17 08:04:22 2014, Tiago Cruz wrote:


    I also tried to use the knife-ec-backup, but I can't install:

        ...
        # /opt/opscode/embedded/bin/gem install knife-ec-backup
        ERROR:  Error installing knife-ec-backup:
        ohai requires Ruby version >= 2.0.0.
        ...


you should be able to fix that by adding --minimal-deps

--
-- Tiago Cruz

Hum... so, just to confirm:

Now that the update has been done, I can just run "rpm -e chef-server" and
be happy?

[tiago.cruz@mordor ~]$ rpm -qa | grep chef
chef-server-11.0.12-1.el6.x86_64
chef-server-core-12.0.0-1.el6.x86_64
chef-12.0.0-1.x86_64

Thanks a lot, Lamont!

On Wed, Dec 17, 2014 at 9:16 PM, Lamont Granquist lamont@chef.io wrote:

yeah, the chef-11 rubygems is ancient and probably doesn't support that
option.

you can do: /opt/chef/embedded/bin/gem update --system which will
update to 2.4.5, but then you'll have all the fun of recompiling all of the
native gems in the bundle and any that you've chef_gem installed (it'll
complain about the need to 'gem pristine' various gems).

i'd advise getting off of chef-11 ASAP. as issues with the old rubygems
become worse we won't be able to solve them by rolling it forwards in
chef-11.

we're going to look at doing the next release of chef-11 with the maximum
rubygems bump that we can make which may make it more maintainable, but
chef-11 may fairly quickly run out of usable runway.

On Wed Dec 17 14:24:50 2014, Tiago Cruz wrote:

Thanks Lamont!

Where should I pass this option?

[root@mordor ~]# /opt/opscode/embedded/bin/gem install knife-ec-backup
--minimal-deps
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --minimal-deps

[root@mordor ~]# /opt/opscode/embedded/bin/gem install --minimal-deps
knife-ec-backup
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --minimal-deps

[root@mordor ~]# /opt/opscode/embedded/bin/gem --minimal-deps install
knife-ec-backup
ERROR: Invalid option: --minimal-deps. See 'gem --help'.

Thanks a lot!

On Wed, Dec 17, 2014 at 8:10 PM, Lamont Granquist <lamont@chef.io
mailto:lamont@chef.io> wrote:

On Wed Dec 17 08:04:22 2014, Tiago Cruz wrote:


    I also tried to use the knife-ec-backup, but I can't install:

        ...
        # /opt/opscode/embedded/bin/gem install knife-ec-backup
        ERROR:  Error installing knife-ec-backup:
        ohai requires Ruby version >= 2.0.0.
        ...


you should be able to fix that by adding --minimal-deps

--
-- Tiago Cruz

--
-- Tiago Cruz

Uhm, I'd be awfully cautious about that, and I'm not the expert there.
I can think of a few ways that'd be the right call, and I can think of
a few ways that'd go horribly wrong.

Hopefully someone from the server team will poke their head in here and
give an authoritative answer.

On Wed Dec 17 16:58:23 2014, Tiago Cruz wrote:

Hum... so, just to confirm:

Now that the update has been done, I can just run "rpm -e chef-server"
and be happy?

[tiago.cruz@mordor ~]$ rpm -qa | grep chef
chef-server-11.0.12-1.el6.x86_64
chef-server-core-12.0.0-1.el6.x86_64
chef-12.0.0-1.x86_64

Thanks a lot, Lamont!

On Wed, Dec 17, 2014 at 9:16 PM, Lamont Granquist <lamont@chef.io
mailto:lamont@chef.io> wrote:

yeah, the chef-11 rubygems is ancient and probably doesn't support
that option.

you can do:  `/opt/chef/embedded/bin/gem update --system` which
will update to 2.4.5, but then you'll have all the fun of
recompiling all of the native gems in the bundle and any that
you've chef_gem installed (it'll complain about the need to 'gem
pristine' various gems).

i'd advise getting off of chef-11 ASAP.  as issues with the old
rubygems become worse we won't be able to solve them by rolling it
forwards in chef-11.

we're going to look at doing the next release of chef-11 with the
maximum rubygems bump that we can make which may make it more
maintainable, but chef-11 may fairly quickly run out of usable runway.

On Wed Dec 17 14:24:50 2014, Tiago Cruz wrote:

    Thanks Lamont!

    Where should I pass this option?

    [root@mordor ~]# /opt/opscode/embedded/bin/gem install
    knife-ec-backup
    --minimal-deps
    ERROR:  While executing gem ... (OptionParser::InvalidOption)
        invalid option: --minimal-deps

    [root@mordor ~]# /opt/opscode/embedded/bin/gem install
    --minimal-deps
    knife-ec-backup
    ERROR:  While executing gem ... (OptionParser::InvalidOption)
        invalid option: --minimal-deps

    [root@mordor ~]# /opt/opscode/embedded/bin/gem --minimal-deps
    install
    knife-ec-backup
    ERROR:  Invalid option: --minimal-deps.  See 'gem --help'.

    Thanks a lot!

    On Wed, Dec 17, 2014 at 8:10 PM, Lamont Granquist
    <lamont@chef.io <mailto:lamont@chef.io>
    <mailto:lamont@chef.io <mailto:lamont@chef.io>>> wrote:

        On Wed Dec 17 08:04:22 2014, Tiago Cruz wrote:


            I also tried to use the knife-ec-backup, but I can't
    install:

                ...
                # /opt/opscode/embedded/bin/gem install
    knife-ec-backup
                ERROR:  Error installing knife-ec-backup:
                ohai requires Ruby version >= 2.0.0.
                ...


        you should be able to fix that by adding --minimal-deps



    --
    -- Tiago Cruz

--
-- Tiago Cruz