xcp-ng / xenadmin

XCP-ng Center, the Windows management console for XCP-ng and XenServer. /!\ EOL-Notice /!\ Community-maintained only /!\
https://xcp-ng.org
Other
425 stars 72 forks source link

[license] missing license_params causing restrictions #2

Closed cocoon closed 6 years ago

cocoon commented 6 years ago

The problem:

I have two test XCP-NG v7.4 Servers (upgraded existing 7.3) and tried to install the 7.3 install container supplemental pack using:

Tools --> Install Update

It shows the XCP-NG Servers grayed out with a tooltip: "Subscription Advantage required"

The root cause for the problem: My XCP-NG 7.4 hosts dosn't contain the following "license_params":

restrict_hotfix_apply
restrict_batch_hotfix_apply
restrict_cifs
restrict_vswitch_controller
restrict_network_sriov
restrict_management_on_vlan
restrict_export_resource_data
restrict_read_caching
restrict_health_check
restrict_corosync

XenCenter checks it and if it doesn't get a value it "prefers true": return BoolKeyPreferTrue(h.license_params, "restrict_hotfix_apply");

Checks starting here: https://github.com/xcp-ng/xenadmin/blob/master/XenModel/XenAPI-Extensions/Host.cs#L186

The clean solution: If the XCP-NG 7.4 host would contain these additional "license_params".

The Quick'n'Dirty Solution: I modified XenAdmin to always return false to the restriced checks.

The problem with this is: If one wants to use the modified client with other Xen Servers that are not XCP-NG it will cause troubles.

Example:

The client allows to start to setup HA but when you then try to finish it it will fail because the host doesn't allow it.

Just for the records:

All license_params of my XCP-NG 7.4 Host:

restrict_vlan: false
restrict_qos: false
restrict_pool_attached_storage: false
restrict_netapp: false
restrict_equalogic: false
restrict_pooling: false
enable_xha: true
restrict_marathon: false
restrict_email_alerting: false
restrict_historical_performance: false
restrict_wlb: false
restrict_rbac: false
restrict_dmc: false
restrict_checkpoint: false
restrict_cpu_masking: false
restrict_connection: false
platform_filter: false
regular_nag_dialog: false
restrict_vmpr: false
restrict_vmss: false
restrict_intellicache: false
restrict_gpu: false
restrict_dr: false
restrict_vif_locking: false
restrict_storage_xen_motion: false
restrict_vgpu: false
restrict_integrated_gpu_passthrough: false
restrict_vss: false
restrict_guest_agent_auto_update: false
restrict_pci_device_for_auto_update: false
restrict_xen_motion: false
restrict_guest_ip_setting: false
restrict_ad: false
restrict_ssl_legacy_switch: false
restrict_nested_virt: false
restrict_live_patching: false
restrict_set_vcpus_number_live: false
restrict_pvs_proxy: false
restrict_igmp_snooping: false
restrict_rpu: false
restrict_pool_size: false
restrict_cbt: false
restrict_usb_passthrough: false

All XenCenter license_params checks:


restrict_rbac
restrict_dmc
restrict_hotfix_apply
restrict_batch_hotfix_apply
restrict_checkpoint
restrict_cifs
restrict_pci_device_for_auto_update
restrict_wlb
restrict_vswitch_controller
restrict_network_sriov
restrict_pooling
restrict_vmss
restrict_dr
restrict_storage_xen_motion
restrict_cbt
enable_xha
restrict_email_alerting
restrict_netapp
restrict_historical_performance
restrict_cpu_masking
restrict_gpu
restrict_usb_passthrough
restrict_vgpu
restrict_management_on_vlan
restrict_integrated_gpu_passthrough
restrict_export_resource_data
restrict_xen_motion
restrict_ad
restrict_read_caching
restrict_health_check
restrict_vss
restrict_pool_size
restrict_pvs_proxy
restrict_ssl_legacy_switch
restrict_live_patching
restrict_igmp_snooping
restrict_set_vcpus_number_live
restrict_rpu
restrict_corosync```
olivierlambert commented 6 years ago

pinging @johnelse regarding the extra missing license params :)

borzel commented 6 years ago

Maybe we should detect XCP-ng and switch internally to "Free/Libre" mode?

johnelse commented 6 years ago

Ah, these are the features which are "owned" by the license daemon rather than by xapi itself.

At the moment xcp-featured isn't reporting these features at all - I'll fix this.

olivierlambert commented 6 years ago

Thanks @johnelse :+1:

olivierlambert commented 6 years ago

We got the RPM, it will be distributed with the 7.4.1 release (with also the new rebranded XenCenter)