1. 22 9月, 2016 24 次提交
  2. 21 9月, 2016 9 次提交
  3. 20 9月, 2016 7 次提交
    • N
      qemu: agent: give better error messages whe agent monitor is down · 6bff9c03
      Nikolay Shirokovskiy 提交于
      We can receive NULL as sync reply in two situations. First
      is garbage sync reply and this situation is handled by
      resending sync message. Second is different cases
      of rebooting guest, destroing domain etc and we can
      give more meaningful error message. Actually we have
      this error message in qemuAgentCommand already which checks
      for the same sitatuion. AFAIK case with mon->running
      is just to be safe on adding some future(?) cases of
      returning NULL reply.
      6bff9c03
    • N
      qemu: agent: reissue sync on garbage sync reply · 3f90a1aa
      Nikolay Shirokovskiy 提交于
      We can easily handle receiving garbage on sync. We don't
      have to make client deal with this situation. We just
      need to resend sync command but this time garbage is
      not be possible.
      3f90a1aa
    • N
      qemu: agent: skip outdated sync replies · 5e5019bf
      Nikolay Shirokovskiy 提交于
      When we wait for sync reply we can receive delayed
      reply to syncs or commands that were sent erlier. We can
      safely skip them until we receive sync reply with correct id.
      There is no much sense report this situation to client.
      Actually with a bit of "luck" if we involve client into
      this the play can go on forever: send sync 0, receive
      sync reply -1, send sync 1, receive reply 0 ...
      5e5019bf
    • N
      qemu: agent: ignore garbage while waiting for sync reply · 832d48d7
      Nikolay Shirokovskiy 提交于
      After sync is sent we can receive garbare and this is not error.
      Consider next regular case:
      
      1. libvirtd sends sync
      2. qga sends partial sync reply and die
      3. libvirtd sends sync
      4. qga sends sync reply
      5. libvirtd receives garbage
        (half of first reply and second reply together)
      
      We should handle this situation as it is recoverable.
      Next sync can succeed. Let's report reply is NULL,
      it will be converted to the VIR_ERR_AGENT_UNSYNCED
      which signals client to retry.
      832d48d7
    • N
      qemu: agent: ignore delayed reply when unsynced · 4fd25421
      Nikolay Shirokovskiy 提交于
      Errors in qemuAgentIOProcessLine stop agent IO processing just
      like any regular IO error, however some of current errors
      that this functions spawns are false positives. Consider
      next case for example:
      
      1. send sync (unsynced state)
      2. receive sync reply (sync established)
      3. command send, but timeout occured (unsynced state)
      4. receive command reply
      
      Last IO triggers error because current code ignores
      only delayed syncs when unsynced
      
      We should not treat any delayed reply as error in unsynced
      state. Until client and qga are not in sync delayed reply to any
      command is possible. msg == NULL is the exact criterion
      that we are not in sync.
      4fd25421
    • M
      e5568193
    • M
      a9996a45