1. 10 12月, 2019 6 次提交
  2. 09 12月, 2019 1 次提交
  3. 03 12月, 2019 5 次提交
  4. 28 11月, 2019 1 次提交
    • M
      nss: Don't fail on empty files · d7dd4e1f
      Michal Privoznik 提交于
      Before we rewrote nss plugin so that it doesn't use libvirt's
      internal functions it used virLeaseReadCustomLeaseFile() to parse
      .status files. After the rewrite it's using read() + yajl_parse()
      + yajl_complete_parse(). There's one catch though,
      virLeaseReadCustomLeaseFile() skipped over empty files.
      
      An empty .status file is created when a network is started. This
      is because we configure dnsmasq to use our leasehelper. So the
      first thing it does it calls it as follows:
      
        DNSMASQ_INTERFACE=virbr0 /usr/libexec/libvirt_leaseshelper init
      
      which causes the leasehelper to create empty virbr0.status file.
      If there is only one libvirt network then that is no problem -
      there are no other .status files to parse anyway. But if there
      are two or more networks then the first empty .status file causes
      whole parsing process and subsequently the whole name lookup
      process to fail.
      
      Fixes: v5.7.0-rc1~343
      Reported-by: NPavel Hrdina <phrdina@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      d7dd4e1f
  5. 22 11月, 2019 1 次提交
  6. 19 11月, 2019 1 次提交
  7. 15 11月, 2019 4 次提交
    • P
      replace use of gnulib snprintf by g_snprintf · 43b01ef2
      Pavel Hrdina 提交于
      Glib implementation follows the ISO C99 standard so it's safe to replace
      the gnulib implementation.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
      43b01ef2
    • J
      virsh: Fix typo in the man page · 7bd41cb6
      Jiri Denemark 提交于
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      7bd41cb6
    • J
      Add API to change qemu agent response timeout · 95f5ac9a
      Jonathon Jongsma 提交于
      Some layered products such as oVirt have requested a way to avoid being
      blocked by guest agent commands when querying a loaded vm. For example,
      many guest agent commands are polled periodically to monitor changes,
      and rather than blocking the calling process, they'd prefer to simply
      time out when an agent query is taking too long.
      
      This patch adds a way for the user to specify a custom agent timeout
      that is applied to all agent commands.
      
      One special case to note here is the 'guest-sync' command. 'guest-sync'
      is issued internally prior to calling any other command. (For example,
      when libvirt wants to call 'guest-get-fsinfo', we first call
      'guest-sync' and then call 'guest-get-fsinfo').
      
      Previously, the 'guest-sync' command used a 5-second timeout
      (VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT), whereas the actual command that
      followed always blocked indefinitely
      (VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK). As part of this patch, if a
      custom timeout is specified that is shorter than
      5 seconds,  this new timeout is also used for 'guest-sync'. If there is
      no custom timeout or if the custom timeout is longer than 5 seconds, we
      will continue to use the 5-second timeout.
      Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      95f5ac9a
    • J
      Use g_mkstemp_full instead of mkostemp(s) · 4ac47730
      Ján Tomko 提交于
      With g_mkstemp_full, there is no need to distinguish between
      mkostemp and mkostemps (no suffix vs. a suffix of a fixed length),
      because the GLib function looks for the XXXXXX pattern everywhere
      in the string.
      
      Use S_IRUSR | S_IWUSR for the permissions and do not pass O_RDWR
      in flags since it's implied.
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
      4ac47730
  8. 13 11月, 2019 1 次提交
  9. 12 11月, 2019 2 次提交
  10. 09 11月, 2019 1 次提交
  11. 25 10月, 2019 3 次提交
  12. 24 10月, 2019 1 次提交
    • M
      Drop needless ret variable · 3b4df5d3
      Michal Privoznik 提交于
      In few places we have the following code pattern:
      
        int ret;
        ... /* @ret is not accessed here */
        ret = f(...);
        return ret;
      
      This pattern can be written less verbose:
      
        ...
        return f(...);
      
      This patch was generated with following coccinelle spatch:
      
        @@
        type T;
        constant C;
        expression f;
        identifier ret;
        @@
        -T ret = C;
         ... when != ret
        -ret = f;
        -return ret;
        +return f;
      
      Afterwards I needed to fix a few places, e.g. comment in
      virDomainNetIPParseXML() was removed too because coccinelle
      thinks it refers to @ret while in fact it doesn't. Also in few
      places it replaced @ret declaration with a few spaces instead of
      removing the line. But nothing terribly wrong.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      3b4df5d3
  13. 21 10月, 2019 2 次提交
  14. 20 10月, 2019 10 次提交
  15. 17 10月, 2019 1 次提交