[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2014-01-24 Thread Launchpad Bug Tracker
This bug was fixed in the package cloud-init - 0.7.5~bzr933-0ubuntu1

---
cloud-init (0.7.5~bzr933-0ubuntu1) trusty; urgency=medium

  * debian/control: bump Standards-Version to 3.9.5
  * debian/control: drop boto dependency no longer required in trunk.
  * New upstream snapshot.
* ConfigDrive: consider partitions labelled correctly as possible sources.
* find root filesystem for resizing in cases where there is no initramfs
* removal of dependency on python-boto
* vendor-data support, and usage of that in Joyent datasource.
* change default output to be logged to /var/log/cloud-init-output.log
* SeLinuxGuard: Cast file path to string. (LP: #1260072)
* drop support for resizing via parted (LP: #1212492)
* SmartOS: changes to address changes in platform (LP: #1272115)
* FreeBSD support.
 -- Scott Moser smo...@ubuntu.com   Fri, 24 Jan 2014 22:41:57 -0500

** Changed in: cloud-init (Ubuntu)
   Status: Won't Fix = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2014-01-17 Thread Scott Moser
Ok.
  I'm not even sure if resizepart can be made to work, at all.


$ parted --help | grep resizepart
  resizepart NUMBER ENDresize partition NUMBER

the END seems to be in MB, which is insufficient for my needs.  I'd like it to 
grow it to the next partition.
There isn't a way to just say make it as big as possible.

The undocumented flag for --script is '---pretend-input-tty', but I
can't even seem to make that work.

It just seems to ignore things like this:

$ echo Yes | sudo parted ---pretend-input-tty /dev/vdb resizepart  1 1000 
--machine --script 
Warning: Shrinking a partition can cause data loss, are you sure you want to 
continue?
$ echo $?
0

but it doesn't shrink the partition table

I'm going to remove the support for parted from cloud-init entirely.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2014-01-17 Thread Scott Moser
** Changed in: cloud-init
   Status: Confirmed = Won't Fix

** Changed in: cloud-init (Ubuntu)
   Status: Confirmed = Won't Fix

** No longer affects: parted (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2014-01-17 Thread Scott Moser
** Description changed:

  As reported in bug 1212444, the partition growing is broken if growpart is 
found to be usable.
  There are 2 things that are broken,
   a.) we invoke parted wrong (passing device after 'resizepart' rather than 
before)
   b.) parted seems somewhat broken, and I dont know how to force it to do what 
we want.  See:
  
  $ sudo parted /dev/vda resizepart  --script 1 /dev/null; echo $?
  Warning: Partition /dev/vda1 is being used. Are you sure you want to continue?
  1
  
  Um... yes, parted, i want you to do what I told you to do.
  
  Related bugs:
   * bug 1212444: cc_growpart failed in auto grow mode with Error: Could not 
stat device resizepart - No such file or directory. with parted 2.3-14
+  *  bug 1270203: [parted] no way to use resizepart non-interactively on busy 
partition

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2014-01-17 Thread Phillip Susi
You don't use ---pretend-input-tty in conjunction with --script.  The
point is to pretend that you are a human, not a script.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2013-08-19 Thread Scott Moser
I'm not using '--script' above.  It seems to make no difference in my testing.
Thus the test with 'expect' to try to trick it into using a tty and feed it 
info that way.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2013-08-16 Thread Phillip Susi
You have to not use --script and parse the output for the warning and
answer yes.  I have been mulling over a --force-things system to allow a
script to specify that it expects a specific error and how it should be
handled but it isn't easy the way libparted is structured.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2013-08-16 Thread Scott Moser
** Description changed:

  As reported in bug 1212444, the partition growing is broken if growpart is 
found to be usable.
  There are 2 things that are broken,
-  a.) we invoke parted wrong (passing device after 'resizepart' rather than 
before)
-  b.) parted seems somewhat broken, and I dont know how to force it to do what 
we want.  See:
+  a.) we invoke parted wrong (passing device after 'resizepart' rather than 
before)
+  b.) parted seems somewhat broken, and I dont know how to force it to do what 
we want.  See:
  
  $ sudo parted /dev/vda resizepart  --script 1 /dev/null; echo $?
  Warning: Partition /dev/vda1 is being used. Are you sure you want to continue?
  1
  
+ Um... yes, parted, i want you to do what I told you to do.
  
- Um... yes, parted, i want you to do what I told you to do.
+ Related bugs:
+  * bug 1212444: cc_growpart failed in auto grow mode with Error: Could not 
stat device resizepart - No such file or directory. with parted 2.3-14

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2013-08-16 Thread Scott Moser
I dont think i follow what you meant by parse the output for the
warning and answer yes.

Example:
$ echo 1,1000,L | sudo sfdisk /dev/vdb
$ grep vdb /proc/partitions 
 253   16   20971520 vdb
 253   17 504000 vdb1
$ sudo mkfs /dev/vdb1
$ sudo mount /dev/vdb1 /mnt

## now /dev/vdb is busy (mounted) try to resizepart on it.

$ sudo parted /dev/vdb resizepart 1 /dev/null
Warning: Partition /dev/vdb1 is being used. Are you sure you want to continue?
$ echo $?
1

# so that didn't resize (reading from /dev/null).  Not surprising. 
# try with 'Yes' to stdin.
echo Yes | sudo parted /dev/vdb resizepart 1; echo $?
Warning: Partition /dev/vdb1 is being used. Are you sure you want to continue?
1

I also failed in an attempt with 'expect', but not sure thats relevant
as I dont want to use expect anyway, and I might have done something
wrong.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2013-08-16 Thread Phillip Susi
IIRC, parted assumes --script mode when stdin is not a tty.  There was
an undocumented switch that the test suite uses to override this, or I
thought that expect allocates a pseudo tty (might need a switch) and
that should also do the trick.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2013-08-15 Thread Scott Moser
Phillip,
  I guess that basically means I can't use this. :-(
  It also seems generally broken as the primary reason for 'resizepart' is to 
allow modifying a busy partition table and telling the kernel about it.

  Any ideas on how to proceed?  Should I file a bug/feature request upstream by 
sending mail to bug-parted mailing list ?
  It looks like this has been raised before at 
http://lists.gnu.org/archive/html/bug-parted/2008-02/msg00019.html .


** Also affects: parted (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2013-08-14 Thread Scott Moser
So it looks like we need some way to specify '--force' to parted.  The
use case we have is known to have 'in use' partition that we're trying
to grow.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1212492] Re: cc_growpart broken if parted resizefs found

2013-08-14 Thread Phillip Susi
Currently the only way to have parted resize a busy partition is to use
interactive mode rather than script mode and say yes at the prompt.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1212492

Title:
  cc_growpart broken if parted resizefs found

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1212492/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs