Simone Tiraboschi has posted comments on this change.

Change subject: packaging: setup: honouring engine DB parameters from answer 
file
......................................................................


Patch Set 2:

I tried the case you proposed and it seams to work as expected. Why do you 
think it should fail?

I run it generating the answer file and stopping it after the conf preview:

 [stirabos@f19t6 ovirt-engine]$ sudo engine-setup --generate-answer=d2
 [ INFO  ] Stage: Initializing
 [ INFO  ] Stage: Environment setup
           Configuration files: 
['/etc/ovirt-engine-setup.conf.d/10-packaging.conf']
           Log file: 
/var/log/ovirt-engine/setup/ovirt-engine-setup-20140827173127-l0gnz2.log
           Version: otopi-1.3.0_master 
(otopi-1.3.0-0.0.master.20140728.git336a22e.fc19)
 [ INFO  ] Stage: Environment packages setup
 [ INFO  ] Stage: Programs detection
 [ INFO  ] Stage: Environment setup
 [ INFO  ] Stage: Environment customization
          
           --== PRODUCT OPTIONS ==--
          
           Configure Engine on this host (Yes, No) [Yes]: 
           Configure WebSocket Proxy on this host (Yes, No) [Yes]: 
          
           --== PACKAGES ==--
          
 [ INFO  ] Checking for product updates...
 [ INFO  ] No product updates found
          
           --== ALL IN ONE CONFIGURATION ==--
          
          
           --== NETWORK CONFIGURATION ==--
          
           Setup can automatically configure the firewall on this system.
           Note: automatic configuration of the firewall may overwrite current 
settings.
           Do you want Setup to configure the firewall? (Yes, No) [Yes]: 
 [ INFO  ] firewalld will be configured as firewall manager.
           Host fully qualified DNS name of this server [f19t6.localdomain]: 
 [WARNING] Failed to resolve f19t6.localdomain using DNS, it can be resolved 
only locally
          
           --== DATABASE CONFIGURATION ==--
          
           Where is the Engine database located? (Local, Remote) [Local]: 
           Setup can configure the local postgresql server automatically for 
the engine to run. This may conflict with existing applications.
           Would you like Setup to automatically configure postgresql and 
create Engine database, or prefer to perform that manually? (Automatic, Manual) 
[Automatic]: 
          
           --== OVIRT ENGINE CONFIGURATION ==--
          
           Engine admin password: 
           Confirm engine admin password: 
 [WARNING] Password is weak: E' troppo semplice/sistematica
           Use weak password? (Yes, No) [No]: yes
           Application mode (Both, Virt, Gluster) [Both]: 
           Default storage type: (Local, Shared) [Shared]: 
          
           --== PKI CONFIGURATION ==--
          
           Organization name for certificate [localdomain]: 
          
           --== APACHE CONFIGURATION ==--
          
           Setup can configure the default page of the web server to present 
the application home page. This may conflict with existing applications.
           Do you wish to set the application as the default page of the web 
server? (Yes, No) [Yes]: 
           Setup can configure apache to use SSL using a certificate issued 
from the internal CA.
           Do you wish Setup to configure that, or prefer to perform that 
manually? (Automatic, Manual) [Automatic]: 
          
           --== SYSTEM CONFIGURATION ==--
          
           Configure an NFS share on this server to be used as an ISO Domain? 
(Yes, No) [Yes]: 
           Local ISO domain path [/var/lib/exports/iso-20140827153218]: 
           Local ISO domain ACL - note that the default will restrict access to 
f19t6.localdomain only, for security reasons [f19t6.localdomain(rw)]: 
           Local ISO domain name [ISO_DOMAIN]: 
          
           --== MISC CONFIGURATION ==--
          
          
           --== END OF CONFIGURATION ==--
          
 [ INFO  ] Stage: Setup validation
 [WARNING] Less than 16384MB of memory is available
          
           --== CONFIGURATION PREVIEW ==--
          
           Application mode                        : both
           Update Firewall                         : True
           Host FQDN                               : f19t6.localdomain
           Datacenter storage type                 : False
           Firewall manager                        : firewalld
           Engine database name                    : engine
           Engine database secured connection      : False
           Engine database host                    : localhost
           Engine database user name               : engine
           Engine database host name validation    : False
           Engine database port                    : 5432
           Engine installation                     : True
           NFS setup                               : True
           PKI organization                        : localdomain
           NFS mount point                         : 
/var/lib/exports/iso-20140827153218
           NFS export ACL                          : f19t6.localdomain(rw)
           Configure local Engine database         : True
           Set application as default page         : True
           Configure Apache SSL                    : True
           Configure WebSocket Proxy               : True
          
           Please confirm installation settings (OK, Cancel) [OK]: cancel
 [ ERROR ] Failed to execute stage 'Setup validation': Configuration was 
rejected by user
 [ INFO  ] Stage: Clean up
           Log file is located at 
/var/log/ovirt-engine/setup/ovirt-engine-setup-20140827173127-l0gnz2.log
 [ INFO  ] Generating answer file 
'/var/lib/ovirt-engine/setup/answers/20140827173223-setup.conf'
 [ INFO  ] Generating answer file 'd2'
 [ INFO  ] Stage: Pre-termination
 [ INFO  ] Stage: Termination
 [ ERROR ] Execution of setup failed
 
Getting this answer file witch contains a set of DB credentials:

 # action=setup
 [environment:default]
 OVESETUP_DIALOG/confirmSettings=none:None
 OVESETUP_CONFIG/applicationMode=str:both
 OVESETUP_CONFIG/updateFirewall=bool:True
 OVESETUP_CONFIG/fqdn=str:f19t6.localdomain
 OVESETUP_CONFIG/storageType=none:None
 OVESETUP_CONFIG/adminPassword=str:123456
 OVESETUP_CONFIG/storageIsLocal=bool:False
 OVESETUP_CONFIG/firewallManager=str:firewalld
 OSETUP_RPMDISTRO/requireRollback=none:None
 OSETUP_RPMDISTRO/enableUpgrade=none:None
 OVESETUP_DB/database=str:engine
 OVESETUP_DB/fixDbViolations=none:None
 OVESETUP_DB/secured=bool:False
 OVESETUP_DB/host=str:localhost
 OVESETUP_DB/user=str:engine
 OVESETUP_DB/securedHostValidation=bool:False
 OVESETUP_DB/password=str:g4MRvajqlHTNOEM32uGs9U
 OVESETUP_DB/port=int:5432
 OVESETUP_ENGINE_CORE/enable=bool:True
 OVESETUP_CORE/engineStop=none:None
 OVESETUP_SYSTEM/memCheckEnabled=bool:True
 OVESETUP_SYSTEM/nfsConfigEnabled=bool:True
 OVESETUP_PKI/organization=str:localdomain
 OVESETUP_CONFIG/isoDomainMountPoint=str:/var/lib/exports/iso-20140827153218
 OVESETUP_CONFIG/isoDomainName=str:ISO_DOMAIN
 OVESETUP_CONFIG/isoDomainACL=str:f19t6.localdomain(rw)
 OVESETUP_AIO/configure=none:None
 OVESETUP_AIO/storageDomainName=none:None
 OVESETUP_AIO/storageDomainDir=none:None
 OVESETUP_PROVISIONING/postgresProvisioningEnabled=bool:True
 OVESETUP_APACHE/configureRootRedirection=bool:True
 OVESETUP_APACHE/configureSsl=bool:True
 OVESETUP_CONFIG/websocketProxyConfig=bool:True

Then I run it again loading that answer file:

 [stirabos@f19t6 ovirt-engine]$ sudo engine-setup --config-append=d2
 [ INFO  ] Stage: Initializing
 [ INFO  ] Stage: Environment setup
           Configuration files: 
['/etc/ovirt-engine-setup.conf.d/10-packaging.conf', 
'/home/stirabos/ovirt/ovirt-engine/d2']
           Log file: 
/var/log/ovirt-engine/setup/ovirt-engine-setup-20140827173246-r5cpou.log
           Version: otopi-1.3.0_master 
(otopi-1.3.0-0.0.master.20140728.git336a22e.fc19)
 [ INFO  ] Stage: Environment packages setup
 [ INFO  ] Stage: Programs detection
 [ INFO  ] Stage: Environment setup
 [ INFO  ] Stage: Environment customization
          
           --== PRODUCT OPTIONS ==--
          
          
           --== PACKAGES ==--
          
 [ INFO  ] Checking for product updates...
 [ INFO  ] No product updates found
          
           --== ALL IN ONE CONFIGURATION ==--
          
          
           --== NETWORK CONFIGURATION ==--
          
 [ INFO  ] firewalld will be configured as firewall manager.
 [WARNING] Failed to resolve f19t6.localdomain using DNS, it can be resolved 
only locally
          
           --== DATABASE CONFIGURATION ==--
          
          
           --== OVIRT ENGINE CONFIGURATION ==--
          
          
           --== PKI CONFIGURATION ==--
          
          
           --== APACHE CONFIGURATION ==--
          
          
           --== SYSTEM CONFIGURATION ==--
          
          
           --== MISC CONFIGURATION ==--
          
          
           --== END OF CONFIGURATION ==--
          
 [ INFO  ] Stage: Setup validation
 [WARNING] Less than 16384MB of memory is available
          
           --== CONFIGURATION PREVIEW ==--
          
           Application mode                        : both
           Update Firewall                         : True
           Host FQDN                               : f19t6.localdomain
           Datacenter storage type                 : False
           Firewall manager                        : firewalld
           Engine database name                    : engine
           Engine database secured connection      : False
           Engine database host                    : localhost
           Engine database user name               : engine
           Engine database host name validation    : False
           Engine database port                    : 5432
           Engine installation                     : True
           NFS setup                               : True
           PKI organization                        : localdomain
           NFS mount point                         : 
/var/lib/exports/iso-20140827153218
           NFS export ACL                          : f19t6.localdomain(rw)
           Configure local Engine database         : True
           Set application as default page         : True
           Configure Apache SSL                    : True
           Configure WebSocket Proxy               : True
          
           Please confirm installation settings (OK, Cancel) [OK]: 
 [ INFO  ] Stage: Transaction setup
 [ INFO  ] Stopping engine service
 [ INFO  ] Stopping ovirt-fence-kdump-listener service
 [ INFO  ] Stopping websocket-proxy service
 [ INFO  ] Stage: Misc configuration
 [ INFO  ] Stage: Package installation
 [ INFO  ] Stage: Misc configuration
 [ INFO  ] Creating PostgreSQL 'engine' database
 [ INFO  ] Configuring PostgreSQL
 [ INFO  ] Creating/refreshing Engine database schema
 [ INFO  ] Creating CA
 [ INFO  ] Configuring WebSocket Proxy
 [ INFO  ] Generating post install configuration file 
'/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf'
 [ INFO  ] Stage: Transaction commit
 [ INFO  ] Stage: Closing up
          
           --== SUMMARY ==--
          
 [WARNING] Less than 16384MB of memory is available
           SSH fingerprint: 30:94:5F:24:48:32:A3:BA:E8:09:CD:62:17:54:EC:CA
           Internal CA 
C2:81:19:EC:4C:43:D2:B7:01:79:67:A6:2B:8F:F8:60:3D:DF:EC:3E
           Web access is enabled at:
               http://f19t6.localdomain:80/ovirt-engine
               https://f19t6.localdomain:443/ovirt-engine
           Please use the user "admin" and password specified in order to login
          
           --== END OF SUMMARY ==--
          
 [ INFO  ] Starting engine service
 [ INFO  ] Restarting httpd
 [ INFO  ] Restarting nfs services
 [ INFO  ] Stage: Clean up
           Log file is located at 
/var/log/ovirt-engine/setup/ovirt-engine-setup-20140827173246-r5cpou.log
 [ INFO  ] Generating answer file 
'/var/lib/ovirt-engine/setup/answers/20140827173431-setup.conf'
 [ INFO  ] Stage: Pre-termination
 [ INFO  ] Stage: Termination
 [ INFO  ] Execution of setup completed successfully

And it completed successfully.
Checking 

 /etc/ovirt-engine/engine.conf.d/10-setup-database.conf

I found the it effectively uses the random password that it generated during 
first attempt.

-- 
To view, visit http://gerrit.ovirt.org/32036
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9a7f79f3da05d89b34fa2cc4f74ed628fb44e3b4
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Simone Tiraboschi <stira...@redhat.com>
Gerrit-Reviewer: David Caro <dcaro...@redhat.com>
Gerrit-Reviewer: Eyal Edri <ee...@redhat.com>
Gerrit-Reviewer: Lev Veyde <lve...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Simone Tiraboschi <stira...@redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to