Public bug reported:

for resizeing filesystems cc_resizefs.py, needs to check if the running
system is a container, this is done in util.py.

for vservers the test always ends up true, since the VxID: line in
/proc/self/status sometimes has a space, or a tab or noting.

to make the detection work a bit better i added .strip() to the compare
line.

now my vserver enabled host is resized as expected.

I have added a small patch.


my example /procy/self/status:

root@niels-6:~# cat /proc/self/status 
Name:   cat
State:  R (running)
Tgid:   3319
Pid:    3319
PPid:   3165
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 256
Groups: 0 
VmPeak:     4372 kB
VmSize:     4372 kB
VmLck:         0 kB
VmPin:         0 kB
VmHWM:       608 kB
VmRSS:       608 kB
VmData:      312 kB
VmStk:       136 kB
VmExe:        48 kB
VmLib:      1788 kB
VmPTE:        32 kB
VmSwap:        0 kB
Threads:        1
SigQ:   1/16074
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000000
SigCgt: 0000000000000000
CapInh: 0000000000000000
CapPrm: ffffffffffffffff
CapEff: ffffffffffffffff
CapBnd: ffffffffffffffff
Cpus_allowed:   3
Cpus_allowed_list:      0-1
Mems_allowed:   00000000,00000001
Mems_allowed_list:      0
VxID: 0
NxID: 0
voluntary_ctxt_switches:        2
nonvoluntary_ctxt_switches:     0

** Affects: cloud-init
     Importance: Undecided
         Status: New

** Patch added: "cloud-init.util.patch"
   
https://bugs.launchpad.net/bugs/1499350/+attachment/4473292/+files/cloud-init.util.patch

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1499350

Title:
  vserver guest results in always container

Status in cloud-init:
  New

Bug description:
  for resizeing filesystems cc_resizefs.py, needs to check if the
  running system is a container, this is done in util.py.

  for vservers the test always ends up true, since the VxID: line in
  /proc/self/status sometimes has a space, or a tab or noting.

  to make the detection work a bit better i added .strip() to the
  compare line.

  now my vserver enabled host is resized as expected.

  I have added a small patch.

  
  my example /procy/self/status:

  root@niels-6:~# cat /proc/self/status 
  Name: cat
  State:        R (running)
  Tgid: 3319
  Pid:  3319
  PPid: 3165
  TracerPid:    0
  Uid:  0       0       0       0
  Gid:  0       0       0       0
  FDSize:       256
  Groups:       0 
  VmPeak:           4372 kB
  VmSize:           4372 kB
  VmLck:               0 kB
  VmPin:               0 kB
  VmHWM:             608 kB
  VmRSS:             608 kB
  VmData:            312 kB
  VmStk:             136 kB
  VmExe:              48 kB
  VmLib:            1788 kB
  VmPTE:              32 kB
  VmSwap:              0 kB
  Threads:      1
  SigQ: 1/16074
  SigPnd:       0000000000000000
  ShdPnd:       0000000000000000
  SigBlk:       0000000000000000
  SigIgn:       0000000000000000
  SigCgt:       0000000000000000
  CapInh:       0000000000000000
  CapPrm:       ffffffffffffffff
  CapEff:       ffffffffffffffff
  CapBnd:       ffffffffffffffff
  Cpus_allowed: 3
  Cpus_allowed_list:    0-1
  Mems_allowed: 00000000,00000001
  Mems_allowed_list:    0
  VxID: 0
  NxID: 0
  voluntary_ctxt_switches:      2
  nonvoluntary_ctxt_switches:   0

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to