Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"sfdisk" on Ubuntu 16.04 breaks filesystem detection #457

Closed
imTigger opened this issue Oct 3, 2016 · 3 comments
Closed

"sfdisk" on Ubuntu 16.04 breaks filesystem detection #457

imTigger opened this issue Oct 3, 2016 · 3 comments
Milestone

Comments

@imTigger
Copy link

imTigger commented Oct 3, 2016

How to reproduce:
Deploy an Ubuntu 16.04 machine on Azure, set

ResourceDisk.Format=y

It doesn't format the resource disk as documented

Problem:
"sfdisk -c" emits deprecated warning

sfdisk: --id is deprecated in favour of --part-type

Furthermore, "sfdisk --part-type" output with leading space " 7" therefore rstrip won't work.

https://github.com/Azure/WALinuxAgent/blob/47442f76a98e2fd647bf8d3099d5354529dfa03b/azurelinuxagent/daemon/resourcedisk/default.py

Impact:
Resource disk with ntfs filesystem is not detected and mkfs-ed, and mounted as-is

@alyukhan
Copy link

We observing this issue with increasing frequency on Ubuntu 16.04 as sell.

@jinhyunr
Copy link
Contributor

What version of waagent are you seeing this issue? If the version is not 2.2, does updating to the latest ver, 2.2, fix the issue?

@imTigger
Copy link
Author

imTigger commented Nov 1, 2016

Yes, problem does persist in 2.2.0

2016/11/01 14:34:37.466152 INFO Activate resource disk
2016/11/01 14:34:37.487227 INFO Detect GPT...
2016/11/01 14:34:37.653683 INFO GPT not detected
2016/11/01 14:34:37.666371 INFO Check fstype
2016/11/01 14:34:37.685410 INFO Mount resource disk
2016/11/01 14:34:37.731627 INFO Resource disk (/dev/sdb) is mounted at /mnt with fstype ext4
2016/11/01 14:34:37.754025 WARNING Failed to write data loss warnning:[Errno 30] Read-only file system: '/mnt/DATALOSS_WARNING_README.txt'
2016/11/01 14:34:37.781241 INFO Enable swap
2016/11/01 14:34:37.798038 INFO Create swap file
2016/11/01 14:34:37.810941 ERROR run cmd 'dd if=/dev/zero of=/mnt/swapfile bs=1024 count=20971520' failed
2016/11/01 14:34:37.843744 ERROR Error Code:1
2016/11/01 14:34:37.858728 ERROR Result:dd: failed to open '/mnt/swapfile': Read-only file system

2016/11/01 14:34:37.897843 ERROR run cmd 'mkswap /mnt/swapfile' failed
2016/11/01 14:34:37.918128 ERROR Error Code:1
2016/11/01 14:34:37.930051 ERROR Result:mkswap: cannot open /mnt/swapfile: No such file or directory

2016/11/01 14:34:37.958108 ERROR run cmd 'swapon /mnt/swapfile' failed
2016/11/01 14:34:37.974239 ERROR Error Code:255
2016/11/01 14:34:37.981251 ERROR Result:swapon: stat of /mnt/swapfile failed: No such file or directory

2016/11/01 14:34:37.993521 ERROR Failed to enable swap (000005)/mnt/swapfile

...

root@hostname:~/WALinuxAgent-2.2.0# lsblk -f
NAME   FSTYPE LABEL             UUID                                 MOUNTPOINT
fd0
sda
└─sda1 ext4   cloudimg-rootfs   a01e2ccd-9f22-4bd5-9515-6a83c8e13966 /
sdb
└─sdb1 ntfs   Temporary Storage DEE28C59E28C37B3                     /mnt

root@hostname:~/WALinuxAgent-2.2.0# waagent -version
WALinuxAgent-2.2.0 running on ubuntu 16.04
Python: 2.7.12
Goal state agent: 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants