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 1428656 - [WALA][RHEL-7] Sometimes waagent fails to mount the local disk partition
Summary: [WALA][RHEL-7] Sometimes waagent fails to mount the local disk partition
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: WALinuxAgent
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Vitaly Kuznetsov
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-03 03:34 UTC by Yuxin Sun
Modified: 2020-04-15 15:26 UTC (History)
14 users (show)

Fixed In Version: WALinuxAgent-2.2.10-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-26 14:29:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github Azure WALinuxAgent issues 600 0 None None None 2017-03-03 03:34:56 UTC
Red Hat Product Errata RHEA-2017:1321 0 normal SHIPPED_LIVE Windows Azure Linux Agent (WALinuxAgent) bug fix and enhancement update 2017-05-26 18:14:03 UTC

Description Yuxin Sun 2017-03-03 03:34:57 UTC
Description of problem:
Sometimes the waagent mount the local disk partition (/dev/sdb1) before it exists, so that the mount is failed.
The error code of "mount: special device /dev/sdd1 does not exist" is 32, which is the same as "mount: /dev/sdb1 is already mounted" error code. As a result, the waagent regards the "device does not exist" as "already mounted" and create swap file directly even if the /dev/sdb1 is not mounted.

Version-Release number of selected component (if applicable):
WALinuxAgent-2.2.4-1

RHEL Version:
RHEL-7.3 on-demand image
kernel: 3.10.0-514.6.2.el7.x86_64

How reproducible:
30%

Steps to Reproduce:
1. Prepare a RHEL-7.3 VM(Standard_A1) with WALA-2.2.4-1 installed and enabled. Set "ResourceDisk.EnableSwap=y"
2. Reboot the VM.
3. After the VM is booted, check the swap and the mount status:
free -m
mount

Actual Result:
The swap size is 0. The local disk partition is not mounted.

Expect Result:
The local disk partition is mounted.

/var/log/waagent.log:
2017/03/02 11:40:45.629813 INFO Activate resource disk
2017/03/02 11:40:45.666904 INFO Examining partition table
2017/03/02 11:40:45.722347 INFO GPT not detected, determining filesystem
2017/03/02 11:40:45.749369 INFO sfdisk with --part-type failed [1], retrying with -c
2017/03/02 11:40:45.778195 INFO sfdisk -c -f /dev/sdb 1 succeeded
2017/03/02 11:40:45.778361 INFO The partition type is 83
2017/03/02 11:40:45.778469 INFO Mount resource disk [mount /dev/sdb1 /mnt/resource]
2017/03/02 11:40:45.808002 WARNING Resource disk is already mounted: mount: special device /dev/sdb1 does not exist

2017/03/02 11:40:45.808140 INFO Resource disk /dev/sdb is mounted at /mnt/resource with ext4
2017/03/02 11:40:45.810434 INFO Enable swap
2017/03/02 11:40:45.869825 INFO Create swap file
2017/03/02 11:40:46.141439 ERROR run cmd 'swapon /mnt/resource/swapfile' failed
2017/03/02 11:40:46.142272 ERROR Error Code:255
2017/03/02 11:40:46.142349 ERROR Result:swapon: /mnt/resource/swapfile: swapon failed: Invalid argument

2017/03/02 11:40:46.142457 ERROR Failed to enable swap (000005)/mnt/resource/swapfile

Additional Info:
1. I've rebooted 100 times on RHEL-7.3 and this issue occurs 30 times. I also tried 100 times on RHEL-6.9 and it is not observed.
2. It seems that only small size VM(like A1, A2, D1_v2) have this issue. In the large size(D5_v2) it isn't observed.

Comment 8 Johan Burati 2017-04-26 00:00:14 UTC
This problem is fixed in WALinuxAgent version 2.2.8

Ref: https://github.com/Azure/WALinuxAgent/pull/629

Comment 9 Johan Burati 2017-04-26 02:09:33 UTC
When does Red Hat plan to update the version of the package in the repo ?

Comment 10 Takayoshi Tanaka 2017-04-26 02:24:00 UTC
I found 2.2.10 seems to be the next version that Red Hat will release.
https://bugzilla.redhat.com/show_bug.cgi?id=1443425

Comment 11 Vitaly Kuznetsov 2017-04-26 09:09:37 UTC
Yes, please follow https://bugzilla.redhat.com/show_bug.cgi?id=1443425

Comment 13 Yuxin Sun 2017-04-28 07:26:07 UTC
Verify in WALA-2.2.10-1. 

Steps:
reboot VM 1000 times. This issue is not occurred.

Result: Pass

Comment 15 errata-xmlrpc 2017-05-26 14:29:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1321


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