Skip to content

Commits

Permalink
colo-v1.1
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Mar 26, 2015

  1. COLO: Add block replication into colo process

    Make sure master start block replication after slave's block replication started
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    a484bb1 View commit details
    Browse the repository at this point in the history
  2. Don't allow a disk use backing reference target

    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    da4ccef View commit details
    Browse the repository at this point in the history
  3. skip nbd_target when starting block replication

    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    858df86 View commit details
    Browse the repository at this point in the history
  4. qcow2: support colo

    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    2bd18f3 View commit details
    Browse the repository at this point in the history
  5. Backup: clear all bitmap when doing block checkpoint

    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    16419ab View commit details
    Browse the repository at this point in the history
  6. block: Parse "backing_reference" option to reference existing BDS

    Usage:
    -drive file=xxx,id=Y, \
    -drive file=xxxx,id=X,backing_reference.drive_id=Y,backing_reference.hidden-disk.*
    
    It will create such backing chain:
                   {virtio-blk dev 'Y'}                                      {virtio-blk dev 'X'}
                             |                                                          |
                             |                                                          |
                             v                                                          v
    
        [base] <- [mid] <- ( Y )  <----------------- (hidden target) <--------------- ( X )
    
                             v                              ^
                             v                              ^
                             v                              ^
                             v                              ^
                             >>>> drive-backup sync=none >>>>
    
    X's backing file is hidden-disk, and hidden-disk's backing file is Y.
    Disk Y may be opened or reopened in read-write mode, so A block backup
    job is automatically created: source is Y and target is hidden-disk.
    
    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    Cc: Fam Zheng <famz@redhat.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    e564350 View commit details
    Browse the repository at this point in the history
  7. Allow creating backup jobs when opening BDS

    When opening BDS, we need to create backup jobs for
    image-fleecing.
    
    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    f53a567 View commit details
    Browse the repository at this point in the history
  8. allow writing to the backing file

    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    215f2f9 View commit details
    Browse the repository at this point in the history
  9. NBD client: implement block driver interfaces for block replication

    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    b3d4e44 View commit details
    Browse the repository at this point in the history
  10. quorum: implement block driver interfaces for block replication

    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    6e41dca View commit details
    Browse the repository at this point in the history
  11. Add new block driver interfaces to control block replication

    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    f140bd9 View commit details
    Browse the repository at this point in the history
  12. NBD client: connect to nbd server later

    The secondary qemu starts later than the primary qemu, so we
    cannot connect to nbd server in bdrv_open().
    
    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    2a2bbb1 View commit details
    Browse the repository at this point in the history
  13. quorum: allow ignoring child errors

    If the child is not ready, read/write/getlength/flush will
    return -errno. It is not critical error, and can be ignored:
    1. read/write:
       Just not report the error event.
    2. getlength:
       just ignore it. If all children's getlength return -errno,
       and be ignored, return -EIO.
    3. flush:
       Just ignore it. If all children's getlength return -errno,
       and be ignored, return 0.
    
    Usage: children.x.ignore-errors=true
    
    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    f687f3d View commit details
    Browse the repository at this point in the history
  14. docs: block replication's description

    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    wencongyang authored and colo-ft committed Mar 26, 2015
    Copy the full SHA
    a651588 View commit details
    Browse the repository at this point in the history
  15. COLO: Implement shutdown checkpoint

    For SVM, we forbid it shutdown directly when in COLO mode,
    FOR PVM's shutdown, we should do some work to ensure the consistent action
    between PVM and SVM.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    acd5a8f View commit details
    Browse the repository at this point in the history
  16. COLO: Disable qdev hotplug when VM is in COLO mode

    COLO do not support qdev hotplug migration, disable it.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    0a48891 View commit details
    Browse the repository at this point in the history
  17. COLO NIC: Implement NIC checkpoint and failover

    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    2f05f51 View commit details
    Browse the repository at this point in the history
  18. COLO: Add colo-set-checkpoint-period command

    With this command, we can control the period of checkpoint, if
    there is no comparison of net packets.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    1bd8d23 View commit details
    Browse the repository at this point in the history
  19. COLO: Improve checkpoint efficiency by do additional periodic checkpoint

    Besides normal checkpoint which according to the result of net packets
    comparing, We do additional checkpoint periodically, it will reduce the number
    of dirty pages when do one checkpoint, if we don't do checkpoint for a long
    time (This is a special case when the net packets is always consistent).
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    67266b1 View commit details
    Browse the repository at this point in the history
  20. COLO: Do checkpoint according to the result of net packets comparing

    Only do checkpoint, when the VMs' output net packets are inconsistent,
    We also limit the min time between two continuous checkpoint action, to
    give VM a change to run.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    d7186b1 View commit details
    Browse the repository at this point in the history
  21. COLO NIC: Some init work related with proxy module

    Implement communication protocol with proxy module by using
    netlink, and do some init work.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    e78d036 View commit details
    Browse the repository at this point in the history
  22. COLO NIC : Implement colo nic init/destroy function

    When in colo mode, call colo nic init/destroy function.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    2c4c083 View commit details
    Browse the repository at this point in the history
  23. COLO NIC: Implement colo nic device interface configure()

    Implement colo nic device interface configure()
    add a script to configure nic devices:
    ${QEMU_SCRIPT_DIR}/colo-proxy-script.sh
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    9a4ac0b View commit details
    Browse the repository at this point in the history
  24. COLO NIC: Init/remove colo nic devices when add/cleanup tap devices

    When COLO mode, we will do some init work for nic that will be used for COLO.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    ce6a3cd View commit details
    Browse the repository at this point in the history
  25. COLO: Add new command parameter 'colo_nicname' 'colo_script' for net

    The 'colo_nicname' should be assigned with network name,
    for exmple, 'eth2'. It will be parameter of 'colo_script',
    'colo_script' should be assigned with an scirpt path.
    
    We parse these parameter in tap.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    4371264 View commit details
    Browse the repository at this point in the history
  26. COLO failover: Don't do failover during loading VM's state

    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    0fd316d View commit details
    Browse the repository at this point in the history
  27. COLO failover: Implement COLO master/slave failover work

    If failover is requested, after some cleanup work,
    PVM or SVM will exit COLO mode, and resume to normal run.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    b6d6be4 View commit details
    Browse the repository at this point in the history
  28. COLO failover: Introduce a new command to trigger a failover

    We leave users to use whatever heartbeat solution they want, if the heartbeat
    is lost, or other errors they detect, they can use command
    'colo_lost_heartbeat' to tell COLO to do failover, COLO will do operations
    accordingly.
    
    For example,
    If send the command to PVM, Primary will exit COLO mode, and takeover,
    if to Secondary, Secondary will do failover work and at last takeover server.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    c3ae52a View commit details
    Browse the repository at this point in the history
  29. COLO RAM: Flush cached RAM into SVM's memory

    During the time of VM's running, PVM/SVM may dirty some pages, we will transfer
    PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint
    time. So, the content of SVM's RAM cache will always be some with PVM's memory
    after checkpoint.
    
    Instead of flushing all content of SVM's RAM cache into SVM's MEMORY,
    we do this in a more efficient way:
    Only flush any page that dirtied by PVM or SVM since last checkpoint.
    In this way, we ensure SVM's memory same with PVM's.
    
    Besides, we must ensure flush RAM cache before load device state.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    43acea8 View commit details
    Browse the repository at this point in the history
  30. arch_init: Start to trace dirty pages of SVM

    we will use this dirty bitmap together with VM's cache RAM dirty bitmap
    to decide which page in cache should be flushed into VM's RAM.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    0312342 View commit details
    Browse the repository at this point in the history
  31. COLO VMstate: Load VM state into qsb before restore it

    We should cache the device state to ensure the data is intact
    before restore it.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    91dd7a6 View commit details
    Browse the repository at this point in the history
  32. COLO RAM: Load PVM's dirty page into SVM's RAM cache temporarily

    The ram cache is initially the same as SVM/PVM's memory.
    
    At checkpoint, we cache the dirty RAM of PVM into RAM cache in the slave
    (so that RAM cache always the same as PVM's memory at every
    checkpoint), we will flush cached RAM to SVM after we receive
    all PVM's vmstate (RAM/device).
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
    Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    e516885 View commit details
    Browse the repository at this point in the history
  33. COLO: Save VM state to slave when do checkpoint

    We should save PVM's RAM/device to slave when needed.
    
    For VM state, we  will cache them in slave, we use QEMUSizedBuffer
    to store the data, we need know the data size of VM state, so in master,
    we use qsb to store VM state temporarily, and then migrate the data to
    slave.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    3da8bfe View commit details
    Browse the repository at this point in the history
  34. QEMUSizedBuffer: Introduce two help functions for qsb

    Introduce two new QEMUSizedBuffer APIs which will be used by COLO to buffer
    VM state:
    One is qsb_put_buffer(), which put the content of a given QEMUSizedBuffer
    into QEMUFile, this is used to send buffered VM state to secondary.
    Another is qsb_fill_buffer(), read 'size' bytes of data from the file into
    qsb, this is used to get VM state from socket into a buffer.
    
    Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    713ff48 View commit details
    Browse the repository at this point in the history
  35. COLO: Add a new RunState RUN_STATE_COLO

    Guest will enter this state when paused to save/restore VM state
    under colo checkpoint.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
    Signed-off-by: Gonglei <arei.gonglei@huawei.com>
    Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    colo-ft committed Mar 26, 2015
    Copy the full SHA
    1b13ed4 View commit details
    Browse the repository at this point in the history
Older