Bug 1457357

Summary: Allow editing all the shared storage configuration values
Product: [oVirt] ovirt-hosted-engine-ha Reporter: Simone Tiraboschi <stirabos>
Component: RFEsAssignee: Jenny Tokar <jtokar>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: high Docs Contact:
Priority: high    
Version: 2.1.0.3CC: bugs, dfediuck, jtokar, mavital, trichard, ylavi
Target Milestone: ovirt-4.1.5Keywords: FutureFeature, Triaged
Target Release: 2.1.5Flags: rule-engine: ovirt-4.1+
rule-engine: exception+
ylavi: planning_ack+
msivak: devel_ack+
mavital: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
You can now change more self-hosted engine configuration in the hosted-engine.conf file. For example, to set the value: hosted-engine --set-shared-config gateway 10.35.1.254 To get the value: hosted-engine --get-shared-config gateway The commands can be used with the additional parameter "type", if there is concern for duplicate keys in different files: hosted-engine --set-shared-config gateway 10.35.1.254 --type=he_conf hosted-engine --get-shared-config gateway --type=he_conf
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-23 08:03:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1400890, 1439069, 1449561, 1479855    

Description Simone Tiraboschi 2017-05-31 14:47:47 UTC
Description of problem:
Currently with 'hosted-engine --set-shared-config' the user could just edit broker related values.
Due to other reasons (eg. decommissioning one of the initial gluster hosts, modifying the engine FQDN...), the user should be also able to change values from the initial answer file.

Actual results:
[root@c72he20170530h1 ~]# hosted-engine --set-shared-config --help
Usage: /usr/sbin/hosted-engine --set-shared-config key value [--type=<type>]
    Set shared storage configuration.
    Valid types are: broker.
    Available only after deployment has completed.

Comment 1 Sandro Bonazzola 2017-06-06 11:40:15 UTC
Please note this bug is marked as blocker for a bug targeted to 4.1.4 when targeting this bug.

Comment 3 Nikolai Sednev 2017-08-21 10:28:38 UTC
Available keys are:
he_conf : ['bridge', 'domainType', 'connectionUUID', 'ca_subject', 'conf', 'vm_disk_id', 'gateway', 'console', 'metadata_image_UUID', 'storage', 'lockspace_volume_UUID', 'port', 'sdUUID', 'iqn', 'metadata_volume_UUID', 'vm_disk_vol_id', 'conf_image_UUID', 'ca_cert', 'conf_volume_UUID', 'portal', 'user', 'host_id', 'password', 'lockspace_image_UUID', 'vmid', 'fqdn', 'vdsm_use_ssl', 'mnt_options', 'spUUID']
broker : ['smtp-port', 'destination-emails', 'smtp-server', 'source-email', 'state_transition']

Getting and setting key values is working without errors, but also without key value verification, i.e. "gateway" key value might be provided with letters, while only numbers should be allowed.

Details of test results available here:
http://pastebin.test.redhat.com/509814.

Tested on ovirt-hosted-engine-setup-2.1.3.6-1.el7ev.noarch, using rhvm-appliance-4.1.20170709.3-1.el7.noarch.

I'm moving this bug to verified, while opening another bug on lack of verification for key values.