forked from xapi-project/xen-api
-
Couldn't load subscription status.
- Fork 0
Test #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Test #2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: John Else <john.else@citrix.com>
Instead of exposing the master_database ref directly, expose a setter and document it as for testing purposes only. Signed-off-by: John Else <john.else@citrix.com>
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
This has very similar arguments to login_no_password, but is not exposed in the Xapi_session interface. Signed-off-by: John Else <john.else@citrix.com>
For DR, xapi creates special read-only sessions which are registered with alternate databases. These sessions can be used to query the contents of these databases. The external session revalidation function checks whether sessions are registered in this way and, if they are registered, it will not destroy them. However, there is a race window during the period when one of these sessions has been created but has not yet been registered with a database. To fix this, we create the session while holding the registration mutex, so any concurrent revalidation checks will wait until the registration of the session is complete. The registration logic is moved down to login_no_password_common, as the registration mutex needs to be released before the final API call. n.b. the API call used at the end of login_no_password_common has changed from session.get_uuid to pool.get_all. The purpose of this API call is simply to get the pool master to update the last_active time on the session, so most API calls could be used here. session.get_uuid no longer works, because the session is already registered with the alternate database. pool.get_all is chosen as it is currently guaranteed to return only a small amount of data. Signed-off-by: John Else <john.else@citrix.com>
Any IPs on the non-primary bond-slaves would be lost.
An example of the old and new behaviour:
[root@dt04 ~]# xe pif-list device=eth1 --minimal
f628a46c-f483-897b-3234-aecc3c107d84
[root@dt04 ~]# xe pif-list device=eth2 --minimal
76472575-ef64-001f-4305-234e2dfc6f7c
[root@dt04 ~]# xe network-create name-label=bond-network
e7c98ee2-d000-477f-1692-2b6fd741dc3d
Before this patch
-----------------
[root@dt04 ~]# xe pif-reconfigure-ip uuid=f628a46c-f483-897b-3234-aecc3c107d84 mode=static IP=10.0.0.1 netmask=255.255.255.0 gateway=10.0.0.0
[root@dt04 ~]# xe pif-reconfigure-ip uuid=76472575-ef64-001f-4305-234e2dfc6f7c mode=static IP=10.0.0.2 netmask=255.255.255.0 gateway=10.0.0.0
[root@dt04 ~]# ip address show xenbr1 | grep inet
inet 10.0.0.1/24 brd 10.0.0.255 scope global xenbr1
[root@dt04 ~]# ip address show xenbr2 | grep inet
inet 10.0.0.2/24 brd 10.0.0.255 scope global xenbr2
[root@dt04 ~]# xe bond-create pif-uuids=f628a46c-f483-897b-3234-aecc3c107d84,76472575-ef64-001f-4305-234e2dfc6f7c network-uuid=e7c98ee2-d000-477f-1692-2b6fd741dc3d
4a243b9c-6625-4bba-776a-f29873486f81
[root@dt04 ~]# xe bond-list uuid=4a243b9c-6625-4bba-776a-f29873486f81 params=master --minimal
8605deeb-76d4-9637-086f-512779f4c2c6
[root@dt04 ~]# xe pif-list uuid=f628a46c-f483-897b-3234-aecc3c107d84 params=device,IP
device ( RO): eth1
IP ( RO):
[root@dt04 ~]# xe pif-list uuid=76472575-ef64-001f-4305-234e2dfc6f7c params=device,IP
device ( RO): eth2
IP ( RO): 10.0.0.2
[root@dt04 ~]# xe pif-list uuid=8605deeb-76d4-9637-086f-512779f4c2c6 params=device,IP
device ( RO) : bond0
IP ( RO): 10.0.0.1
[root@dt04 ~]# xe network-list uuid=e7c98ee2-d000-477f-1692-2b6fd741dc3d params=bridge --minimal
xapi1
[root@dt04 ~]# ip address show xapi1 | grep inet
inet 10.0.0.1/24 brd 10.0.0.255 scope global xapi1
There is no interface with the IP configuration that's on the other PIF since the xenbr2 iface has gone:
[root@dt04 ~]# ip address show xenbr2 | grep inet
Device "xenbr2" does not exist.
After this patch
----------------
[root@dt04 ~]# xe bond-create pif-uuids=f628a46c-f483-897b-3234-aecc3c107d84,76472575-ef64-001f-4305-234e2dfc6f7c network-uuid=e7c98ee2-d000-477f-1692-2b6fd741dc3d
Only one PIF on a bond is allowed to have an IP configuration.
<extra>: f628a46c-f483-897b-3234-aecc3c107d84
<extra>: 76472575-ef64-001f-4305-234e2dfc6f7c
Removing the IP config from either PIF will then allow the Bond.create to succeed:
[root@dt04 ~]# xe pif-reconfigure-ip uuid=f628a46c-f483-897b-3234-aecc3c107d84 mode=none
[root@dt04 ~]# xe bond-create pif-uuids=f628a46c-f483-897b-3234-aecc3c107d84,76472575-ef64-001f-4305-234e2dfc6f7c network-uuid=e7c98ee2-d000-477f-1692-2b6fd741dc3d
f8e5baf8-b620-31e5-abb8-3e3fb214c08d
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
CA-106754: Disallow bonding when more than one PIF has an IP config
CA-120586: Convert Failed_to_start_emulator into a proper API exception
CA-199656: Fix race in registering sessions with alternate databases
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-201117: quicktest: Use VDI.is_tools_iso instead of name_label
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-202289: mail-alarm: Get PRODUCT_BRAND from branding module
Signed-off-by: John Else <john.else@citrix.com>
CP-15745: Use xenserver-build-env for travis build
Triggering at 0 is often used by QA to test things, and the email generated under this condition (and only under this condition) was just incorrect. Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
CA-201311: Fix email alert text when trigger level is 0
Before this patch, emails would come in unformatted like the following:
From: noreply@dt04
To: simon.beaumont@citrix.com
Date: Tue, 1 Mar 2016 17:34:00 +0000
Subject: [dt04] XenServer Message: VM 88eea7dc-6b81-4a1e-a43d-86b3eb097fd5
ALARM
Field Value
----- -----
Name: ALARM
Priority: 3
Class: VM
Object UUID: 88eea7dc-6b81-4a1e-a43d-86b3eb097fd5
Timestamp: 20160301T17:33:53Z
Message UUID: 4116332a-995e-57d1-a318-c9c06a08c918
Pool name: dt04
Body:
Parameter=log_fs_usage
Value=0.040000
Alarm trigger value=0.0
Alarm trigger period=0
Now they come in formatted like this:
From: noreply@dt04
To: simon.beaumont@citrix.com
Date: Tue, 1 Mar 2016 17:39:56 +0000
Subject: [dt04] XenServer Alarm: Log partition nearly full on "Control domain
on host: dt04"
The log partition usage on "Control domain on host: dt04" is at 4.0%.
This alarm is set to be triggered when log partition usage is more than 0.0%.
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
Make sure travis runs the tests
Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
This adds several new fields for VIFs:
- ip{v4,v6}_configuration_mode (possible values are None and Static)
- ip{v4,v6}_addresses
- ip{v4,v6}_gateway
And the functions VIF.configure-ip{v4,v6} to set them, in a similar manner as
PIF.reconfigure_ip.
Signed-off-by: Chunjie Zhu <chunjie.zhu@citrix.com>
Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CA-201093: mail-alarm: Add formatter for log partition usage alerts
Enable TLSv1.2 capability for sparse_dd. Signed-off-by: Phus Lu <phus.lu@citrix.com>
This reverts commit 710456f.
CP-17469: Treat all known PCI classes as managed
CA-208537: vdi-copy between local SRs proposes unwanted ciphers
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Defined the dundee-plus release
The API has always had documentation that allows for more than one VM to have `is_control_domain = true`: > field ... "is_control_domain" "true if this is a control domain (domain 0 or a driver domain)"; Most of Xapi has been written with this in mind, e.g. `Xapi_host.destroy` which iterates through a list, `my_control_domains`. However there are a few places where it is assumed that dom0 is the only VM with `is_control_domain = true` and this patch makes these a bit more sane. Where the original code assumed only one control domain and did an operation that only makes sense for domain 0, an additional filter is applied to only operate on VMs with `domid = 0`. Where the original code assumed only one control domain and did an operation that makes sense for all control domains then this has been extended to operate on the list of VMs with `is_control_domain = true`. Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
…shable from other control domains Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Xenopsd is responsible for sorting out the defaults and there's a good reason to leave it empty as it enables QEMU's ExtendedKeyEvent extension (see xenopsd#272). Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Improve API doc of VM.affinity
CP-17631: Don't default HVM keymap to en-us
... aggregates two similar branching logics, no semantics change. Signed-off-by: Zheng Li <dev@zheng.li>
…task failure ... previously we didn't do this which caused issue like CA-199734. A bit of code refactoring is done as part of this. Big chunk of code is re-orgnized into small parts. Also use with_<resource> style functions to facilitate the separation and composition of error handling etc. Signed-off-by: Zheng Li <dev@zheng.li>
The code change was suggested by Christian Lindig <christian.lindig@citrix.com> for better naming and style. Signed-off-by: Zheng Li <dev@zheng.li>
… host.control_domain field. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This needs to be done before the "hi-level" database upgrade because the code to ensure the VM record for dom0 exists is in the dbsync logic which is called as part of starting the database engine. This all happens before the DB upgrade, and therefore, the dbsync logic tries to create an additional dom0 record because it does not have the Host.control_domain link. This patch adds the Host.control_domain link during the dbsync if it finds a VM with the CONTROL_DOMAIN_UUID from the Xensource_inventory. Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CP-17481: Allow other VMs to use is_control_domain
Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
Add new operation `VDI.mirror` for SR allowed_operations only when SR backend furnish Vdi_mirror capability Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
CA-199734: best-effort DP destroy and other cleanups for mirror/copy task failures
Add new operation `mirror` to VDI operations. Call vdi_pool_migrate can perform VDI mirroring only when SR backend furnish Vdi_mirror capability Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
CP-17506: Add new SM capability Vdi_mirror and update VDI and SR operations.
…her it's HVM." This reverts commit 54933c4. This was only added to placate a test case which had not correctly used the dom0 record for plugging a dummy VBD to dom0. In general we don't want this commit because it breaks VM.import.
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-214015: Don't check for domain zero in is_hvm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following needs fixing: