Trust permissions not ready on install hook in sidecar charms
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Harry Pidcock |
Bug Description
Description of the problem: when deploying a charm with `--trust`, the charm does not have the trust on `install` hook.
Juju version: 2.9.12
How to reproduce:
```
# install microk8s
# install juju
# bootstrap juju controller to microk8s
sudo snap install charmcraft --classic
git clone https:/
cd oai-bundle/
git checkout -b bug-trust-
juju add-model test-oai
./deploy.sh
watch -c juju status --color
```
Some of the charms will go to error state, but they will eventually recover.
Logs:
```
unit-smf-0: 17:03:39 ERROR unit.smf/0.juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
File "./src/charm.py", line 327, in <module>
main(
File "/var/lib/
framework.
File "/var/lib/
self._reemit()
File "/var/lib/
custom_
File "./src/charm.py", line 90, in _on_install
self.
File "./src/charm.py", line 312, in _patch_stateful_set
s = api.read_
File "/var/lib/
return self.read_
File "/var/lib/
return self.api_
File "/var/lib/
return self.__
File "/var/lib/
response_data = self.request(
File "/var/lib/
return self.rest_
File "/var/lib/
return self.request("GET", url,
File "/var/lib/
raise ApiException(
kubernetes.
Reason: Forbidden
HTTP response headers: HTTPHeaderDict(
HTTP response body: {"kind"
unit-smf-0: 17:03:39 ERROR juju.worker.
```
Changed in juju: | |
importance: | Undecided → High |
status: | New → In Progress |
assignee: | nobody → Harry Pidcock (hpidcock) |
milestone: | none → 2.9-next |
Changed in juju: | |
milestone: | 2.9-next → 2.9.17 |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |