シェフサーバーの自動バックアップを設定しようとしましたが、タールフェーズでタイムアウトしています。私は手動でタールを走らせました.20分以上かかるようですが、デフォルトのタイムアウトは10分です。私は--timeoutを使ってみましたが、6000のような高い値に設定しましたが、600秒後にはタイムアウトします。chef-server-ctl backup not honoring --timeout
出力:
[email protected]:/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef_backup-0.0.1# /usr/bin/chef-server-ctl backup --yes --timeout 60000
Locating rsync..
/usr/bin/rsync
Starting Chef Server backup
Bringing down the Chef Server
ok: down: bookshelf: 1s, 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: 1s, normally up
ok: down: opscode-erchef: 0s, normally up
ok: down: opscode-expander: 0s, normally up
ok: down: opscode-solr4: 0s, normally up
ok: down: rabbitmq: 0s, normally up
ok: down: redis_lb: 0s, normally up
Dumping Postgresql database to /tmp/chef_backup20170613-7603-1hsvyr5/chef_backup-2017-06-13-16-55-10.sql
could not change directory to "/tmp/d20170613-7603-xpkmet"
ok: down: postgresql: 0s, normally up
Writing backup manifest
Creating backup tarball
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.6/lib/mixlib/shellout/unix.rb:183: warning: conflicting chdir during another chdir block
tar: Removing leading `/' from member names
ERROR: Something wen't terribly wrong, aborting backup
ERROR: Command timed out after 600s:
Command exceeded allowed execution time, process terminated
---- Begin output of tar -czf /tmp/chef_backup20170613-7603-1hsvyr5/chef-backup-2017-06-13-16-55-10.tgz /var/opt/opscode/rabbitmq/db /var/opt/opscode/opscode-solr4/data /var/opt/opscode/redis_lb/data /var/opt/opscode/postgresql/9.2/data /var/opt/opscode/bookshelf/data /v
ar/opt/opscode/upgrades /etc/opscode /etc/opscode-manage /etc/opscode-reporting /etc/opscode-push-jobs-server /etc/opscode-analytics manifest.json chef_backup-2017-06-13-16-55-10.sql ----
STDOUT:
STDERR: /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.6/lib/mixlib/shellout/unix.rb:183: warning: conflicting chdir during another chdir block
tar: Removing leading `/' from member names
---- End output of tar -czf /tmp/chef_backup20170613-7603-1hsvyr5/chef-backup-2017-06-13-16-55-10.tgz /var/opt/opscode/rabbitmq/db /var/opt/opscode/opscode-solr4/data /var/opt/opscode/redis_lb/data /var/opt/opscode/postgresql/9.2/data /var/opt/opscode/bookshelf/data /var
/opt/opscode/upgrades /etc/opscode /etc/opscode-manage /etc/opscode-reporting /etc/opscode-push-jobs-server /etc/opscode-analytics manifest.json chef_backup-2017-06-13-16-55-10.sql ----
Ran tar -czf /tmp/chef_backup20170613-7603-1hsvyr5/chef-backup-2017-06-13-16-55-10.tgz /var/opt/opscode/rabbitmq/db /var/opt/opscode/opscode-solr4/data /var/opt/opscode/redis_lb/data /var/opt/opscode/postgresql/9.2/data /var/opt/opscode/bookshelf/data /var/opt/opscode/up
grades /etc/opscode /etc/opscode-manage /etc/opscode-reporting /etc/opscode-push-jobs-server /etc/opscode-analytics manifest.json chef_backup-2017-06-13-16-55-10.sql returned
任意の考え?
編集:ここ
私はタールを作成していると考えているコードは次のとおりです。/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/から
def create_tarball
log 'Creating backup tarball'
cmd = [
"tar -czf #{tmp_dir}/#{export_filename}",
data_map.services.map { |_, v| v['data_dir'] }.compact.join(' '),
data_map.configs.map { |_, v| v['data_dir'] }.compact.join(' '),
Dir["#{tmp_dir}/*"].map { |f| File.basename(f) }.join(' ')
].join(' ').strip
res = shell_out(cmd, cwd: tmp_dir)
res
end
chef_backup/master/lib/chef_backup/helpers.rbファイル内のshell_out関数が12.6.0で古くなっていたように見えて、chef_backup-0.0.1/lib/chef_backup/strategy/backup/tar.rbファイル
'tar'アクションを実行している関連する実行文/コードを含めることができますか? – JohnLBevan
私はそれを見つけるためにシェフコードを掘り下げなければならないでしょう。私と一緒に熊と私がそれを見つけることができる場合に表示されます。 更新オリジナルの投稿 – user3062065