Bug 110348

Summary: 'ccm load' should run the validation checklist before running DM loader
Product: [Retired] Red Hat Web Application Framework Reporter: Daniel BerrangĂ© <berrange>
Component: otherAssignee: ccm-bugs-list
Status: CLOSED RAWHIDE QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-01-26 21:36:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 109025    
Bug Blocks: 106481    

Description Daniel Berrangé 2003-11-18 18:07:05 UTC
Description of problem:
The 'ccm load' tool combines setting of config parameters, loading
data model & running loaders into one command. It does not, however, 
include running any of the validation checklists. It merely does
syntactic validation. So, if I enter a valid JDBC url, when the DB
isn't actually running,it will go ahead & try to load the DM, failing
with an error because it obviously can't connect to a db that isn't
running. 

Another example, is forgetting to have classex12.jar in the classpath
- no validation is done - it simply tries to load the DM & fails with
a class not found exception.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:
[arturo@staging01 aplaws-camden]$ ccm load-aplaws --file
/usr/share/ccm/aplaws.properties --bundle
/usr/share/ccm/aplaws-full.txt --interactive

   [1] Set JDBC connection URL:
          jdbc:oracle:oci:aplaws_camden/aplaws_camden@ora9i
   [2] Set Server virtual host: 194.202.210.43:9001
   [3] Set Administrator Email Address: null
   [4] Set Administrator First Name: null
   [5] Set Administrator Last Name: null
   [6] Set Administrator Password: null
   [7] Set Administrator Password Question: null
   [8] Set Administrator Password Answer: null
   [9] Set Auth Administrator Email Address: null
  [10] Set Auth Administrator Identifier: null

   [l] List parameters   [o] Show optional parameters   [v] Validate
parameters
   [e] Exit   [r] Set required parameters   [A] Abort   [?] Help

Choose: 1
JDBC connection URL: jdbc:oracle:oci:aplaws_camden/aplaws_camden@ora9i
Choose: 2
Server virtual host: 194.202.210.43:9001
Choose: 3
Administrator Email Address: admin
Choose: 4
Administrator First Name: Admin
Choose: 5
Administrator Last Name: Account
Choose: 6
Administrator Password: 123456
Choose: 7
Administrator Password Question: 123
Choose: 8
Administrator Password Answer: 456
Choose: 9
Auth Administrator Email Address: admin
Choose: 10
Auth Administrator Identifier: admin//example
Choose: e
Exception in thread "main"
com.arsdigita.util.UncheckedWrapperException (root cause:
java.sql.SQLException: ORA-12541: TNS:no listener
)
        at
com.arsdigita.util.jdbc.Connections.acquire(Connections.java:96)
        at com.arsdigita.packaging.Load.run(Load.java:232)
        at com.arsdigita.packaging.MasterTool.main(MasterTool.java:100)
Root cause: java.sql.SQLException: ORA-12541: TNS:no listener

        at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
        at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321)
        at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:477)
        at
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346)
        at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
        at java.sql.DriverManager.getConnection(DriverManager.java:543)
        at java.sql.DriverManager.getConnection(DriverManager.java:216)
        at
com.arsdigita.util.jdbc.Connections.acquire(Connections.java:74)
        at com.arsdigita.packaging.Load.run(Load.java:232)
        at com.arsdigita.packaging.MasterTool.main(MasterTool.java:100)


Expected results:
ccm load runs the full validation checklist suite after reading config
parameters & identifies problems before attempting to load DM.


Additional info:

Comment 1 Richard Li 2003-11-21 14:36:41 UTC
if we're going to allow pluggable parameters, then there is additional
work here that needs to be done. calling the validation earlier is
trivial, but if it's pluggable, then presumably calling all the
validation checks that possibly exist is probably not the right thing
to do.