Bug 1568485 - Error provisioning configuration with appliance_console_cli
Summary: Error provisioning configuration with appliance_console_cli
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.9.0
Hardware: x86_64
OS: Linux
Target Milestone: GA
: cfme-future
Assignee: Gregg Tanzillo
QA Contact: Dave Johnson
Depends On:
TreeView+ depends on / blocked
Reported: 2018-04-17 15:27 UTC by Juan Manuel Parrilla Madrid
Modified: 2018-04-23 13:59 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-04-20 15:54:01 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:

Attachments (Terms of Use)

Description Juan Manuel Parrilla Madrid 2018-04-17 15:27:43 UTC
Description of problem:
Hi there, I am using appliance_console_cli to configure the appliances automatically on Openstack. Once deployed CFME and running as an empty instance I  run this command:

appliance_console_cli -H "cf-test.tclab.cloud.lab.eng.bos.redhat.com" -p "password" -r 0 -i -S -k -f -b /dev/vdb -z Europe/Madrid --server start

This command does not gives me an error, it creates the partition on the vdb disk but doesn't configure the ddbb, but it must do it.

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

How reproducible:

Steps to Reproduce:
1. Provision the CFME image (QCOW2) on Openstack
2. Create an instance from this image
3. Attach a second disk to this VM
4. Execute the command and see the journald -xn

```appliance_console_cli -H "cf-test.tclab.cloud.lab.eng.bos.redhat.com" -p "password" -r 0 -i -S -k -f -b /dev/vdb -z Europe/Madrid --server start```

Actual results:
This is the error that I got on the Journald:

Could not load database configuration. No such file - ["config/database.yml"]

Expected results:
Configuration applied and working

Additional info:

I look on the documentation and see that this command works fine and do the same that I want.

appliance_console_cli -H "cloudforms.tclab.cloud.lab.eng.bos.redhat.com" --internal --dbdisk /dev/vdb --region 99 --password soleng -z Europe/Madrid

It seems like the parameters order are the guilty here

Comment 2 Joe Rafaniello 2018-04-20 15:54:01 UTC
There is a problem with the arguments passed to appliance_console_cli:

appliance_console_cli -H "cf-test.tclab.cloud.lab.eng.bos.redhat.com" -p "password" -r 0 -i -S -k -f -b /dev/vdb -z Europe/Madrid --server start

 -S, --standalone              Run this server as a standalone database server
  --server=<s>                  {start|stop|restart} actions on evmserverd Server

The -S option tells cfme that this appliance is strictly a postgresql database server and will not be running the rails application with various worker processes.

This conflicts with the "--server start" option which is only relevant if you're running evmserverd, which you won't if you specify -S/--standalone.

> Could not load database configuration. No such file - ["config/database.yml"]

This is why the database.yml is not found, --standalone means you don't have the rails application, so we don't generate the database.yml file.

If you want to configure the database.yml, you must remove the -S/--standalone option.

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