Bug 1101001 - [ ERROR ] Failed to execute stage 'Misc configuration': 'NoneType' object has no attribute 'endswith' from customer point of view this message doesn't tell to user that he/she should set isoDomainStorageDir=None.
Summary: [ ERROR ] Failed to execute stage 'Misc configuration': 'NoneType' object has...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Yedidyah Bar David
QA Contact: Pavel Stehlik
URL:
Whiteboard: integration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-25 09:46 UTC by Tareq Alayan
Modified: 2015-08-11 19:21 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-26 12:03:52 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
setup log (3.44 MB, text/x-log)
2014-05-25 09:46 UTC, Tareq Alayan
no flags Details

Description Tareq Alayan 2014-05-25 09:46:36 UTC
Created attachment 899069 [details]
setup log

Description of problem:
 [ ERROR ] Failed to execute stage 'Misc configuration': 'NoneType' object has no attribute 'endswith'

from customer point of view this message doesn't tell to user that he/she should set isoDomainStogageDir=None.

Version-Release number of selected component (if applicable):
3.4

How reproducible:
always

Steps to Reproduce:
1. install engine + dwh +reports 

Actual results:
installation fails

Expected results:
installation completed successfully 

Additional info:
 [ ERROR ] Failed to execute stage 'Misc configuration': 'NoneType' object has no attribute 'endswith'

from customer point of view this message doesn't tell to user that he/she should set isoDomainStogageDir=None.





see the /usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/rhevm-setup-plugins/distro-rhel/image_upload.py

line 98 (_misc method). the variable which is none is 'targetDir'. which is interesting ... it is got from:

{{{
targetDir = self.environment[
osetupcons.ConfigEnv.ISO_DOMAIN_STORAGE_DIR
]
}}}

in case we set None, it works, but in case we set '/tmp' it fails ... I would expect such behav in opposite order ... so let see how that value evaluated ...

/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/config/iso_domain.py

there is:

self.environment[
osetupcons.ConfigEnv.ISO_DOMAIN_STORAGE_DIR
] = None

and I think it should be:

self.environment.setdefault(
osetupcons.ConfigEnv.ISO_DOMAIN_STORAGE_DIR,
None)

but it still doesn't explain why it works for regular runs and doesn't work for runs with rhevm-dwh-setup and rhevm-reports-setup ...

Comment 1 Tareq Alayan 2014-05-25 09:54:28 UTC
 The answer file:
00:04:57.479 [environment:default]
00:04:57.479 OVESETUP_PROVISIONING/postgresProvisioningEnabled=bool:False
00:04:57.479 OVESETUP_CONFIG/isoDomainName=str:ISO_DOMAIN
00:04:57.479 OVESETUP_CONFIG/adminPassword=str:123456
00:04:57.479 OVESETUP_CONFIG/storageType=str:nfs
00:04:57.479 OVESETUP_CONFIG/applicationMode=str:both
00:04:57.479 OVESETUP_CONFIG/fqdn=str:jenkins-vm-25.scl.lab.tlv.redhat.com
00:04:57.479 OVESETUP_CONFIG/macRangePool=str:00:1A:4A:16:81:CA-00:1A:4A:16:81:D9
00:04:57.479 OVESETUP_CONFIG/isoDomainStorageDir=str:/tmp/
00:04:57.479 OVESETUP_CONFIG/websocketProxyConfig=bool:True
00:04:57.479 OVESETUP_CONFIG/isoDomainACL=str:0.0.0.0/0.0.0.0(rw)
00:04:57.479 OVESETUP_CONFIG/updateFirewall=bool:True
00:04:57.479 OVESETUP_CONFIG/firewallManager=str:iptables
00:04:57.479 OVESETUP_CONFIG/isoDomainMountPoint=str:/var/lib/exports/iso
00:04:57.480 OVESETUP_DWH_PROVISIONING/postgresProvisioningEnabled=bool:True
00:04:57.480 OSETUP_RPMDISTRO/enableUpgrade=bool:False
00:04:57.480 OVESETUP_RHEVM_SUPPORT/redhatSupportProxyEnabled=bool:False
00:04:57.480 OVESETUP_AIO/storageDomainDir=none:None
00:04:57.480 OVESETUP_AIO/configure=none:None
00:04:57.480 OVESETUP_AIO/rootPassword=none:None
00:04:57.480 OVESETUP_REPORTS_CORE/enable=bool:True
00:04:57.480 OVESETUP_REPORTS_CONFIG/adminPassword=str:123456
00:04:57.480 OVESETUP_REPORTS_DB/database=str:ovirt_engine_reports
00:04:57.480 OVESETUP_REPORTS_DB/secured=bool:False
00:04:57.480 OVESETUP_REPORTS_DB/securedHostValidation=bool:False
00:04:57.480 OVESETUP_REPORTS_DB/host=str:localhost
00:04:57.480 OVESETUP_REPORTS_DB/user=str:ovirt_engine_reports
00:04:57.480 OVESETUP_REPORTS_DB/password=str:123456
00:04:57.480 OVESETUP_REPORTS_DB/port=int:5432
00:04:57.480 OVESETUP_PKI/organization=str:tlv.redhat.com
00:04:57.480 OVESETUP_DWH_DB/database=str:ovirt_engine_history
00:04:57.480 OVESETUP_DWH_DB/secured=bool:False
00:04:57.480 OVESETUP_DWH_DB/securedHostValidation=bool:False
00:04:57.481 OVESETUP_DWH_DB/host=str:localhost
00:04:57.481 OVESETUP_DWH_DB/user=str:ovirt_engine_history
00:04:57.481 OVESETUP_DWH_DB/password=str:123456
00:04:57.481 OVESETUP_DWH_DB/port=int:5432
00:04:57.481 OVESETUP_SYSTEM/memCheckEnabled=bool:False
00:04:57.481 OVESETUP_SYSTEM/nfsConfigEnabled=bool:True
00:04:57.481 OVESETUP_SYSTEM/redhatSupportProxyEnabled=bool:False
00:04:57.481 OVESETUP_APACHE/configureSsl=bool:True
00:04:57.481 OVESETUP_APACHE/configureRootRedirection=bool:True
00:04:57.481 OVESETUP_DIALOG/confirmSettings=bool:True
00:04:57.481 OVESETUP_DIALOG/confirmUpgrade=bool:False
00:04:57.481 OVESETUP_DIALOG/engineStop=bool:True
00:04:57.481 OVESETUP_DWH_CORE/enable=bool:True
00:04:57.481 OVESETUP_DB/database=str:engine
00:04:57.481 OVESETUP_DB/secured=bool:False
00:04:57.481 OVESETUP_DB/securedHostValidation=bool:False
00:04:57.481 OVESETUP_DB/host=str:localhost
00:04:57.481 OVESETUP_DB/user=str:engine
00:04:57.481 OVESETUP_DB/password=str:123456
00:04:57.481 OVESETUP_DB/port=int:5432
00:04:57.481 OVESETUP_REPORTS_PROVISIONING/postgresProvisioningEnabled=bool:False
00:04:57.482 
00:04:57.482 2014-05-23 23:20:35,761 - MainThread - job_runner.libs.utils - INFO - Executes ['engine-setup', '--config-append=./answers_OtopiSetup34']
00:05:14.701 [ INFO  ] Stage: Initializing
00:05:14.850 [ INFO  ] Stage: Environment setup
00:05:14.851           Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-dwh.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-packaging-rhevm-reports.conf', '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf', '/var/lib/jenkins/workspace/3.4-git-rhevmCore-infra_reports_local_db_scratch_install/./answers_OtopiSetup34']
00:05:14.853           Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140523232046-ojjjqs.log
00:05:14.854           Version: otopi-1.2.1 (otopi-1.2.1-1.el6ev)
00:05:19.811 [ INFO  ] Stage: Environment packages setup
00:05:25.419 [ INFO  ] Stage: Programs detection
00:05:25.433 [ INFO  ] Stage: Environment setup
00:05:25.610 [ INFO  ] Stage: Environment customization
00:05:25.649          
00:05:25.649           --== PRODUCT OPTIONS ==--
00:05:25.650          
00:05:25.656          
00:05:25.657           --== PACKAGES ==--
00:05:25.657          
00:05:26.357          
00:05:26.357           --== NETWORK CONFIGURATION ==--
00:05:26.358          
00:05:26.717 [ INFO  ] iptables will be configured as firewall manager.
00:05:26.722          
00:05:26.722           --== DATABASE CONFIGURATION ==--
00:05:26.723          
00:05:26.770          
00:05:26.771           --== OVIRT ENGINE CONFIGURATION ==--
00:05:26.771          
00:05:26.778          
00:05:26.778           --== PKI CONFIGURATION ==--
00:05:26.779          
00:05:26.781           PKI is already configured
00:05:26.785          
00:05:26.785           --== APACHE CONFIGURATION ==--
00:05:26.786          
00:05:26.801          
00:05:26.802           --== SYSTEM CONFIGURATION ==--
00:05:26.802          
00:05:26.812          
00:05:26.812           --== MISC CONFIGURATION ==--
00:05:26.812          
00:05:26.817          
00:05:26.818           --== END OF CONFIGURATION ==--
00:05:26.818          
00:05:26.831 [ INFO  ] Stage: Setup validation
00:05:27.079 [WARNING] Warning: Not enough memory is available on the host. Minimum requirement is 4096MB, and 16384MB is recommended.
00:05:27.289          
00:05:27.290           --== CONFIGURATION PREVIEW ==--
00:05:27.291          
00:05:27.293           Engine database name                    : engine
00:05:27.293           Engine database secured connection      : False
00:05:27.295           Engine database host                    : localhost
00:05:27.296           Engine database user name               : engine
00:05:27.297           Engine database host name validation    : False
00:05:27.298           Engine database port                    : 5432
00:05:27.298           NFS setup                               : True
00:05:27.300           PKI organization                        : tlv.redhat.com
00:05:27.300           Application mode                        : both
00:05:27.302           Firewall manager                        : iptables
00:05:27.305           Update Firewall                         : True
00:05:27.305           Configure WebSocket Proxy               : True
00:05:27.306           Host FQDN                               : jenkins-vm-25.scl.lab.tlv.redhat.com
00:05:27.306           NFS export ACL                          : 0.0.0.0/0.0.0.0(rw)
00:05:27.307           NFS mount point                         : /var/lib/exports/iso
00:05:27.307           Datacenter storage type                 : nfs
00:05:27.309           Configure local Engine database         : False
00:05:27.310           Set application as default page         : True
00:05:27.311           Configure Apache SSL                    : True
00:05:27.311           Upgrade packages                        : False
00:05:27.313           DWH installation                        : True
00:05:27.313           DWH database name                       : ovirt_engine_history
00:05:27.314           DWH database secured connection         : False
00:05:27.315           DWH database host                       : localhost
00:05:27.316           DWH database user name                  : ovirt_engine_history
00:05:27.317           DWH database host name validation       : False
00:05:27.318           DWH database port                       : 5432
00:05:27.319           Configure local DWH database            : True
00:05:27.320           Reports installation                    : True
00:05:27.321           Reports database name                   : ovirt_engine_reports
00:05:27.321           Reports database secured connection     : False
00:05:27.323           Reports database host                   : localhost
00:05:27.324           Reports database user name              : ovirt_engine_reports
00:05:27.324           Reports database host name validation   : False
00:05:27.325           Reports database port                   : 5432
00:05:27.326           Configure local Reports database        : False
00:05:27.332 [ INFO  ] Stage: Transaction setup
00:05:27.431 [ INFO  ] Stopping engine service
00:05:27.531 [ INFO  ] Stopping dwh service
00:05:27.779 [ INFO  ] Stopping websocket-proxy service
00:05:27.846 [ INFO  ] Stage: Misc configuration
00:05:27.850 [ INFO  ] Stage: Package installation
00:05:28.350 [ INFO  ] Stage: Misc configuration
00:05:28.395 [ INFO  ] Creating PostgreSQL 'ovirt_engine_history' database
00:05:33.109 [ INFO  ] Configuring PostgreSQL
00:06:34.310 [ INFO  ] Creating Engine database schema
00:06:59.308 [ INFO  ] Creating/refreshing DWH database schema
00:07:10.363 [ INFO  ] Deploying Jasper
00:11:11.613 [ INFO  ] Importing data into Jasper
00:12:37.949 [ INFO  ] Configuring Jasper Java resources
00:12:37.954 [ INFO  ] Configuring Jasper Database resources
00:12:37.957 [ INFO  ] Customizing Jasper
00:12:38.211 [ INFO  ] Customizing Jasper metadata
00:14:22.212 [ INFO  ] Customizing Jasper Pro Parts
00:17:06.529 [ ERROR ] Failed to execute stage 'Misc configuration': 'NoneType' object has no attribute 'endswith'
00:17:06.531 [ INFO  ] Yum Performing yum transaction rollback
00:17:06.654 [ INFO  ] Rolling back database schema
00:17:06.656 [ INFO  ] Clearing Engine database engine
00:17:14.297 [ INFO  ] Rolling back DWH database schema
00:17:14.298 [ INFO  ] Clearing DWH database ovirt_engine_history
00:17:17.198 [ INFO  ] Rolling back Reports database schema
00:17:17.198 [ INFO  ] Clearing Reports database ovirt_engine_reports
00:17:18.182 [ INFO  ] Rolling back Reports files
00:17:18.185 [ INFO  ] Stage: Clean up
00:17:18.187           Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20140523232046-ojjjqs.log
00:17:18.237 [ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20140523233256-setup.conf'
00:17:18.243 [ INFO  ] Stage: Pre-termination
00:17:18.287 [ INFO  ] Stage: Termination
00:17:18.289 [ ERROR ] Execution of setup failed

Comment 2 Yedidyah Bar David 2014-05-26 12:03:52 UTC
OVESETUP_CONFIG/isoDomainStorageDir is never saved to an answer file by engine-setup. Not sure what caused it to be used in an answer file.

engine-setup only supports answer files created by it. E.g., a supported flow is:

On machine A:
state0:
engine-setup
...
answer file is: ans1

On machine B, in a state identical to state0:
engine-setup --config-append=ans1

Editing answer files manually might or might not work, and a user is *always* expected to verify that manual editing produced an answer file doing what they expected will be done.

So in the above case, 'engine-setup --config-append=ans1' on machine B should have worked, and if not, that's a bug. If ans1 is then edited, and engine-setup then fails with the edited file:
1. Obviously the failure is a result of the editing, regardless of the error message.
2. This might or might not be a bug, depending on the specific change done to the answer file.

Comment 3 Tareq Alayan 2014-05-26 15:39:02 UTC
but the answer file wasn't edited between the runs

Comment 4 Yedidyah Bar David 2014-05-27 05:38:37 UTC
(In reply to Tareq Alayan from comment #3)
> but the answer file wasn't edited between the runs

Between which runs? Did it ever work? Was it a result of an interactive engine-setup run? As I wrote above, This specific key is never written by engine-setup to an answer file, at least as far as I can tell from reading the code.


Note You need to log in before you can comment on or make changes to this bug.