search for: unix_error

Displaying 20 results from an estimated 195 matches for "unix_error".

2020 Jun 30
2
[PATCH] daemon: inspect_fs_windows: Handle parted errors
By creating an empty disk and using it as the first disk of the vm (i.e. /dev/sda, /dev/sdb{1,2} contains the windows fses) we change the iteration order of the disks. This causes inspect_os() to fail since Parted returns a Unix_error if the device does not contain any partitions - fix this by handling this Unix_error. Signed-off-by: Sam Eiderman <sameid@google.com> --- daemon/inspect_fs_windows.ml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/daemon/inspect_fs_windows.ml b/daemon/inspec...
2016 Aug 31
0
[PATCH 2/2] Use os-release to detect the distro
...l +++ b/src/dpkg.ml @@ -28,7 +28,8 @@ let dpkg_detect () = Config.dpkg_query <> "no" && Config.dpkg_divert <> "no" && Config.apt_get <> "no" && - try (stat "/etc/debian_version").st_kind = S_REG with Unix_error _ -> false + (List.mem (Os_release.get_id ()) [ "debian"; "ubuntu" ] || + try (stat "/etc/debian_version").st_kind = S_REG with Unix_error _ -> false) let dpkg_primary_arch = ref "" let settings = ref no_settings diff --git a/src/pacman.ml b/...
2015 May 04
1
[PATCH] build: remove unreadable files after filtering
...rintf "supermin: build: %d files\n%!" (List.length files); - (* Remove files from the list which don't exist on the host or are - * unreadable to us. - *) - let files = - List.filter ( - fun file -> - try ignore (lstat file.ft_source_path); true - with Unix_error _ -> - try ignore (lstat file.ft_path); true - with Unix_error _ -> false - ) files in - - if debug >= 1 then - printf "supermin: build: %d files, after removing unreadable files\n%!" - (List.length files); - (* Remove excludefiles from the list....
2016 Aug 31
8
[PATCH 0/2] supermin: use /etc/os-release
Hi, let's make supermin use /etc/os-release as primary source instead of the various release files in /etc; apparently distros (e.g. openSUSE) are starting removing them. Thanks, Pino Toscano (2): Add simple handling of /etc/os-release Use os-release to detect the distro src/Makefile.am | 3 +++ src/dpkg.ml | 3 ++- src/os_release.ml | 78
2020 Jun 30
1
Re: [PATCH] daemon: inspect_fs_windows: Handle parted errors
...0 10:33:40 CEST Sam Eiderman wrote: > > By creating an empty disk and using it as the first disk of the vm (i.e. > > /dev/sda, /dev/sdb{1,2} contains the windows fses) we change the > > iteration order of the disks. > > This causes inspect_os() to fail since Parted returns a Unix_error if > > the device does not contain any partitions - fix this by handling this > > Unix_error. > > > > Signed-off-by: Sam Eiderman <sameid@google.com> > > --- > > daemon/inspect_fs_windows.ml | 11 ++++++++--- > > 1 file changed, 8 insertions(+), 3 de...
2020 Mar 24
0
Re: generator under Cygwin fails with: Fatal error: exception Unix.Unix_error(Unix.EAGAIN, "fork", "")
On 3/22/20 5:07 PM, sdaau wrote: > Hi all, > > Copy of: > > generator under Cygwin fails with: Fatal error: exception Unix.Unix_error(Unix.EAGAIN, "fork", "") · Issue #45 · libguestfs/libguestfs > https://github.com/libguestfs/libguestfs/issues/45 > > ... since I realised late I shouldn't post on GitHub issues. That could be a bug in the Cygwin build of OCaml, rather than a problem in libguestf...
2012 Jul 20
2
Bug#682202: xcp-squeezed not started on boot
...pi: [ info|h09|0 thread_zero||watchdog] Received bad exit, retrying Jul 20 09:03:05 h09 xapi: [ info|h09|0 thread_zero||watchdog] (Re)starting xapi... Jul 20 09:03:05 h09 xapi: [error|h09|80|scan one D:c5861d9f9a12|xapi] Caught exception attempting an SR.scan: INTERNAL_ERROR: [ Unix.Unix_error(63, "connect", "") ] Jul 20 09:03:05 h09 xapi: [error|h09|0 thread_zero|Registering SR plugins D:a6be6cf646b7|sm_exec] Not scanning /var/lib/xcp/sm for SM backends: directory does not exist Jul 20 09:03:35 h09 xapi: [error|h09|81|scan one D:6d9bfc3eb80c|xapi] Cau...
2018 Nov 19
2
[PATCH] common/mltools: Add a debug statement when we try to run a non-existent program.
...s.ml index ad08d05eb..298d89b4d 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -420,9 +420,11 @@ and do_run ?(echo_cmd = true) ?stdout_fd ?stderr_fd args = Either (pid, app, stdout_fd, stderr_fd) with | Executable_not_found _ -> - Or 127 - | Unix.Unix_error (errcode, _, _) when errcode = Unix.ENOENT -> - Or 127 + debug "%s: executable not found" app; + Or 127 + | Unix.Unix_error (errcode, fn, _) when errcode = Unix.ENOENT -> + debug "%s: %s: executable not found" app fn; + Or 127 and do_teardown app out...
2013 Jul 24
2
W/ commit 4d2c63a9bc3accd7b852b1c8b2089c6296fee156: supermin fails to create temporary dir
...p;& make clean && make -j 7 \ && time make -k extra-tests LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 \ | tee /var/tmp/make-extra-check-libguestfs-24-may.log . . . . extracting /usr/lib64/gconv/gconv-modules from glibc-2.17-11.fc19.x86_64.rpm ... Fatal error: exception Unix.Unix_error(8, "mkdir", "/tmp/supermin66a2e1c4c95a0e7fb53c3122f449b299.tmp/root//var/run") make[2]: *** [stamp-supermin] Error 2 make[2]: Leaving directory `/home/kashyap/src/libguestfs/appliance' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/kashyap/src/libgues...
2020 Aug 26
2
[supermin PATCH] rpm: check for SQLite-based RPM DB
...dex dbe3bda..0821126 100644 --- a/src/ph_rpm.ml +++ b/src/ph_rpm.ml @@ -234,7 +234,10 @@ let rpm_package_name pkg = rpm.name let rpm_get_package_database_mtime () = - (lstat "/var/lib/rpm/Packages").st_mtime + try + (lstat "/var/lib/rpm/rpmdb.sqlite").st_mtime + with Unix_error (ENOENT, _, _) -> + (lstat "/var/lib/rpm/Packages").st_mtime (* Return the best provider of a particular RPM requirement. * -- 2.26.2
2020 Jun 30
0
Re: [PATCH] daemon: inspect_fs_windows: Handle parted errors
...Tuesday, 30 June 2020 10:33:40 CEST Sam Eiderman wrote: > By creating an empty disk and using it as the first disk of the vm (i.e. > /dev/sda, /dev/sdb{1,2} contains the windows fses) we change the > iteration order of the disks. > This causes inspect_os() to fail since Parted returns a Unix_error if > the device does not contain any partitions - fix this by handling this > Unix_error. > > Signed-off-by: Sam Eiderman <sameid@google.com> > --- > daemon/inspect_fs_windows.ml | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a...
2012 Dec 05
3
enable HA on xcp 1.6
...6:26 xcp1 xapi: [debug|xcp1|490661|Async.pool.enable_ha R:9119ce88ffcb|backtrace] Raised at :0.0-0 Dec 5 17:56:26 xcp1 xapi: [debug|xcp1|490661|Async.pool.enable_ha R:9119ce88ffcb|helpers] Assuming script /opt/xensource/xha/ha_set_pool_state doesn''t exis t: caught INTERNAL_ERROR: [ Unix.Unix_error(20, "access", "/opt/xensource/xha/ha_set_pool_state") ] Dec 5 17:56:26 xcp1 xapi: [debug|xcp1|490661|Async.pool.enable_ha R:9119ce88ffcb|backtrace] Raised at helpers.ml:792.12-13 -> threadext.ml:20.20-24 -> thre adext.ml:20.62-65 -> xapi_ha.ml:57.2-94 -> xapi_ha.m...
2014 Mar 13
3
[supermin 1/3] Recognize dpkg-divert
--- configure.ac | 1 + src/config.ml.in | 1 + src/dpkg.ml | 1 + 3 files changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 2141540..99ea913 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,7 @@ AC_PATH_PROG(APT_GET,[apt-get],[no]) AC_PATH_PROG(DPKG,[dpkg],[no]) AC_PATH_PROG(DPKG_DEB,[dpkg-deb],[no]) AC_PATH_PROG(DPKG_QUERY,[dpkg-query],[no])
2014 Mar 08
9
supermin and dpkg-divert
While trying to run libguestfs tests after building with "--enable-appliance --with-supermin-extra-options=--use-installed", I ran into a peculiar error message in the c-api test: ,---- | libguestfs: error: strings: /abssymlink: strings: error while loading | shared libraries: libbfd-2.24-multiarch.so: cannot open shared object | file: No such file or directory `---- The problem here
2020 Aug 27
1
Re: [supermin PATCH] rpm: check for SQLite-based RPM DB
...-234,7 +234,10 @@ let rpm_package_name pkg = > > rpm.name > > > > let rpm_get_package_database_mtime () = > > - (lstat "/var/lib/rpm/Packages").st_mtime > > + try > > + (lstat "/var/lib/rpm/rpmdb.sqlite").st_mtime > > + with Unix_error (ENOENT, _, _) -> > > + (lstat "/var/lib/rpm/Packages").st_mtime > > > > (* Return the best provider of a particular RPM requirement. > > Yes this looks fine, ACK. If you really wanted you could factor out > the (...).st_mtime, something like: > &...
2019 Mar 22
0
[PATCH 4/4] OCaml tools: output messages into JSON for machine readable
...fdv) CAMLreturn (caml_alloc_channel (chan)); } + +value +guestfs_int_mllib_rfc3999_date_time_string (value unitv) +{ + CAMLparam1 (unitv); + char buf[64]; + struct timespec ts; + struct tm tm; + size_t ret; + size_t total = 0; + + if (clock_gettime (CLOCK_REALTIME, &ts) == -1) + unix_error (errno, (char *) "clock_gettime", Val_unit); + + if (localtime_r (&ts.tv_sec, &tm) == NULL) + unix_error (errno, (char *) "localtime_r", caml_copy_int64 (ts.tv_sec)); + + /* Sadly strftime does not support nanoseconds, so what we do is: + * - stringify everything...
2014 Mar 10
3
[supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
...file -> not file.ft_config) files in if debug >= 1 then printf "supermin: build: %d files\n%!" (List.length files); @@ -120,9 +116,11 @@ let rec build debug *) let files = List.filter ( - fun path -> - try ignore (lstat path); true - with Unix_error (err, fn, _) -> false + fun file -> + try ignore (lstat file.ft_source_path); true + with Unix_error (err, fn, _) -> + try ignore (lstat file.ft_path); true + with Unix_error (err, fn, _) -> false ) files in if debug >= 1 then @@ -139,9...
2012 Feb 01
2
[xcp] problem in running xcp-networkd in ubuntu 11.10
...erichtet ... Starting the XCP networking daemon: .............................. * failed to start xcp-networkd. invoke-rc.d: initscript xcp-networkd, action "start" failed. when I comment the "2&gt;/dev/null" in the script I see this error: Fatal error: exception Unix.Unix_error(20, "open", "/etc/xcp/network.conf") but there is not "/etc/xcp/network.conf" I use ubuntu 11.10 and I install the openvswitch-datapath-dkms before. Thanks for your answers. Greetings Hossein ______________________________________________...
2016 Jul 06
0
[PATCH] ext2: Don't load whole files into memory when copying to the appliance (RHBZ#1113065).
...e, buf, r, &written); + if (err != 0) + ext2_error_to_exception ("ext2fs_file_open2", err, filename); + if ((ssize_t) written != r) + caml_failwith ("ext2fs_file_write: requested write size != bytes written"); + size += written; + } + + if (r == -1) + unix_error (errno, (char *) "read", caml_copy_string (filename)); + + if (close (fd) == -1) + unix_error (errno, (char *) "close", caml_copy_string (filename)); + + /* Flush out the ext2 file. */ + err = ext2fs_file_flush (file); + if (err != 0) + ext2_error_to_exception ("e...
2019 Mar 22
8
[PATCH 0/4] OCaml tools: output messages as JSON machine
Enhance the output in machine parseable mode, by outputting all the messages of OCaml tools as JSON to the machine parseable stream. Related, although not strictly needed for this (and thus can be split if requested), is the addition of the fd format for the machine readable stream. Pino Toscano (4): common/mltools: move the code for machine readable up common/mltools: make sure machine