question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updating cloud based OS images - configuration required for Azure RHEL LVM images

See original GitHub issue

Is your feature request related to a problem? Azure RHEL RAW images are no longer being produced in favor of LVM-partitioned images (link). To have the latest updates we need to switch to LVM images. The default file system configuration in LVM images is not sufficient for Epiphany. Partitioning for a 64GB disk is as follows:

[operations@ci-devazurrhelflannel-kubernetes-master-vm-0 ~]$ df -h
Filesystem                 Size  Used Avail Use% Mounted on
devtmpfs                   3.4G     0  3.4G   0% /dev
tmpfs                      3.4G     0  3.4G   0% /dev/shm
tmpfs                      3.4G  9.1M  3.4G   1% /run
tmpfs                      3.4G     0  3.4G   0% /sys/fs/cgroup
/dev/mapper/rootvg-rootlv  2.0G   66M  2.0G   4% /
/dev/mapper/rootvg-usrlv    10G  1.4G  8.7G  14% /usr
/dev/mapper/rootvg-varlv   8.0G  7.9G   96M  99% /var
/dev/sda2                  494M   77M  418M  16% /boot
/dev/mapper/rootvg-homelv 1014M   33M  982M   4% /home
/dev/mapper/rootvg-optlv   2.0G  140M  1.9G   7% /opt
/dev/sda1                  500M  9.7M  491M   2% /boot/efi
/dev/mapper/rootvg-tmplv   2.0G   96M  1.9G   5% /tmp
/dev/sdb1                   14G   41M   13G   1% /mnt
tmpfs                      680M     0  680M   0% /run/user/1000

which results in an issue downloading the requirements: Error writing blob: write /var/tmp/docker-tarfile-blob336544209: no space left on device.

Describe the solution you’d like

LVM must be reconfigured to give us the ability to use the latest RHEL LVM images RedHat:RHEL:7-LVM:7.8.2020042719. Until then we use the latest RAW image RedHat:RHEL:7-RAW:7.7.2019090418.

Describe alternatives you’ve considered

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sk4zuzucommented, Dec 8, 2020

This is quite crazy it’s in todo just like that after the spike 😃 It’s a complex and dangerous procedure, IMO it requires further research and maybe some working ansible POC first? 🤔

0reactions
przemyslaviccommented, Mar 3, 2021

✔️ Fixed. Now Ansible waits for epiphany-lvm-merge.service to finish.

Mar 03 13:19:02 ci-devazurrhelflannel-repository-vm-0 epiphany-lvm-merge.sh[1876]: *** Finished script: /usr/local/sbin/epiphany-lvm-merge.sh at 13:19:02.516041465
Mar 03 13:19:02 ci-devazurrhelflannel-repository-vm-0 epiphany-lvm-merge.sh[1876]: *** Elapsed time: 0min 45s
[38;21m13:18:55 INFO cli.engine.ansible.AnsibleCommand - TASK [preflight : Check if epiphany-lvm-merge.service exists] ******************[0m
[38;21m13:18:57 INFO cli.engine.ansible.AnsibleCommand - ok: [ci-devazurrhelflannel-logging-vm-0][0m
[38;21m13:19:00 INFO cli.engine.ansible.AnsibleCommand - ok: [ci-devazurrhelflannel-repository-vm-0][0m

[38;21m13:19:00 INFO cli.engine.ansible.AnsibleCommand - TASK [preflight : Wait for epiphany-lvm-merge.service to finish] ***************[0m
[38;21m13:19:03 INFO cli.engine.ansible.AnsibleCommand - ok: [ci-devazurrhelflannel-repository-vm-0][0m
[38;21m13:19:03 INFO cli.engine.ansible.AnsibleCommand - ok: [ci-devazurrhelflannel-logging-vm-0][0m

Tested with the image RedHat:RHEL:7-LVM:7.9.2020111202 and the following config (had to increase the disk size to 64GB).

---
kind: infrastructure/virtual-machine
name: repository-machine-rhel
provider: azure
based_on: repository-machine
specification:
  storage_image_reference:
    publisher: $(image_publisher)
    offer: $(image_offer)
    sku: $(image_sku)
    version: $(image_version)
  storage_os_disk:
    disk_size_gb: 64

Partitioning for a 64GB disk is as follows:

[operations@ci-devazurrhelflannel-repository-vm-0 ~]$ df -h
Filesystem                 Size  Used Avail Use% Mounted on
devtmpfs                   1.6G     0  1.6G   0% /dev
tmpfs                      1.7G     0  1.7G   0% /dev/shm
tmpfs                      1.7G  9.2M  1.6G   1% /run
tmpfs                      1.7G     0  1.7G   0% /sys/fs/cgroup
/dev/mapper/rootvg-rootlv   54G  1.4G   52G   3% /
/dev/mapper/rootvg-usrlv    10G  1.4G  8.7G  14% /usr
/dev/sda2                  494M   76M  418M  16% /boot
/dev/sda1                  500M  9.9M  490M   2% /boot/efi
/dev/sdb1                  6.8G   32M  6.4G   1% /mnt
tmpfs                      329M     0  329M   0% /run/user/1001
Read more comments on GitHub >

github_iconTop Results From Across the Web

Overview of Red Hat Enterprise Linux images in Azure
Microsoft and Red Hat update images as new minor versions are released, as required to address specific common vulnerabilities and exposures ( ...
Read more >
Chapter 1. Deploying a Red Hat Enterprise Linux image as a ...
To manually configure a virtual machine (VM), first create a base (starter) VM image. Then, you can modify configuration settings and add the...
Read more >
Building a RHEL gold image for Azure - GitLab
9.1. Verify the admin user account · 9.2. Verify httpd is installed · 9.3. Verify example configuration file · 9.4. Verify that the...
Read more >
Import virtual disks | Compute Engine Documentation
To enable a seamless experience when importing images, ensure that you've granted required IAM roles to your account, the Cloud Build service account,...
Read more >
Adding Azure hosts to Satellite - IBM Cloud Docs
You can create your IBM Cloud Satellite location by using hosts that you added from Microsoft Azure. If you want to use Red...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found