Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sbonds/2712e68c11377a2b85b58d836a908e6d to your computer and use it in GitHub Desktop.
Save sbonds/2712e68c11377a2b85b58d836a908e6d to your computer and use it in GitHub Desktop.
OEL 7.7 WALinuxAgent.conf RPM Packaging Issue Demo

OEL 7.7 WALinuxAgent.conf RPM Packaging Issue Demo

Create Test VM in Azure

Specs:

  • Image: OEL 7.7
  • Size: B1

Initial sosreport

/var/tmp/sosreport-oel-77-3-22619966791-2020-03-17-atlgaln.tar.xz

Save a copy of /etc/waagent.conf

cp /etc/waagent.conf /root/.

Change /etc/waagent.conf

echo "# This is a comment intended just to make a change" >> /etc/waagent.conf

Confirm the change exists

tail /etc/waagent.conf

Returns:

# Add firewall rules to protect access to Azure host node services
OS.EnableFirewall=y

# Enforce control groups limits on the agent and extensions
CGroups.EnforceLimits=n

# CGroups which are excluded from limits, comma separated
CGroups.Excluded=customscript,runcommand
# This is a comment intended just to make a change

Install WALinuxAgent update

yum install WALinuxAgent

Returns:

yum install WALinuxAgent
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package WALinuxAgent.noarch 0:2.2.45-1.el7 will be updated
---> Package WALinuxAgent.noarch 0:2.2.46-1.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch          Version              Repository         Size
================================================================================
Updating:
 WALinuxAgent        noarch        2.2.46-1.el7         ol7_addons        414 k

Transaction Summary
================================================================================
Upgrade  1 Package

Total download size: 414 k

Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
WALinuxAgent-2.2.46-1.el7.noarch.rpm                       | 414 kB   00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : WALinuxAgent-2.2.46-1.el7.noarch                             1/2
  Cleanup    : WALinuxAgent-2.2.45-1.el7.noarch                             2/2
  Verifying  : WALinuxAgent-2.2.46-1.el7.noarch                             1/2
  Verifying  : WALinuxAgent-2.2.45-1.el7.noarch                             2/2

Updated:
  WALinuxAgent.noarch 0:2.2.46-1.el7

Complete!

Observe /etc/waagent.conf changes are gone

Comment is gone

tail /etc/waagent.conf

Returns:

# OS.AllowHTTP=n

# Add firewall rules to protect access to Azure host node services
OS.EnableFirewall=y

# Enforce control groups limits on the agent and extensions
CGroups.EnforceLimits=n

# CGroups which are excluded from limits, comma separated
CGroups.Excluded=customscript,runcommand

Swap space will be disabled on the next boot

# diff --context /root/waagent.conf /etc/waagent.conf
*** /root/waagent.conf  2020-03-17 23:53:24.521465201 +0000
--- /etc/waagent.conf   2020-01-09 01:21:01.000000000 +0000
***************
*** 51,60 ****
  ResourceDisk.MountPoint=/mnt/resource

  # Create and use swapfile on resource disk.
! ResourceDisk.EnableSwap=y

  # Size of the swapfile.
! ResourceDisk.SwapSizeMB=2048

  # Comma-seperated list of mount options. See man(8) for valid options.
  ResourceDisk.MountOptions=None
--- 51,60 ----
  ResourceDisk.MountPoint=/mnt/resource

  # Create and use swapfile on resource disk.
! ResourceDisk.EnableSwap=n

  # Size of the swapfile.
! ResourceDisk.SwapSizeMB=0

  # Comma-seperated list of mount options. See man(8) for valid options.
  ResourceDisk.MountOptions=None
***************
*** 131,134 ****

  # CGroups which are excluded from limits, comma separated
  CGroups.Excluded=customscript,runcommand
- # This is a comment intended just to make a change

This is really the issue that creates the largest problem since Oracle/SAP hosts like to have swap available.

Create another sosreport since Oracle wanted it

Reboot and create yet another report showing the results of a normal patching process

No more swap.

$ cat /proc/swaps
Filename                                Type            Size    Used    Priority
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment