u-r-c should better handle ephemeral volumes by creating missing directories and symlinks

Bug #1835319 reported by Haw Loeung
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu Repository Cache Charm
Won't Fix
Undecided
Unassigned

Bug Description

Hi,

In at least one of our cloud providers, we use ephemeral volumes to store both the metadata as well as the squid cache. During reboots, it's possible that the volume is lost and a new one assigned. Unfortunately, this causes two issues:

* labels are used in /etc/fstab

Instances fail to boot because it's unable to mount the device as the filesystem label no longer exists. Here's the /etc/fstab entry, perhaps this is created by walinux agent?:

| LABEL=urc_0 /srv/ubuntu-repository-cache/ephemeral/0 ext4 defaults 0 0

With the boot error:

| [ TIME ] Timed out waiting for device dev-disk-by\x2dlabel-urc_0.device.
| [DEPEND] Dependency failed for /srv/ubuntu-repository-cache/ephemeral/0.
| [DEPEND] Dependency failed for Local File Systems.
| Press Enter for maintenance
| (or press Control-D to continue):

* directories and symlinks are missing

The other thing is, the structure required by both apache and squid are missing on new volumes. The charm should really check that these exists (both cluster-relation-join and config-changed hooks?) and if not create those. They are:

| ubuntu@machine-6:~$ grep ephem /etc/apache2/sites-enabled/archive_ubuntu_com.conf
| DocumentRoot /srv/ubuntu-repository-cache/ephemeral/0/apache/www
| <Directory "/srv/ubuntu-repository-cache/ephemeral/0/apache">

| ubuntu@machine-6:~$ ls -la /srv/ubuntu-repository-cache/ephemeral/0/apache/www
| lrwxrwxrwx 1 root root 66 Jul 3 00:27 ubuntu -> /srv/ubuntu-repository-cache/ephemeral/0/apache/data/ubuntu_active

| ubuntu@machine-6:~$ grep ephem /etc/squid-deb-proxy/squid-deb-proxy.conf
| cache_dir aufs /srv/ubuntu-repository-cache/ephemeral/0/squid 62388 16 256

For squid, it requires cache directory to exist, and 'squid -z' to create the cache hierachy.

Revision history for this message
Junien F (axino) wrote :
Haw Loeung (hloeung)
Changed in ubuntu-repository-cache:
status: New → Confirmed
Revision history for this message
Haw Loeung (hloeung) wrote :

Going to close this off, we're using Juju storage now rather than the provided ephemeral volumes.

Changed in ubuntu-repository-cache:
status: Confirmed → Won't Fix
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.