chef-infra - Chef 服务器升级问题 - 对非编码对象进行编码
问题描述
我正在尝试将我现有的厨师服务器12.19.31
从13.3.1
.
我使用https://github.com/chef/chef-server上的说明构建了这个版本
然后我安装了这个包。
sudo dpkg -i chef-server-core_13.3.1+20201008233604-1_amd64.deb (Reading database ... 153055 files and directories currently installed.) Preparing to unpack chef-server-core_13.3.1+20201008233604-1_amd64.deb ... Unpacking chef-server-core (13.3.1+20201008233604-1) over (12.19.31-1) ... Setting up chef-server-core (13.3.1+20201008233604-1) ... You have upgraded Chef Server!
The next step in the upgrade process is to run:
chef-server-ctl upgrade
After the upgrade command completes, your Chef services will remain in a down state. To bring them back up run:
chef-server-ctl start
Then, to remove configuration files, logs, directories, users, etc. that were used by internal services that have been removed from this version of Chef Server, please run:
chef-server-ctl cleanup
(Add the '--no-op' option to see what would be removed by this command)
For detailed upgrade instructions please see: https://docs.chef.io/upgrade_server.html
然后我运行命令chef-server-ctl upgrade
------------------------------------------------------------------- The service postgresql is running externally and cannot be managed vi
chef-server-ctl. Please log into chef-dev-db-tawny.tinyspeck.com to
manage it directly.
------------------------------------------------------------------- /opt/opscode/embedded/service/gem/ruby/2.6.0/gems/sequel-3.34.1/lib/sequel/database/schema_generator.rb:19:
warning: constant ::Fixnum is deprecated
/opt/opscode/embedded/service/gem/ruby/2.6.0/gems/sequel-3.34.1/lib/sequel/database/schema_generator.rb:19:
warning: constant ::Bignum is deprecated [private-chef-upgrade] -
ERROR: migration-level not initialized. [private-chef-upgrade] -
ERROR: If this is an existing Chef Server install try running
`chef-server-ctl rebuild-migration-state` and then retry the upgrade
最后我跑了sudo chef-server-ctl rebuild-migration-state
,我收到以下错误,
/opt/opscode/embedded/service/gem/ruby/2.6.0/gems/sequel-3.34.1/lib/sequel/database/schema_generator.rb:19:
warning: constant ::Fixnum is deprecated
/opt/opscode/embedded/service/gem/ruby/2.6.0/gems/sequel-3.34.1/lib/sequel/database/schema_generator.rb:19:
warning: constant ::Bignum is deprecated [private-chef-upgrade] -
Infering migration-level from system state bundler: failed to load
command: ./bin/partybus (./bin/partybus) ArgumentError: cannot set
encoding on non-encoding capable object
/opt/opscode/embedded/service/partybus/lib/partybus/migration_api/v1.rb:123:in
`exec'
/opt/opscode/embedded/service/partybus/lib/partybus/migration_api/v1.rb:123:in
`check_sqitch' (eval):13:in `block in load_migration'
/opt/opscode/embedded/service/partybus/lib/partybus/migration_api/v1.rb:16:in
`instance_eval'
/opt/opscode/embedded/service/partybus/lib/partybus/migration_api/v1.rb:16:in
`initialize'
/opt/opscode/embedded/service/partybus/lib/partybus/dsl_runner.rb:42:in
`new'
/opt/opscode/embedded/service/partybus/lib/partybus/dsl_runner.rb:42:in
`run_check'
/opt/opscode/embedded/service/partybus/lib/partybus/dsl_runner.rb:25:in
`check'
/opt/opscode/embedded/service/partybus/lib/partybus/migrations.rb:46:in
`run_check'
/opt/opscode/embedded/service/partybus/bin/partybus:90:in `block in
infer_migration_state'
/opt/opscode/embedded/service/partybus/bin/partybus:89:in `each'
/opt/opscode/embedded/service/partybus/bin/partybus:89:in
`infer_migration_state'
/opt/opscode/embedded/service/partybus/bin/partybus:168:in `block in
<top (required)>'
/opt/opscode/embedded/service/partybus/bin/partybus:159:in `open'
/opt/opscode/embedded/service/partybus/bin/partybus:159:in `<top
(required)>'
我被卡住了,无法弄清楚发生了什么。任何帮助将不胜感激。
解决方案
我遇到了同样的问题(版本略有不同),并且能够通过以下步骤解决问题:
- 使用您要从中迁移的版本(即 v12.19.31)部署新的 Chef 基础架构服务器
- 从新服务器(在步骤 1 中创建)复制
/var/opt/opscode/upgrades/migration-level
到您尝试升级的原始服务器。 chef-server-ctl upgrade
在您尝试升级的服务器上重新运行。
推荐阅读
- javascript - 来自 ActivatedRoute 的 Angular 承诺不适用于 Typescript await
- javascript - 如何获取超级父div宽度并根据超级父div宽度设置子div和父div宽度
- c# - postgresql 附近出现错误 42601 语法
- mysql - IF 条件在存储过程中不起作用
- shell - 如何将环境变量作为 Dockerfile 中 shell 脚本的参数传递?
- javascript - 我如何让机器人忽略某些角色// Discord.js
- android - android清单错误@xml/文件路径
- spring - 使用 JAVA 进行 Elasticsearch UpdateByQueryRequestBuilder 单元测试
- java - Android:自定义键盘可以记录用户输入的文本吗?
- docker - SSH 配置文件端口转发在 Docker 中未按预期工作(撰写)