[Yahoo-eng-team] [Bug 1724128] Re: Need a Success / Failure notification mechanism when cloud-init finishes.

2018-03-05 Thread Sankar Tanguturi
** Also affects: cloud-init
   Importance: Undecided
   Status: New

-- 
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/1724128

Title:
  Need a Success / Failure notification mechanism when cloud-init
  finishes.

Status in cloud-init:
  New
Status in open-vm-tools package in Ubuntu:
  New

Bug description:
  I discussed this issue during the 'cloud-init' summit that happened in
  August 2017. Logging a bug for tracking purposes. Today, there is no
  way for datasources to get notified about success / failure when
  cloud-init finishes executing.

  Following is an example:

  > From cloudinit/sources/DataSourceOVF.py

  # TODO: Need to set the status to DONE only when the
  # customization is done successfully.
  enable_nics(self._vmware_nics_to_enable)
  set_customization_status(
  GuestCustStateEnum.GUESTCUST_STATE_DONE,
  GuestCustErrorEnum.GUESTCUST_ERROR_SUCCESS)

  Ideally, the datasourceOVF wants to get notified when the cloud-init
  finally completes. Then, the datasource needs to send success /
  failure events to the underlying hypervisor. But today the mechanism /
  framework is not available. So, the datasourceOVF just blindly returns
  SUCCESS to the hypervisor without even waiting for the completion.

  We really really need a better framework / mechanism to handle
  situations like this. Please do let me know if any information is
  requried.

  Thanks
  Sankar.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1724128/+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


[Yahoo-eng-team] [Bug 1749980] [NEW] ds-identify doesn't properly detect ISO

2018-02-16 Thread Sankar Tanguturi
Public bug reported:

I have a proper ISO image mounted for my virtual machine but still 'ds-
identify' doesn't properly detect OVF datasource in my virtual machine.
On further investigation, found a minor issue with 'read_fs_info()'
function in ds-identify.

#
In read_fs_info()

out=$(blkid -c /dev/null -o export) || {
ret=$?
error "failed running [$ret]: blkid -c /dev/null -o export"
DI_FS_LABELS="$UNAVAILABLE:error"
DI_ISO9660_DEVS="$UNAVAILABLE:error"
return $ret
}
IFS="$CR"
set -- $out
IFS="$oifs"
for line in "$@" ""; do
case "${line}" in
DEVNAME=*) dev=${line#DEVNAME=};;
LABEL=*) label="${line#LABEL=}";
 labels="${labels}${line#LABEL=}${delim}";;
TYPE=*) ftype=${line#TYPE=};;
"") if [ "$ftype" = "iso9660" ]; then
isodevs="${isodevs} ${dev}=$label"
fi
ftype=""; devname=""; label="";
esac
done

This function parses the output for blkid and then sets the 'isodevs' _only_ 
when there is an entry other than DEVNAME, UUID, LABEL, TYPE for iso9660 
entries. This is not quite right. In my test environment, (as seen below), the 
other entry PARTUUID, etc was not present.
#

Inside the virtual machine:

$ sudo blkid -c /dev/null -o export

DEVNAME=/dev/sr0
UUID=2009-04-20-15-30-24-00
LABEL=OVF\ Customization
TYPE=iso9660

DEVNAME=/dev/sda1
UUID=2f09aea2-6411-444e-9d5b-32c0aa25c067
TYPE=ext4
PARTUUID=70ae1e13-01

In the blkid command output, for the ISO that I have mounted, only
DEVNAME, UUID, LABEL and TYPE entries were present. No other entry was
present. If there was another entry like PARTUUID, ds-identify would
have properly detected the OVF datasource.

Logging a bug to fix read_fs_info to properly parse the output of blkid.

Please let me know if any other information is required.

Thanks
Sankar.

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

-- 
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/1749980

Title:
  ds-identify doesn't properly detect ISO

Status in cloud-init:
  New

Bug description:
  I have a proper ISO image mounted for my virtual machine but still
  'ds-identify' doesn't properly detect OVF datasource in my virtual
  machine. On further investigation, found a minor issue with
  'read_fs_info()' function in ds-identify.

  #
  In read_fs_info()

  out=$(blkid -c /dev/null -o export) || {
  ret=$?
  error "failed running [$ret]: blkid -c /dev/null -o export"
  DI_FS_LABELS="$UNAVAILABLE:error"
  DI_ISO9660_DEVS="$UNAVAILABLE:error"
  return $ret
  }
  IFS="$CR"
  set -- $out
  IFS="$oifs"
  for line in "$@" ""; do
  case "${line}" in
  DEVNAME=*) dev=${line#DEVNAME=};;
  LABEL=*) label="${line#LABEL=}";
   labels="${labels}${line#LABEL=}${delim}";;
  TYPE=*) ftype=${line#TYPE=};;
  "") if [ "$ftype" = "iso9660" ]; then
  isodevs="${isodevs} ${dev}=$label"
  fi
  ftype=""; devname=""; label="";
  esac
  done

  This function parses the output for blkid and then sets the 'isodevs' _only_ 
when there is an entry other than DEVNAME, UUID, LABEL, TYPE for iso9660 
entries. This is not quite right. In my test environment, (as seen below), the 
other entry PARTUUID, etc was not present.
  #

  Inside the virtual machine:

  $ sudo blkid -c /dev/null -o export

  DEVNAME=/dev/sr0
  UUID=2009-04-20-15-30-24-00
  LABEL=OVF\ Customization
  TYPE=iso9660

  DEVNAME=/dev/sda1
  UUID=2f09aea2-6411-444e-9d5b-32c0aa25c067
  TYPE=ext4
  PARTUUID=70ae1e13-01

  In the blkid command output, for the ISO that I have mounted, only
  DEVNAME, UUID, LABEL and TYPE entries were present. No other entry was
  present. If there was another entry like PARTUUID, ds-identify would
  have properly detected the OVF datasource.

  Logging a bug to fix read_fs_info to properly parse the output of
  blkid.

  Please let me know if any other information is required.

  Thanks
  Sankar.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1749980/+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


[Yahoo-eng-team] [Bug 1667831] [NEW] cloud-init dependency for open-vm-tools service

2017-02-24 Thread Sankar Tanguturi
Public bug reported:

Had a private chat conversation with Scott Moser (@smoser). As per his
instructions, logging this bug. We need to add 'cloud-init' dependency
for 'open-vm-tools' service.

This is how 'Guest Customization' works for the 'VMware' managed guests.

1. open-vm-tools service comes up and populates a 'customization' configuration 
file.
2. cloud-init service starts and waits for the 'customization config' file, 
reads it and applies the customization.

(1) should start before (2). Else, (2) will just block itself and not
find the config file. Everything was working fine. But due to recent
'systemd' changes done to 'cloud-init', 'cloud-init' service starts
early in the boot process before 'open-vm-tools' service. Due to this,
no customization actually happens.

Need to add the 'cloud-init' dependency for 'open-vm-tools' service so
that (1) always happens before (2).

Logging a bug.

Thanks
Sankar.

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

-- 
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/1667831

Title:
  cloud-init dependency for open-vm-tools service

Status in cloud-init:
  New

Bug description:
  Had a private chat conversation with Scott Moser (@smoser). As per his
  instructions, logging this bug. We need to add 'cloud-init' dependency
  for 'open-vm-tools' service.

  This is how 'Guest Customization' works for the 'VMware' managed
  guests.

  1. open-vm-tools service comes up and populates a 'customization' 
configuration file.
  2. cloud-init service starts and waits for the 'customization config' file, 
reads it and applies the customization.

  (1) should start before (2). Else, (2) will just block itself and not
  find the config file. Everything was working fine. But due to recent
  'systemd' changes done to 'cloud-init', 'cloud-init' service starts
  early in the boot process before 'open-vm-tools' service. Due to this,
  no customization actually happens.

  Need to add the 'cloud-init' dependency for 'open-vm-tools' service so
  that (1) always happens before (2).

  Logging a bug.

  Thanks
  Sankar.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1667831/+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