RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1977216 - [Azure][WALA][RHEL-9]swapfile size is incorrect if value is not integer multiple of 64M in ext4 filesystem
Summary: [Azure][WALA][RHEL-9]swapfile size is incorrect if value is not integer multi...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: WALinuxAgent
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: beta
: ---
Assignee: Vitaly Kuznetsov
QA Contact: Yuxin Sun
URL:
Whiteboard:
Depends On: 1977215
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-29 08:37 UTC by Yuxin Sun
Modified: 2023-01-09 22:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1977215
Environment:
Last Closed: 2022-12-29 07:27:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github Azure WALinuxAgent issues 2286 0 None open [BUG] swapfile size is incorrect if value is not integer multiple of 64M in ext4 filesystem 2021-06-29 08:37:26 UTC
Github Azure WALinuxAgent pull 2601 0 None open Use append mode in 'dd' when the desired swap size is not a multiple of 64M (#2286) 2022-12-06 10:03:30 UTC

Description Yuxin Sun 2021-06-29 08:37:27 UTC
+++ This bug was initially created as a clone of Bug #1977215 +++

Description of problem:
In ext4 filesystem, if set the swapfile size as non-integer multiple of 64M(e.g. 1025), the actual swapfile size is 1024. The remaining sizes are not added.

Version-Release number of selected components (if applicable):
WALinuxAgent-2.3.0.2-1.el8.noarch.rpm

How reproducible:
100%

Steps to Reproduce:
1. Prepare a VM on Azure, install WALinuxAgent package
2. Modify /etc/waagent.conf:
ResourceDisk.EnableSwap=y
ResourceDisk.SwapSizeMB=1025
ResourceDisk.Filesystem=ext4
3. systemctl restart waagent.service
4. free -m

Actual results:
Swap:          1023

Expected results:
Swap:          1024

Additional info:
If enable verbose log we can see:
2021-06-29T07:24:18.819616Z INFO Daemon Daemon Create swap file
2021-06-29T07:24:18.820073Z VERBOSE Daemon Daemon Command: [umask 0077 && dd if=/dev/zero bs=67108864 count=16 conv=notrunc of='/mnt/resource/swapfile']
2021-06-29T07:24:20.011228Z VERBOSE Daemon Daemon Command: [umask 0077 && dd if=/dev/zero bs=1048576 count=1 conv=notrunc of='/mnt/resource/swapfile']
If run these 2 commands manually, the second command doesn't work.

Comment 6 RHEL Program Management 2022-12-29 07:27:45 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


Note You need to log in before you can comment on or make changes to this bug.