Charm Store是否有变更?部署Juju Charm需指定revision的问题咨询
Charm Store是否有变更?部署Juju Charm需指定revision的问题咨询
最近碰到个头疼的问题——从昨天开始,单纯指定channel部署Juju Charm居然失败了,必须额外加上revision才能成功完成部署。我拿mongodb charm做了测试,具体情况如下:
先查看mongodb charm的信息
执行juju info mongodb得到的结果:
name: mongodb publisher: Canonical Data Platform summary: A Charmed Operator for MongoDB on Machine description: | Build and run MongoDB with Canonical Charm. This product is a MongoDB operator that provides a general-purpose distributed document database. In addition, this repository contains a Juju Charm for deploying MongoDB on machine clusters. Authors This Charm is built by Canonical based on source code published by MongoDB Inc. This product is not endorsed or published by MongoDB, Inc. MongoDB and the logo are trademarks, or registered trademarks of MongoDB Inc. and other parties may also have trademark rights in other terms used herein. store-url: https://charmhub.io/mongodb charm-id: Jfd56ZWJ9IaNHuPjXVLP9d9Xa2XMTSKp supports: jammy tags: databases subordinate: false relations: provides: cos-agent: cos_agent database: mongodb_client obsolete: mongodb requires: certificates: tls-certificates s3-credentials: s3 channels: | 5/stable: 117 2023-04-20 (117) 12MB 5/candidate: 117 2023-04-20 (117) 12MB 5/beta: ↑ 5/edge: 118 2023-05-03 (118) 13MB 3.6/stable: 100 2023-04-28 (100) 860kB 3.6/candidate: 100 2023-04-13 (100) 860kB 3.6/beta: ↑ 3.6/edge: 100 2023-02-03 (100) 860kB
只指定channel部署失败
执行命令juju deploy mongodb --channel 3.6/stable --debug,结果报错:
user@device:~$ juju deploy mongodb --channel 3.6/stable --debug 13:15:56 INFO juju.cmd supercommand.go:56 running juju [2.9.42 7b871e782195bdac9c90f8a8f01723cc3e08ab92 gc go1.18.10] 13:15:56 DEBUG juju.cmd supercommand.go:57 args: []string{"/snap/juju/22345/bin/juju", "deploy", "mongodb", "--channel", "3.6/stable", "--debug"} 13:15:56 INFO juju.juju api.go:86 connecting to API addresses: [10.56.78.131:17070] 13:15:56 DEBUG juju.api apiclient.go:1152 successfully dialed "wss://10.56.78.131:17070/api" 13:15:56 INFO juju.api apiclient.go:687 connection established to "wss://10.56.78.131:17070/api" 13:15:56 INFO juju.juju api.go:86 connecting to API addresses: [10.56.78.131:17070] 13:15:56 DEBUG juju.api apiclient.go:1152 successfully dialed "wss://10.56.78.131:17070/model/47324586-91f3-4c88-8bc5-3bb6acecd4f3/api" 13:15:56 INFO juju.api apiclient.go:687 connection established to "wss://10.56.78.131:17070/model/47324586-91f3-4c88-8bc5-3bb6acecd4f3/api" 13:15:56 DEBUG juju.cmd.juju.application.deployer deployer.go:396 cannot interpret as local charm: file does not exist 13:15:56 DEBUG juju.cmd.juju.application.deployer deployer.go:208 cannot interpret as a redeployment of a local charm from the controller 13:15:56 DEBUG juju.api monitor.go:35 RPC connection died 13:15:56 DEBUG juju.api monitor.go:35 RPC connection died ERROR resolving retry error: No revision was found in the Store. 13:15:56 DEBUG cmd supercommand.go:537 error stack: resolving retry error: No revision was found in the Store. github.com/juju/juju/cmd/juju/application/store.(*CharmAdaptor).ResolveCharm:100: github.com/juju/juju/cmd/juju/application/store.(*CharmAdaptor).ResolveBundleURL:135: github.com/juju/juju/cmd/juju/application/deployer.(*factory).maybeReadRepositoryBundle:464: github.com/juju/juju/cmd/juju/application/deployer.(*factory).GetDeployer:71: github.com/juju/juju/cmd/juju/application.(*DeployCommand).Run:909:
指定revision后部署成功
换成命令juju deploy mongodb --revision 100 --channel stable --debug,就成功了:
user@device:~$ juju deploy mongodb --revision 100 --channel stable --debug 13:19:07 INFO juju.cmd supercommand.go:56 running juju [2.9.42 7b871e782195bdac9c90f8a8f01723cc3e08ab92 gc go1.18.10] 13:19:07 DEBUG juju.cmd supercommand.go:57 args: []string{"/snap/juju/22345/bin/juju", "deploy", "mongodb", "--revision", "100", "--channel", "stable", "--debug"} 13:19:07 INFO juju.juju api.go:86 connecting to API addresses: [10.56.78.131:17070] 13:19:07 DEBUG juju.api apiclient.go:1152 successfully dialed "wss://10.56.78.131:17070/api" 13:19:07 INFO juju.api apiclient.go:687 connection established to "wss://10.56.78.131:17070/api" 13:19:07 INFO juju.juju api.go:86 connecting to API addresses: [10.56.78.131:17070] 13:19:07 DEBUG juju.api apiclient.go:1152 successfully dialed "wss://10.56.78.131:17070/model/47324586-91f3-4c88-8bc5-3bb6acecd4f3/api" 13:19:07 INFO juju.api apiclient.go:687 connection established to "wss://10.56.78.131:17070/model/47324586-91f3-4c88-8bc5-3bb6acecd4f3/api" 13:19:07 DEBUG juju.cmd.juju.application.deployer deployer.go:396 cannot interpret as local charm: file does not exist 13:19:07 DEBUG juju.cmd.juju.application.deployer deployer.go:208 cannot interpret as a redeployment of a local charm from the controller 13:19:07 DEBUG juju.cmd.juju.application.store charmadapter.go:142 cannot interpret as charmstore bundle: (series) != "bundle" 13:19:07 INFO cmd charm.go:452 Preparing to deploy "mongodb" from the charmhub 13:19:09 INFO cmd charm.go:550 Located charm "mongodb" in charm-hub, revision 100 13:19:09 INFO cmd charm.go:236 Deploying "mongodb" from charm-hub charm "mongodb", revision 100 in channel stable on focal 13:19:09 DEBUG juju.api monitor.go:35 RPC connection died 13:19:09 DEBUG juju.api monitor.go:35 RPC connection died 13:19:09 INFO cmd supercommand.go:544 command finished
之前一直都是只指定channel就能正常部署的,突然就必须加revision了,有没有朋友知道这是不是Charm Store最近做了什么变更导致的?或者有没有其他解决办法?
备注:内容来源于stack exchange,提问作者displayname_name




