Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chef-server-ctl backup fails due to missing rsync #647

Open
vinyar opened this issue Dec 1, 2015 · 3 comments
Open

chef-server-ctl backup fails due to missing rsync #647

vinyar opened this issue Dec 1, 2015 · 3 comments
Labels
Aspect: Documentation How do we use this project? Component: omnibus packaging Status: To be prioritized Indicates that product needs to prioritize this issue. Triage: Feature Request Indicates an issue requesting new functionality.

Comments

@vinyar
Copy link

vinyar commented Dec 1, 2015

Bug:
running chef-server-ctl on a fresh install of CentOS provided by Azure, the backup command throws an error due to missing rsync

Expectation:
backup should work without external dependencies or it should notify the user of missing dependencies

Details:

Starting Chef Server backup
WARNING:  Offline backup mode must stop your Chef server before continuing.  You can skip this message by passing a "--yes" argument. Do you wish to proceed? (y/N):
y
Bringing down the Chef Server
ok: down: bookshelf: 0s, normally up
ok: down: nginx: 1s, normally up
ok: down: oc_bifrost: 0s, normally up
ok: down: oc_id: 0s, normally up
ok: down: opscode-chef-mover: 517266s, normally up
ok: down: opscode-erchef: 0s, normally up
ok: down: opscode-expander: 0s, normally up
ok: down: opscode-expander-reindexer: 0s, normally up
ok: down: opscode-reporting: 1s, normally up
ok: down: opscode-solr4: 0s, normally up
ok: down: rabbitmq: 0s, normally up
ok: down: redis_lb: 1s, normally up
Dumping Postgresql database to /tmp/chef_backup20151201-5526-1k70r5a/chef_backup-2015-12-01-21-53-38.sql
could not change directory to "/root/temp"
ok: down: postgresql: 0s, normally up
Writing backup manifest
Creating backup tarball
tar: Removing leading `/' from member names
Bringing up the Chef Server
ok: run: bookshelf: (pid 5745) 0s
ok: run: nginx: (pid 5799) 0s
ok: run: oc_bifrost: (pid 5820) 1s
ok: run: oc_id: (pid 5874) 1s
ok: run: opscode-chef-mover: (pid 5890) 0s
ok: run: opscode-erchef: (pid 5939) 0s
ok: run: opscode-expander: (pid 5966) 0s
ok: run: opscode-expander-reindexer: (pid 5998) 1s
ok: run: opscode-reporting: (pid 6040) 0s
ok: run: opscode-solr4: (pid 6124) 0s
ok: run: postgresql: (pid 6172) 1s
ok: run: rabbitmq: (pid 6229) 1s
ok: run: redis_lb: (pid 6501) 0s
Exporting tarball to /var/opt/chef-backup
ERROR: Something wen't terribly wrong, aborting backup
ERROR: No such file or directory - rsync
Cleaning up /tmp/chef_backup20151201-5526-1k70r5a
Bringing up the Chef Server
ok: run: bookshelf: (pid 5745) 62s
ok: run: nginx: (pid 5799) 61s
ok: run: oc_bifrost: (pid 5820) 62s
ok: run: oc_id: (pid 5874) 61s
ok: run: opscode-chef-mover: (pid 5890) 60s
ok: run: opscode-erchef: (pid 5939) 60s
ok: run: opscode-expander: (pid 5966) 59s
ok: run: opscode-expander-reindexer: (pid 5998) 59s
ok: run: opscode-reporting: (pid 6040) 58s
ok: run: opscode-solr4: (pid 6124) 57s
ok: run: postgresql: (pid 6172) 57s
ok: run: rabbitmq: (pid 6229) 57s
ok: run: redis_lb: (pid 6501) 56s
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.0.rc.0/lib/mixlib/shellout/unix.rb:338:in `exec': No such file or directory - rsync (Errno::ENOENT)
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.0.rc.0/lib/mixlib/shellout/unix.rb:338:in `block in fork_subprocess'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.0.rc.0/lib/mixlib/shellout/unix.rb:316:in `fork'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.0.rc.0/lib/mixlib/shellout/unix.rb:316:in `fork_subprocess'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.0.rc.0/lib/mixlib/shellout/unix.rb:93:in `run_command'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.0.rc.0/lib/mixlib/shellout.rb:259:in `run_command'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef_backup-0.0.1.dev.4/lib/chef_backup/helpers.rb:47:in `shell_out'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef_backup-0.0.1.dev.4/lib/chef_backup/strategy/backup/tar.rb:173:in `export_tarball'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef_backup-0.0.1.dev.4/lib/chef_backup/strategy/backup/tar.rb:145:in `backup'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef_backup-0.0.1.dev.4/lib/chef_backup/runner.rb:28:in `backup'
        from (eval):30:in `block in load_file'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.4.2/lib/omnibus-ctl.rb:190:in `call'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.4.2/lib/omnibus-ctl.rb:190:in `block in add_command_under_category'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.4.2/lib/omnibus-ctl.rb:661:in `run'
        from /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl:192:in `<main>'

workaround:
yum install rsync
chef-server-ctl backup -y

reference: chef/chef#4217

@stevendanna
Copy link
Contributor

We should add this to the documentation. We should also check for the presence of rsync and present a nice message to the user.

@vinyar
Copy link
Author

vinyar commented Dec 3, 2015

reference on why it cant be included as part of chef package:
https://github.com/chef/chef-server/blob/master/omnibus/config/software/chef_backup-gem.rb#L22-L25

@vinyar
Copy link
Author

vinyar commented Apr 25, 2016

If not already, checking for rsync should be in chef-server-ctl test

@PrajaktaPurohit PrajaktaPurohit added the Status: Untriaged An issue that has yet to be triaged. label Oct 11, 2019
@PrajaktaPurohit PrajaktaPurohit added Aspect: Documentation How do we use this project? Triage: Feature Request Indicates an issue requesting new functionality. Component: omnibus packaging Status: To be prioritized Indicates that product needs to prioritize this issue. and removed Status: Untriaged An issue that has yet to be triaged. labels Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aspect: Documentation How do we use this project? Component: omnibus packaging Status: To be prioritized Indicates that product needs to prioritize this issue. Triage: Feature Request Indicates an issue requesting new functionality.
Projects
None yet
Development

No branches or pull requests

3 participants