[Sts-sponsors] [Bug 1921658] Re: Can't compose kvm host with lvm storage on maas 2.8.4

2021-10-20 Thread Dan Streetman
> Can you try changing the VirshSSH() class constructor so that it
passes echo=False to its superclass constructor, and see if that helps?

also - it seems like the class is trying to work around the fact it's
not disabling echo, by eliding the first line of the reply, in the run()
method - that will most likely need to be changed to simply use the
entire 'result' instead of just 'result[1:]'. In fact the splitlines()
followed by '\n'.join() probably should be removed and just return the
entire decoded string.

-- 
You received this bug notification because you are a member of STS
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1921658

Title:
  Can't compose kvm host with lvm storage on maas 2.8.4

Status in MAAS:
  Triaged
Status in readline package in Ubuntu:
  Fix Released
Status in readline source package in Bionic:
  Incomplete

Bug description:
  [Impact]

  I can't compose kvm host on maas 2.8.4 ( bionic)

  I upgraded twisted and related component with pip but the symptom is
  the same.

  MaaS 2.9.x in Focal works fine.

  in 2.8.x, pexpect virsh vol-path should return [2] but returns [3]

  [2]
  /dev/maas_data_vg/8d4e8b04-4031-4a1b-b5f2-a8306192db11
  [3]
  2021-03-17 20:43:34 stderr: [error] Message: 'this is the result...\n'
  2021-03-17 20:43:34 stderr: [error] Arguments: ([' ', 
'<3ef-46ca-87c8-19171950592f --pool maas_guest_lvm_vg', "error: command 
'attach-disk' doesn't support option --pool"],)

  sometimes it fails in

  def get_volume_path(self, pool, volume):
  """Return the path to the file from `pool` and `volume`."""
  output = self.run(["vol-path", volume, "--pool", pool])
  return output.strip()

  sometimes failes in

  def get_machine_xml(self, machine):
  # Check if we have a cached version of the XML.
  # This is a short-lived object, so we don't need to worry about
  # expiring objects in the cache.
  if machine in self.xml:
  return self.xml[machine]

  # Grab the XML from virsh if we don't have it already.
  output = self.run(["dumpxml", machine]).strip()
  if output.startswith("error:"):
  maaslog.error("%s: Failed to get XML for machine", machine)
  return None

  # Cache the XML, since we'll need it later to reconfigure the VM.
  self.xml[machine] = output
  return output

  I assume that run function has issue.

  Command line virsh vol-path and simple pepect python code works fine.

  Any advice for this issue?

  Thanks.

  [Test Plan]

  0) deploy Bionic and MAAS 2.8

  1) Create file to be used as loopback device

  sudo dd if=/dev/zero of=lvm bs=16000 count=1M

  2) sudo losetup /dev/loop39 lvm

  3) sudo pvcreate /dev/loop39

  4) sudo vgcreate maas_data_vg /dev/loop39

  5) Save below xml:
  
  maas_guest_lvm_vg
  
  maas_data_vg
  
  
  
  /dev/maas_data_vg
  
  

  6) virsh pool-create maas_guest_lvm_vg.xml

  7) Add KVM host in MaaS

  8) Attempt to compose a POD using storage pool maas_guest_lvm_vg

  9) GUI will fail with:

  Pod unable to compose machine: Unable to compose machine because:
  Failed talking to pod: Start tag expected, '<' not found, line 1,
  column 1 (, line 1)

  [Where problems could occer]

  This patch is small peice of huge commit.
  I tested by compiling test pkg with this patch. but actually it is kind of 
underlying library ( libreadline ), so It could affect to any application using 
libreadline.
  e.g running command inside application by code can be affected.

  
  [Other Info]

To manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1921658/+subscriptions


-- 
Mailing list: https://launchpad.net/~sts-sponsors
Post to : sts-sponsors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sts-sponsors
More help   : https://help.launchpad.net/ListHelp


[Sts-sponsors] [Bug 1921658] Re: Can't compose kvm host with lvm storage on maas 2.8.4

2021-10-20 Thread Dan Streetman
@seyeongkim, after reviewing this bug and looking at some of the data as
well as maas and pexpect code, it seems to me like this isn't related to
readline, I think the problem is maas is using pexpect without disabling
echo.

Can you try changing the VirshSSH() class constructor so that it passes
echo=False to its superclass constructor, and see if that helps?

-- 
You received this bug notification because you are a member of STS
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1921658

Title:
  Can't compose kvm host with lvm storage on maas 2.8.4

Status in MAAS:
  Triaged
Status in readline package in Ubuntu:
  Fix Released
Status in readline source package in Bionic:
  Incomplete

Bug description:
  [Impact]

  I can't compose kvm host on maas 2.8.4 ( bionic)

  I upgraded twisted and related component with pip but the symptom is
  the same.

  MaaS 2.9.x in Focal works fine.

  in 2.8.x, pexpect virsh vol-path should return [2] but returns [3]

  [2]
  /dev/maas_data_vg/8d4e8b04-4031-4a1b-b5f2-a8306192db11
  [3]
  2021-03-17 20:43:34 stderr: [error] Message: 'this is the result...\n'
  2021-03-17 20:43:34 stderr: [error] Arguments: ([' ', 
'<3ef-46ca-87c8-19171950592f --pool maas_guest_lvm_vg', "error: command 
'attach-disk' doesn't support option --pool"],)

  sometimes it fails in

  def get_volume_path(self, pool, volume):
  """Return the path to the file from `pool` and `volume`."""
  output = self.run(["vol-path", volume, "--pool", pool])
  return output.strip()

  sometimes failes in

  def get_machine_xml(self, machine):
  # Check if we have a cached version of the XML.
  # This is a short-lived object, so we don't need to worry about
  # expiring objects in the cache.
  if machine in self.xml:
  return self.xml[machine]

  # Grab the XML from virsh if we don't have it already.
  output = self.run(["dumpxml", machine]).strip()
  if output.startswith("error:"):
  maaslog.error("%s: Failed to get XML for machine", machine)
  return None

  # Cache the XML, since we'll need it later to reconfigure the VM.
  self.xml[machine] = output
  return output

  I assume that run function has issue.

  Command line virsh vol-path and simple pepect python code works fine.

  Any advice for this issue?

  Thanks.

  [Test Plan]

  0) deploy Bionic and MAAS 2.8

  1) Create file to be used as loopback device

  sudo dd if=/dev/zero of=lvm bs=16000 count=1M

  2) sudo losetup /dev/loop39 lvm

  3) sudo pvcreate /dev/loop39

  4) sudo vgcreate maas_data_vg /dev/loop39

  5) Save below xml:
  
  maas_guest_lvm_vg
  
  maas_data_vg
  
  
  
  /dev/maas_data_vg
  
  

  6) virsh pool-create maas_guest_lvm_vg.xml

  7) Add KVM host in MaaS

  8) Attempt to compose a POD using storage pool maas_guest_lvm_vg

  9) GUI will fail with:

  Pod unable to compose machine: Unable to compose machine because:
  Failed talking to pod: Start tag expected, '<' not found, line 1,
  column 1 (, line 1)

  [Where problems could occer]

  This patch is small peice of huge commit.
  I tested by compiling test pkg with this patch. but actually it is kind of 
underlying library ( libreadline ), so It could affect to any application using 
libreadline.
  e.g running command inside application by code can be affected.

  
  [Other Info]

To manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1921658/+subscriptions


-- 
Mailing list: https://launchpad.net/~sts-sponsors
Post to : sts-sponsors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sts-sponsors
More help   : https://help.launchpad.net/ListHelp


[Sts-sponsors] [Bug 1843588] Re: Nautilus doesn't copy filenames for paste to other programs anymore

2021-10-20 Thread Dariusz Gadomski
** Also affects: gnome-shell (Ubuntu)
   Importance: Undecided
   Status: New

** Changed in: gnome-shell (Ubuntu Focal)
 Assignee: (unassigned) => Dariusz Gadomski (dgadomski)

** Changed in: gnome-shell (Ubuntu)
   Status: New => Fix Released

** Changed in: gnome-shell (Ubuntu Focal)
   Importance: Undecided => Medium

** Changed in: nautilus (Ubuntu Focal)
   Importance: Undecided => Medium

** Changed in: gnome-shell (Ubuntu)
   Importance: Undecided => Medium

** Also affects: gnome-shell-extension-desktop-icons (Ubuntu)
   Importance: Undecided
   Status: New

** Changed in: gnome-shell-extension-desktop-icons (Ubuntu Focal)
   Importance: Undecided => Medium

** Changed in: gnome-shell-extension-desktop-icons (Ubuntu Focal)
 Assignee: (unassigned) => Dariusz Gadomski (dgadomski)

-- 
You received this bug notification because you are a member of STS
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1843588

Title:
  Nautilus doesn't copy filenames for paste to other programs anymore

Status in Nautilus:
  New
Status in gnome-shell package in Ubuntu:
  Fix Released
Status in gnome-shell-extension-desktop-icons package in Ubuntu:
  New
Status in nautilus package in Ubuntu:
  Fix Released
Status in gnome-shell source package in Focal:
  New
Status in gnome-shell-extension-desktop-icons source package in Focal:
  New
Status in nautilus source package in Focal:
  New

Bug description:
  [Impact]

   * One of the upstream changes changed behavior of clipboard copying 
files/directories from nautilus to applications accepting text only (e.g. 
gnome-terminal). In such case the pasted input is prefixed with:
  x-special/nautilus-clipboard
  copy file://

  This was not the case in earlier releases and this change has been
  reverted in later upstream releases.

  [Test Plan]

   1. Open nautilus.
   2. Right-click on any file or directory and select 'Copy' from the context 
menu.
   3. Open gnome-terminal and right-click paste the contents of the clipboard.

  Expected result: path of the file/directory is pasted in the terminal.
  Actual result: pasted input is prefixed with "x-special/nautilus-clipboard
  copy file://"

  [Where problems could occur]

   * There are some workarounds listed in the upstream bug so fixing the
  root cause may break environments with those workarounds in place.

  [Other Info]
   
  Original bug description:

  Until Ubuntu 18.10 Nautilus does copy all selected filenames in simple
  Text format and this way you cold paste the selected files as a list
  to other programs: for example into the texteditor gedit. This was a
  very useful function if you have, for example, to upload a file to
  webmail or other web-service. You cold copy the file within nautilus
  and paste it directliy to the selection dialog or webfield to upload
  the file.

  Or if you wanted a simple List of all your files in a folder you where
  able to select all files with nautilus, copy and paste into gedit.
  This is not possible anymore. The output of natilus looks now like
  this:

  x-special/nautilus-clipboard
  copy
  file:///home//Schreibtisch/new%20document.txt

  Until Ubuntu 18.10 this looks like this:

  /home//Schreibtisch/new document.txt

  Steps to reproduce:
  1. Select files with nautilus
  2. Press Ctrl+C
  3. open gedit
  4. press Ctrl+V

  ProblemType: Bug
  DistroRelease: Ubuntu 19.04
  Package: nautilus 1:3.32.1-0ubuntu0.19.04.0
  ProcVersionSignature: Ubuntu 5.0.0-27.28-generic 5.0.21
  Uname: Linux 5.0.0-27-generic x86_64
  ApportVersion: 2.20.10-0ubuntu27.1
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Sep 11 15:06:14 2019
  ExecutablePath: /usr/bin/nautilus
  SourcePackage: nautilus
  UpgradeStatus: No upgrade log present (probably fresh install)
  usr_lib_nautilus:

To manage notifications about this bug go to:
https://bugs.launchpad.net/nautilus/+bug/1843588/+subscriptions


-- 
Mailing list: https://launchpad.net/~sts-sponsors
Post to : sts-sponsors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sts-sponsors
More help   : https://help.launchpad.net/ListHelp


[Sts-sponsors] [Bug 1843588] Re: Nautilus doesn't copy filenames for paste to other programs anymore

2021-10-20 Thread Robie Basak
According to the upstream bug, the change was necessary to work
correctly with the desktop shell extension. Won't reverting the change
risk integration issues with extensions, including the ones we ship by
default? Shouldn't this be detailed in "Where problems could occur", and
mitigation integrated into the Test Plan?

-- 
You received this bug notification because you are a member of STS
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1843588

Title:
  Nautilus doesn't copy filenames for paste to other programs anymore

Status in Nautilus:
  New
Status in nautilus package in Ubuntu:
  Fix Released
Status in nautilus source package in Focal:
  New

Bug description:
  [Impact]

   * One of the upstream changes changed behavior of clipboard copying 
files/directories from nautilus to applications accepting text only (e.g. 
gnome-terminal). In such case the pasted input is prefixed with:
  x-special/nautilus-clipboard
  copy file://

  This was not the case in earlier releases and this change has been
  reverted in later upstream releases.

  [Test Plan]

   1. Open nautilus.
   2. Right-click on any file or directory and select 'Copy' from the context 
menu.
   3. Open gnome-terminal and right-click paste the contents of the clipboard.

  Expected result: path of the file/directory is pasted in the terminal.
  Actual result: pasted input is prefixed with "x-special/nautilus-clipboard
  copy file://"

  [Where problems could occur]

   * There are some workarounds listed in the upstream bug so fixing the
  root cause may break environments with those workarounds in place.

  [Other Info]
   
  Original bug description:

  Until Ubuntu 18.10 Nautilus does copy all selected filenames in simple
  Text format and this way you cold paste the selected files as a list
  to other programs: for example into the texteditor gedit. This was a
  very useful function if you have, for example, to upload a file to
  webmail or other web-service. You cold copy the file within nautilus
  and paste it directliy to the selection dialog or webfield to upload
  the file.

  Or if you wanted a simple List of all your files in a folder you where
  able to select all files with nautilus, copy and paste into gedit.
  This is not possible anymore. The output of natilus looks now like
  this:

  x-special/nautilus-clipboard
  copy
  file:///home//Schreibtisch/new%20document.txt

  Until Ubuntu 18.10 this looks like this:

  /home//Schreibtisch/new document.txt

  Steps to reproduce:
  1. Select files with nautilus
  2. Press Ctrl+C
  3. open gedit
  4. press Ctrl+V

  ProblemType: Bug
  DistroRelease: Ubuntu 19.04
  Package: nautilus 1:3.32.1-0ubuntu0.19.04.0
  ProcVersionSignature: Ubuntu 5.0.0-27.28-generic 5.0.21
  Uname: Linux 5.0.0-27-generic x86_64
  ApportVersion: 2.20.10-0ubuntu27.1
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Sep 11 15:06:14 2019
  ExecutablePath: /usr/bin/nautilus
  SourcePackage: nautilus
  UpgradeStatus: No upgrade log present (probably fresh install)
  usr_lib_nautilus:

To manage notifications about this bug go to:
https://bugs.launchpad.net/nautilus/+bug/1843588/+subscriptions


-- 
Mailing list: https://launchpad.net/~sts-sponsors
Post to : sts-sponsors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sts-sponsors
More help   : https://help.launchpad.net/ListHelp


[Sts-sponsors] [Bug 1843588] Re: Nautilus doesn't copy filenames for paste to other programs anymore

2021-10-20 Thread Dariusz Gadomski
I have prepared and uploaded patch for focal for this issue which is a
backport of upstream commit
https://gitlab.gnome.org/GNOME/nautilus/-/commit/2045f662f26891f5bb8c7ab0a7763227fe5fdf78

-- 
You received this bug notification because you are a member of STS
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1843588

Title:
  Nautilus doesn't copy filenames for paste to other programs anymore

Status in Nautilus:
  New
Status in nautilus package in Ubuntu:
  Fix Released
Status in nautilus source package in Focal:
  New

Bug description:
  [Impact]

   * One of the upstream changes changed behavior of clipboard copying 
files/directories from nautilus to applications accepting text only (e.g. 
gnome-terminal). In such case the pasted input is prefixed with:
  x-special/nautilus-clipboard
  copy file://

  This was not the case in earlier releases and this change has been
  reverted in later upstream releases.

  [Test Plan]

   1. Open nautilus.
   2. Right-click on any file or directory and select 'Copy' from the context 
menu.
   3. Open gnome-terminal and right-click paste the contents of the clipboard.

  Expected result: path of the file/directory is pasted in the terminal.
  Actual result: pasted input is prefixed with "x-special/nautilus-clipboard
  copy file://"

  [Where problems could occur]

   * There are some workarounds listed in the upstream bug so fixing the
  root cause may break environments with those workarounds in place.

  [Other Info]
   
  Original bug description:

  Until Ubuntu 18.10 Nautilus does copy all selected filenames in simple
  Text format and this way you cold paste the selected files as a list
  to other programs: for example into the texteditor gedit. This was a
  very useful function if you have, for example, to upload a file to
  webmail or other web-service. You cold copy the file within nautilus
  and paste it directliy to the selection dialog or webfield to upload
  the file.

  Or if you wanted a simple List of all your files in a folder you where
  able to select all files with nautilus, copy and paste into gedit.
  This is not possible anymore. The output of natilus looks now like
  this:

  x-special/nautilus-clipboard
  copy
  file:///home//Schreibtisch/new%20document.txt

  Until Ubuntu 18.10 this looks like this:

  /home//Schreibtisch/new document.txt

  Steps to reproduce:
  1. Select files with nautilus
  2. Press Ctrl+C
  3. open gedit
  4. press Ctrl+V

  ProblemType: Bug
  DistroRelease: Ubuntu 19.04
  Package: nautilus 1:3.32.1-0ubuntu0.19.04.0
  ProcVersionSignature: Ubuntu 5.0.0-27.28-generic 5.0.21
  Uname: Linux 5.0.0-27-generic x86_64
  ApportVersion: 2.20.10-0ubuntu27.1
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Sep 11 15:06:14 2019
  ExecutablePath: /usr/bin/nautilus
  SourcePackage: nautilus
  UpgradeStatus: No upgrade log present (probably fresh install)
  usr_lib_nautilus:

To manage notifications about this bug go to:
https://bugs.launchpad.net/nautilus/+bug/1843588/+subscriptions


-- 
Mailing list: https://launchpad.net/~sts-sponsors
Post to : sts-sponsors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sts-sponsors
More help   : https://help.launchpad.net/ListHelp


[Sts-sponsors] [Bug 1843588] [NEW] Nautilus doesn't copy filenames for paste to other programs anymore

2021-10-20 Thread Launchpad Bug Tracker
You have been subscribed to a public bug by Dariusz Gadomski (dgadomski):

[Impact]

 * One of the upstream changes changed behavior of clipboard copying 
files/directories from nautilus to applications accepting text only (e.g. 
gnome-terminal). In such case the pasted input is prefixed with:
x-special/nautilus-clipboard
copy file://

This was not the case in earlier releases and this change has been
reverted in later upstream releases.

[Test Plan]

 1. Open nautilus.
 2. Right-click on any file or directory and select 'Copy' from the context 
menu.
 3. Open gnome-terminal and right-click paste the contents of the clipboard.

Expected result: path of the file/directory is pasted in the terminal.
Actual result: pasted input is prefixed with "x-special/nautilus-clipboard
copy file://"

[Where problems could occur]

 * There are some workarounds listed in the upstream bug so fixing the
root cause may break environments with those workarounds in place.

[Other Info]
 
Original bug description:

Until Ubuntu 18.10 Nautilus does copy all selected filenames in simple
Text format and this way you cold paste the selected files as a list to
other programs: for example into the texteditor gedit. This was a very
useful function if you have, for example, to upload a file to webmail or
other web-service. You cold copy the file within nautilus and paste it
directliy to the selection dialog or webfield to upload the file.

Or if you wanted a simple List of all your files in a folder you where
able to select all files with nautilus, copy and paste into gedit. This
is not possible anymore. The output of natilus looks now like this:

x-special/nautilus-clipboard
copy
file:///home//Schreibtisch/new%20document.txt

Until Ubuntu 18.10 this looks like this:

/home//Schreibtisch/new document.txt

Steps to reproduce:
1. Select files with nautilus
2. Press Ctrl+C
3. open gedit
4. press Ctrl+V

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: nautilus 1:3.32.1-0ubuntu0.19.04.0
ProcVersionSignature: Ubuntu 5.0.0-27.28-generic 5.0.21
Uname: Linux 5.0.0-27-generic x86_64
ApportVersion: 2.20.10-0ubuntu27.1
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Sep 11 15:06:14 2019
ExecutablePath: /usr/bin/nautilus
SourcePackage: nautilus
UpgradeStatus: No upgrade log present (probably fresh install)
usr_lib_nautilus:

** Affects: nautilus
 Importance: Unknown
 Status: New

** Affects: nautilus (Ubuntu)
 Importance: Low
 Assignee: Dariusz Gadomski (dgadomski)
 Status: Fix Released

** Affects: nautilus (Ubuntu Focal)
 Importance: Undecided
 Assignee: Dariusz Gadomski (dgadomski)
 Status: New


** Tags: amd64 apport-bug disco sts sts-sponsor-dgadomski third-party-packages
-- 
Nautilus doesn't copy filenames for paste to other programs anymore
https://bugs.launchpad.net/bugs/1843588
You received this bug notification because you are a member of STS Sponsors, 
which is subscribed to the bug report.

-- 
Mailing list: https://launchpad.net/~sts-sponsors
Post to : sts-sponsors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sts-sponsors
More help   : https://help.launchpad.net/ListHelp