etcd service not started when external storage is attached

Bug #1960393 reported by Hemanth Nakkina
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Etcd Charm
Fix Released
High
Hemanth Nakkina

Bug Description

etcd service is not started when charm-etcd is deployed with external storage.

Error message in snap.etcd.etcd.service =>
error listing data dir: /media/etcd/data

Steps to reproduce:
juju create-storage-pool osfast cinder
juju add-machine -n 3 --constraints="cores=2 mem=4G root-disk=20G"
juju deploy etcd -n 3 --to 0,1,2 --storage data=osfast,1G
juju deploy cs:~containers/easyrsa
juju add-relation etcd easyrsa

This will leave the etcd units in the following state:

etcd/0 waiting idle 0 10.5.1.106 Waiting to retry etcd registration
etcd/1* active idle 1 10.5.0.85 2379/tcp Errored with 0 known peers
etcd/2 waiting idle 2 10.5.0.111 Waiting to retry etcd registration

On investigation, found the following on dmesg
[ 1535.526364] audit: type=1400 audit(1644396267.071:161): apparmor="DENIED" operation="open" profile="snap.etcd.etcd" name="/media/etcd/data/" pid=37014 comm="etcd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

Seems the removable-media interface is not connected for etcd snap
$ sudo snap connections etcd
Interface Plug Slot Notes
home etcd:home :home -
network-bind etcd:network-bind :network-bind -
removable-media etcd:removable-media - -

Manually connecting removable-media for etcd snap resolved the problem.
On each etcd unit, ran the following command
sudo snap connect etcd:removable-media :removable-media

Tags: sts
Changed in charm-etcd:
assignee: nobody → Hemanth Nakkina (hemanth-n)
Revision history for this message
Hemanth Nakkina (hemanth-n) wrote :
Changed in charm-etcd:
status: New → In Progress
tags: added: sts
Adam Dyess (addyess)
Changed in charm-etcd:
status: In Progress → Fix Committed
Adam Dyess (addyess)
Changed in charm-etcd:
milestone: none → 1.24
George Kraft (cynerva)
Changed in charm-etcd:
importance: Undecided → High
Adam Dyess (addyess)
Changed in charm-etcd:
milestone: 1.24 → 1.23+ck1
Changed in charm-etcd:
milestone: 1.23+ck1 → 1.24
Changed in charm-etcd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.