Permalink
Commits on Aug 18, 2017
  1. Merge pull request #3168 from kc284/master

    CA-263064: Stop logging the body of jsonrpc requests.
    robhoes committed on GitHub Aug 18, 2017
  2. CA-263064: Stop logging the body of jsonrpc requests.

    Also removed additional debug line that was not particularly useful.
    
    Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
    kc284 committed Aug 18, 2017
  3. Merge pull request #3172 from lindig/master

    Fix spelling of LICENCE_RESTRICTION / LICENSE_RESTRICTION in pool_update
    lindig committed on GitHub Aug 18, 2017
  4. Fix spelling of LICENCE_RESTRICTION / LICENSE_RESTRICTION in pool_upd…

    …ate.precheck
    
    This fixes the previous commit.
    
    Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
    lindig committed Aug 18, 2017
  5. Merge pull request #3170 from srowe/update-precheck-map-LICENSE_RESTR…

    …ICTION
    
    Add LICENSE_RESTRICTION to the error whitelist
    lindig committed on GitHub Aug 18, 2017
  6. Add LICENSE_RESTRICTION to the error whitelist

    Extend the list of errorcode handled by parse_precheck_failure().
    
    Signed-off-by: Simon Rowe <simon.rowe@eu.citrix.com>
    srowe committed Aug 18, 2017
Commits on Aug 14, 2017
  1. Merge pull request #3167 from kc284/master

    CA-261855: Generate automatically an image map for the API classes.
    robhoes committed on GitHub Aug 14, 2017
  2. CA-261855: Generate automatically an image map for the API classes.

    Also: fixed the size of the image; moved the method return type into the same
    line as the rest of the method signature.
    
    Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
    kc284 committed Aug 14, 2017
Commits on Aug 8, 2017
  1. Merge pull request #3164 from gaborigloi/feature/CBT_merge

    Merge feature/CBT branch into master
    robhoes committed on GitHub Aug 8, 2017
  2. Test_event: use Test_common.make_session helper

    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jul 26, 2017
  3. Test_vdi_cbt: use OUnit's set comparator

    for better test failure reporting - now the extra & different elements
    will also be reported.
    
    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jul 26, 2017
  4. Implement VDI.get_nbd_info XenAPI call

    Forward the call to master, because this call only does database
    accesses, but it does many of them, so it's more efficient to do this on
    the master.
    
    I have skipped empty IPs, because the IPs can be temporarily empty if
    they are configured via DHCP. And PIFs may not even have an IP, in which
    case it is the empty string again.
    
    In order to correctly format the IPv6 addresses in the output URIs and
    conform to the RFC3986 specification of URI syntax, which says that IPv6
    addresses should be enclosed in square brackets, I had to construct the
    URIs by hand. I could not use the Uri library, because it would
    incorrectly escape the colon in the IPv6 addresses using a URL escape
    code.
    
    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jul 26, 2017
  5. Test_common.make_pif: correct default value of iPv6 param to empty list

    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jul 25, 2017
  6. VDI.export_changed_blocks: only require SR of vdi_to

    If the VDIs are from different SRs, then the changed blocks are all the
    blocks of vdi_to, so the SR of vdi_from doesn't have to be connected.
    Using SR.forward_multiple_op caused a bug where the
    export_changed_blocks call was forwarded to a slave, even though this
    call has to be run from the SR master, which is the pool master in case
    of a shared SR. The forward_vdi_op function correctly forwards the call
    to the SR master.
    
    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jul 17, 2017
  7. Add xe vdi-export-changed-blocks CLI command

    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jun 29, 2017
  8. Implement VDI.export_changed_blocks XenAPI call

    We require both SRs to be attached for the corner case where we ask for
    the changed blocks between two VDIs from two different SRs. However,
    this is not strictly necessary: in the above case we just return all the
    blocks of the second VDI, so we only need the SR of the second VDI to be
    attached.
    
    For this operation, even though we could allow the VDI to be attached as
    read-only, we require it to be detached, to simplify the implementation
    of the storage plugins - now we have one less thing to consider, and
    this makes the implementation more flexible.
    
    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jun 29, 2017
  9. VDI.export_changed_blocks: lock vdi_to during SMAPIv2 call

    This is to avoid the VDI being attached and written to while the
    VDI.export_changed_blocks SMAPIv2 call is running.
    
    The caller has to ensure that the "sr" parameter is the SR of the second
    VDI, "vdi_to".
    
    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jul 4, 2017
  10. VDI.data_destroy: reset the VDI's content_id

    to a special constant. The content_id of the data_destroyed VDI has to
    be different from its old content_id and the content_ids of all the
    other VDIs with data, to ensure that we won't select it as the base VDI
    during storage motion. Since the data of the VDI has been destroyed, it
    should be considered different from all other VDIs that have data.
    
    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jul 6, 2017
  11. Add VDI.export_changed_blocks SMAPIv2 function

    And add the call to Storage_impl_test with an "assert false" stub, as we
    don't have tests for this call in Storage_impl_test at the moment, so it
    shouldn't get called.
    
    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jun 15, 2017
  12. Add support for vdi_export_changed_blocks SMAPIv1 call

    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jun 14, 2017
  13. datamodel: add list of errors to CBT calls

    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jun 9, 2017
  14. Add xe vdi-data-destroy CLI command

    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jun 9, 2017
  15. Implement VDI.data_destroy XenAPI call

    This call is idempotent, therefore it is allowed on a VDI of type
    cbt_metadata.
    
    Repeat the same checks done for VDI.destroy in check_operation_error, in
    addition to the checks specific to data_destroy. However, some of the
    checks performed by VDI.destroy are irrelevant to VDI.data_destroy,
    because CBT can only be enabled on VDIs of type user or system,
    therefore we can never get into a state where CBT is enabled for a
    ha_statefile, redo_log, or metadata VDI.
    But I still decided to extract the VDI.destroy checks and call these for
    both operations, to avoid the various checks getting out of sync - it is
    safe to still perform these irrelevant checks for VDI.data_destroy.
    
    I have also reused the implementation of VDI.destroy, and this means
    that VDI.data_destroy suffers from the same race as VDI.destroy: we
    delete the VBDs referring to the VDI shortly after (data_)destroying the
    VDI.
    
    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jun 9, 2017
  16. Add VDI_NO_CBT_METADATA XenAPI error

    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jun 9, 2017
  17. Add VDI.data_destroy SMAPIv2 function

    And add the call to Storage_impl_test with an "assert false" stub, as we don't
    have tests for this call in Storage_impl_test at the moment, so it shouldn't
    get called.
    
    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jun 7, 2017
  18. Add support for vdi_data_destroy SMAPIv1 call

    Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
    gaborigloi committed Jun 7, 2017
  19. Merge pull request #3160 from minli1/private/minl1/CA-253959

    CA-253959: Modify error message from update precheck script.
    robhoes committed on GitHub Aug 8, 2017
Commits on Aug 4, 2017
  1. CA-253959: Modify error message from update precheck script.

    Signed-off-by:Min Li <min.li1@citrix.com>
    minli1 committed Aug 4, 2017
Commits on Aug 2, 2017
  1. Merge pull request #3152 from minli1/private/minl1/CP-23579

    Test CA226886:Quicktest for import_raw_vdi when no host is available for the SR.
    gaborigloi committed on GitHub Aug 2, 2017
  2. Quicktest for import_raw_vdi when no host is available for the SR.

    Signed-off-by:Min Li <min.li1@citrix.com>
    minli1 committed Jul 27, 2017
  3. Merge pull request #3156 from Frezzle/CA-254515-final

    CA-254515: Fix 2 cases where snapshot_of becomes null; unit tests included!
    gaborigloi committed on GitHub Aug 2, 2017
  4. CA-254515: Update new VDIs after they are created

    Potential problem:
    This should resolve the `snapshot_of` field becoming NULL in a
    situation where the snapshoted VDI and the snapshot VDI are both
    newly-created and their order of creation can be anything (which
    would have been a problem if the snapshot VDI is created before the
    snapshoted VDI, because then when setting the snapshot VDI's
    `snapshot_of` field it would not be able to find the snapshoted VDI
    in the database because it has not yet been created, and would hence
    set the snapshot's `snapshot_of` field to null).
    
    Solution:
    Move the `to_update` definition to after `db_vdi_map` is updated with
    the newly-created VDIs; that way we end up with the new VDIs inside
    the `to_update` map with all the information we need, including the
    VDI's reference (from DB), record (from DB) and info (from SR scan).
    The newly-created VDIs are then iterated through to update all its
    fields, including their `snapshot_of` field which may have been
    wrongfully set to null.
    
    Signed-off-by: Frederico Mazzone <frederico.mazzone@citrix.com>
    Frezzle committed Jun 2, 2017
  5. CA-254515: Check database when updating VDI.snapshot_of

    The VDI snapshot's `snapshot_of` field would become a null reference if
    its name_label or name_description field was changed, or if vdi-update
    was called on it. This was happening because it was only checking the
    VDI map argument passed into the `find_vdi` function, which did not
    contain the VDI that was originally snapshoted.
    
    Now, if the map argument does not contain the snapshoted VDI, `find_vdi`
    will check the database for the snapshoted VDI, which it should find if
    it still exists, and hence will no longer return a null reference and
    will retain its original `snapshot_of` value.
    
    Signed-off-by: Frederico Mazzone <frederico.mazzone@citrix.com>
    Frezzle committed Jun 1, 2017
  6. Add unit tests for CA-254515

    There are 2 scenarios we test; the first is when we update a VDI
    snapshot which already exists in the database. The second is when
    we are creating a snapshot and its original VDI, in that order
    (because they exist in the SR but not the database). In both cases
    we test to see that the snapshot's `snapshot_of` field has not
    become null.
    
    Signed-off-by: Frederico Mazzone <frederico.mazzone@citrix.com>
    Frezzle committed Jun 27, 2017
Commits on Aug 1, 2017
  1. Merge pull request #3154 from kc284/master

    Extended README.md and excluded from build output.
    mseri committed on GitHub Aug 1, 2017