All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-python][PATCH] python3-blivet: fix invoking dd timeout caused partition failed
@ 2018-03-07  1:17 Hongxu Jia
  2018-03-07 13:39 ` Tim Orling
  0 siblings, 1 reply; 3+ messages in thread
From: Hongxu Jia @ 2018-03-07  1:17 UTC (permalink / raw)
  To: Martin.Jansa; +Cc: openembedded-devel

This large timeout is needed when running on machines with
lots of disks, or with slow disks.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../0014-invoking-dd-with-infinite-timeout.patch   | 31 ++++++++++++++++++++++
 .../python-blivet/python3-blivet_2.2.0.bb          |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch

diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
new file mode 100644
index 0000000..12a9e4f
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
@@ -0,0 +1,31 @@
+From 92fe7dfd01131c93a9b2013cabf77d5f46900fab Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 6 Mar 2018 17:28:56 +0800
+Subject: [PATCH] invoking dd with infinite timeout
+
+This large timeout is needed when running on machines with
+lots of disks, or with slow disks.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/devices/partition.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/devices/partition.py b/blivet/devices/partition.py
+index a7372fb..8947472 100644
+--- a/blivet/devices/partition.py
++++ b/blivet/devices/partition.py
+@@ -594,7 +594,7 @@ class PartitionDevice(StorageDevice):
+         cmd = ["dd", "if=/dev/zero", "of=%s" % device, "bs=%d" % bs,
+                "seek=%d" % start, "count=%d" % count]
+         try:
+-            util.run_program(cmd)
++            util.run_program(cmd, timeout=-1)
+         except OSError as e:
+             log.error(str(e))
+         finally:
+-- 
+1.8.3.1
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb b/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
index cacca67..46dc32d 100644
--- a/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
@@ -23,6 +23,7 @@ SRC_URI = "git://github.com/rhinstaller/blivet;branch=2.2-devel \
            file://0011-invoking-fsck-with-infinite-timeout.patch \
            file://0012-invoking-mkfs-with-infinite-timeout.patch \
            file://0013-Revert-Adapt-to-logging-module-name-change.patch \
+           file://0014-invoking-dd-with-infinite-timeout.patch \
 "
 
 inherit distro_features_check
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [meta-python][PATCH] python3-blivet: fix invoking dd timeout caused partition failed
  2018-03-07  1:17 [meta-python][PATCH] python3-blivet: fix invoking dd timeout caused partition failed Hongxu Jia
@ 2018-03-07 13:39 ` Tim Orling
  2018-03-08  1:10   ` Hongxu Jia
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Orling @ 2018-03-07 13:39 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: openembedded-devel

Can we make the default not be infinite timeout? You are solving a corner
case, special need with a default infinite timeout that may have unforeseen
side effects in the general case (like a system that never responds). Just
a thought. What does upstream think?
On Tue, Mar 6, 2018 at 5:18 PM Hongxu Jia <hongxu.jia@windriver.com> wrote:

> This large timeout is needed when running on machines with
> lots of disks, or with slow disks.
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>  .../0014-invoking-dd-with-infinite-timeout.patch   | 31
> ++++++++++++++++++++++
>  .../python-blivet/python3-blivet_2.2.0.bb          |  1 +
>  2 files changed, 32 insertions(+)
>  create mode 100644
> meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
>
> diff --git
> a/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
> b/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
> new file mode 100644
> index 0000000..12a9e4f
> --- /dev/null
> +++
> b/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
> @@ -0,0 +1,31 @@
> +From 92fe7dfd01131c93a9b2013cabf77d5f46900fab Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Tue, 6 Mar 2018 17:28:56 +0800
> +Subject: [PATCH] invoking dd with infinite timeout
> +
> +This large timeout is needed when running on machines with
> +lots of disks, or with slow disks.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/devices/partition.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/blivet/devices/partition.py b/blivet/devices/partition.py
> +index a7372fb..8947472 100644
> +--- a/blivet/devices/partition.py
> ++++ b/blivet/devices/partition.py
> +@@ -594,7 +594,7 @@ class PartitionDevice(StorageDevice):
> +         cmd = ["dd", "if=/dev/zero", "of=%s" % device, "bs=%d" % bs,
> +                "seek=%d" % start, "count=%d" % count]
> +         try:
> +-            util.run_program(cmd)
> ++            util.run_program(cmd, timeout=-1)
> +         except OSError as e:
> +             log.error(str(e))
> +         finally:
> +--
> +1.8.3.1
> +
> diff --git a/meta-python/recipes-extended/python-blivet/
> python3-blivet_2.2.0.bb b/meta-python/recipes-extended/python-blivet/
> python3-blivet_2.2.0.bb
> index cacca67..46dc32d 100644
> --- a/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
> @@ -23,6 +23,7 @@ SRC_URI = "git://
> github.com/rhinstaller/blivet;branch=2.2-devel \
>             file://0011-invoking-fsck-with-infinite-timeout.patch \
>             file://0012-invoking-mkfs-with-infinite-timeout.patch \
>             file://0013-Revert-Adapt-to-logging-module-name-change.patch \
> +           file://0014-invoking-dd-with-infinite-timeout.patch \
>  "
>
>  inherit distro_features_check
> --
> 1.8.3.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-python][PATCH] python3-blivet: fix invoking dd timeout caused partition failed
  2018-03-07 13:39 ` Tim Orling
@ 2018-03-08  1:10   ` Hongxu Jia
  0 siblings, 0 replies; 3+ messages in thread
From: Hongxu Jia @ 2018-03-08  1:10 UTC (permalink / raw)
  To: Tim Orling; +Cc: openembedded-devel

On 2018年03月07日 21:39, Tim Orling wrote:
> Can we make the default not be infinite timeout? You are solving a 
> corner case, special need with a default infinite timeout that may 
> have unforeseen side effects in the general case (like a system that 
> never responds). Just a thought. What does upstream think?

The python3-blivet is part of target installer anaconda, while you do the
installation by using qemu to simulate without kvm on your desktop,
it will have a low speed disk/cpu to triger the above issue.
(BTW if you use virtualbox to simulate, it works well)

I guess the upstream fedora almost not have the situation to work
(which runqemu is our yocto specific), so they do not care about it.

But I will try to talk with them, to see whether they accept our fixes 
or not.

See:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-anaconda/tree/README

//Hongxu

> On Tue, Mar 6, 2018 at 5:18 PM Hongxu Jia <hongxu.jia@windriver.com 
> <mailto:hongxu.jia@windriver.com>> wrote:
>
>     This large timeout is needed when running on machines with
>     lots of disks, or with slow disks.
>
>     Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com
>     <mailto:hongxu.jia@windriver.com>>
>     ---
>      .../0014-invoking-dd-with-infinite-timeout.patch   | 31
>     ++++++++++++++++++++++
>      .../python-blivet/python3-blivet_2.2.0.bb
>     <http://python3-blivet_2.2.0.bb>         |  1 +
>      2 files changed, 32 insertions(+)
>      create mode 100644
>     meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
>
>     diff --git
>     a/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
>     b/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
>     new file mode 100644
>     index 0000000..12a9e4f
>     --- /dev/null
>     +++
>     b/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
>     @@ -0,0 +1,31 @@
>     +From 92fe7dfd01131c93a9b2013cabf77d5f46900fab Mon Sep 17 00:00:00
>     2001
>     +From: Hongxu Jia <hongxu.jia@windriver.com
>     <mailto:hongxu.jia@windriver.com>>
>     +Date: Tue, 6 Mar 2018 17:28:56 +0800
>     +Subject: [PATCH] invoking dd with infinite timeout
>     +
>     +This large timeout is needed when running on machines with
>     +lots of disks, or with slow disks.
>     +
>     +Upstream-Status: Pending
>     +
>     +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com
>     <mailto:hongxu.jia@windriver.com>>
>     +---
>     + blivet/devices/partition.py | 2 +-
>     + 1 file changed, 1 insertion(+), 1 deletion(-)
>     +
>     +diff --git a/blivet/devices/partition.py
>     b/blivet/devices/partition.py
>     +index a7372fb..8947472 100644
>     +--- a/blivet/devices/partition.py
>     ++++ b/blivet/devices/partition.py
>     +@@ -594,7 +594,7 @@ class PartitionDevice(StorageDevice):
>     +         cmd = ["dd", "if=/dev/zero", "of=%s" % device, "bs=%d" % bs,
>     +                "seek=%d" % start, "count=%d" % count]
>     +         try:
>     +-            util.run_program(cmd)
>     ++            util.run_program(cmd, timeout=-1)
>     +         except OSError as e:
>     +             log.error(str(e))
>     +         finally:
>     +--
>     +1.8.3.1
>     +
>     diff --git
>     a/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
>     <http://python3-blivet_2.2.0.bb>
>     b/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
>     <http://python3-blivet_2.2.0.bb>
>     index cacca67..46dc32d 100644
>     ---
>     a/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
>     <http://python3-blivet_2.2.0.bb>
>     +++
>     b/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
>     <http://python3-blivet_2.2.0.bb>
>     @@ -23,6 +23,7 @@ SRC_URI =
>     "git://github.com/rhinstaller/blivet;branch=2.2-devel
>     <http://github.com/rhinstaller/blivet;branch=2.2-devel> \
>     file://0011-invoking-fsck-with-infinite-timeout.patch \
>     file://0012-invoking-mkfs-with-infinite-timeout.patch \
>     file://0013-Revert-Adapt-to-logging-module-name-change.patch \
>     +  file://0014-invoking-dd-with-infinite-timeout.patch \
>      "
>
>      inherit distro_features_check
>     --
>     1.8.3.1
>
>     --
>     _______________________________________________
>     Openembedded-devel mailing list
>     Openembedded-devel@lists.openembedded.org
>     <mailto:Openembedded-devel@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-08  1:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-07  1:17 [meta-python][PATCH] python3-blivet: fix invoking dd timeout caused partition failed Hongxu Jia
2018-03-07 13:39 ` Tim Orling
2018-03-08  1:10   ` Hongxu Jia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.