Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Introduce engine-setup role #1

Merged
merged 3 commits into from
Jan 11, 2018
Merged

Conversation

KKoukiou
Copy link
Contributor

@KKoukiou KKoukiou commented Dec 8, 2017

No description provided.

@KKoukiou
Copy link
Contributor Author

KKoukiou commented Dec 8, 2017

Since oVirt.repositories role is dependency the docker tests will not run till this role is available from galaxy.
I verified however with local role path and 4.1 and 4.2 tests are working fine.
Pending to verify 3.6 and 4.0 but I need to use downstream RHEL images for these.
@mwperina @machacekondra WDYT?

@KKoukiou
Copy link
Contributor Author

@didib thanks for review, I ll adjust comments and repost here.

@ovirt-infra
Copy link

Hello contributor, thanks for submitting a PR for an this project!

I am the bot who triggers "standard-CI" builds for this project.
As a security measure I will not run automated tests on PRs that are not from white-listed contributors.

In order to allow automated tests to run, please ask one of the project maintainers to review the code and then do one of the following:

  1. Type ci test please on this PR to trigger automated tests for it.
  2. Type ci add to whitelist on this PR to trigger automated tests for it and also add you to the contributor white-list so that your future PRs will be tested automatically.
  3. If you are planning to contribute to more than one project, maybe it's better to ask them to add you to the project organization, so you'll be able to run tests for all the organisation's projects.

Note: You might see multiple messages like this showing up on a single PR, this is due to a known bug in the GitHub trigger plugin on Jenkins, the infra team is working on fixing this via new testing flow in the near future, so we'll be able to post a single message per PR.

@machacekondra
Copy link
Contributor

ci add to whitelist

@machacekondra
Copy link
Contributor

ci build please

README.md Outdated
|---------------------------------|-----------------------|-----------------------------------------------------------|
| ovirt_engine_setup_version | UNDEF | Allowed versions: [3.6, 4.0, 4.1, 4.2] |
| ovirt_engine_setup_product_type | ovirt-engine | Type of product 'ovirt-engine' or 'rhvm' |
| ovirt_engine_setup_package_list | [ovirt-engine-dwh-setup,ovirt-engine-extension-aaa-ldap] | List of extra packages to be installed on engine apart from ovirt-engine package. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need ovirt-engine-dwh-setup and ovirt-engine-extension-aaa-ldap to be installed by default? I'd say that default should be provided by existing ovirt-*-setup-* RPM dependencies, so this list should be empty

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't read the code nor specs/etc., so not sure if this code should handle updates. If it does, then our docs usually say to:

yum update ovirt*setup*

Which does include ovirt-engine-dwh-setup.

ovirt-engine-setup already requires -dwh-setup, but not a very specific version. So should be updated manually. If user does not, engine-setup will fail, saying 'An update for the Setup packages {packages} was found'.

For clean installs it's enough to install ovirt-engine. That's true also for downstream, BTW, see https://bugzilla.redhat.com/show_bug.cgi?id=1251129

README.md Outdated

| Name | Default value | Description |
|---------------------------------|-----------------------|-----------------------------------------------------------|
| ovirt_engine_setup_version | UNDEF | Allowed versions: [3.6, 4.0, 4.1, 4.2] |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we support all of those version, we should probably document which option below is valid for which version. But it can be done later in subsequent patch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

README.md Outdated
| ovirt_engine_setup_package_list | [ovirt-engine-dwh-setup,ovirt-engine-extension-aaa-ldap] | List of extra packages to be installed on engine apart from ovirt-engine package. |
| ovirt_engine_setup_answer_file_path | UNDEF | Path to custom answerfile for `engine-setup`. |
| ovirt_engine_setup_db_host | localhost | IP address or host name of a PostgreSQL server for Engine database. By default the database will be configured on the same host as Engine. |
| ovirt_engine_setup_db_port | 5432 | Engine database port. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add a special section Engine database similar to below ISO section?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

README.md Outdated
| ovirt_engine_setup_db_name | engine | Engine database name. |
| ovirt_engine_setup_db_user | engine | Engine database user. |
| ovirt_engine_setup_db_password | UNDEF | Engine database password. |
| ovirt_engine_setup_dwh_db_host | localhost | IP address or host name of a PostgreSQL server for DWH database. By default the DWH database will be configured on the same host as Engine. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add a special section Data Warehouse database similar to below ISO section?

By default engine-setup uses answer file specific for version of oVirt,
based on ``ovirt_engine_setup_version`` parameter. You can specify own answer file
as ``ovirt_engine_setup_answer_file_path``.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add a special section Common options similar to below ISO section?

README.md Outdated
| ovirt_engine_setup_iso_domain_name | IDO_DOMAIN | Name of ISO domain. |
| ovirt_engine_setup_iso_domain_acl | 0.0.0.0/0.0.0.0(rw) | ACL permissions for ISO domain mount point. |

* Configure firewall
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that firewall with only one option deserves its own section, I'd move to common section

README.md Outdated

| Name | Default value | Description |
|-----------------------|-----------------------|-----------------------------------------------------------|
| ovirt_engine_setup_update_packages | False | If `True`, setup packages will be updated before `engine-setup` will be executed. Makes sence if Engine is already installed. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, I'd move to common section

@@ -0,0 +1,33 @@
---
ovirt_engine_setup_dwh: True
ovirt_engine_setup_version: '4.1'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use 4.2 as default version

ovirt_engine_setup_configure_iso_domain: false
ovirt_engine_setup_iso_domain_path: '/var/lib/exports/iso'
ovirt_engine_setup_iso_domain_name: 'ISO_DOMAIN'
ovirt_engine_setup_iso_domain_acl: '0.0.0.0/0.0.0.0(rw)'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ISO is no longer valid for 4.2, please remove those options from default

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

README.md Outdated

| Name | Default value | Description |
|-----------------------|-----------------------|-----------------------------------------------------------|
| ovirt_engine_setup_update_packages | False | If `True`, setup packages will be updated before `engine-setup` will be executed. Makes sence if Engine is already installed. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned before I'd change default to true, as the most common use cases to execute this role are to perform new installation (updating setup packages should not break anything) or upgrade (updating setup packages is a must for upgrade)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes thanks, done.

@mwperina
Copy link
Member

@sandrobonazzola @didib

@KKoukiou
Copy link
Contributor Author

Missed some comments, will repost again.

@KKoukiou KKoukiou force-pushed the initial-commit branch 2 times, most recently from a5779ae to b558bc9 Compare December 11, 2017 16:17
@KKoukiou
Copy link
Contributor Author

KKoukiou commented Dec 11, 2017

I have some issue with the upgrade plays, and docker got it. I 'll take a look tomorrow and repost.

@KKoukiou KKoukiou force-pushed the initial-commit branch 4 times, most recently from 060ffaf to fcfbed6 Compare December 14, 2017 19:12
@KKoukiou
Copy link
Contributor Author

@mwperina @machacekondra Can you please CR ?
I did some changes.

  • update all packages by default before running setup, it's specified in the DOCS
  • Added option to accept defaults. Needed for the upgrade because of open BZ
  • I created an docker image for the purpose of these tests because I couldn't find any that satisfies the requirements. You can see it here, https://hub.docker.com/r/katerinak/c7-systemd-utf8/
    If you have some team account in Docker Hub I 'll be happy to push it there.

Copy link
Contributor

@machacekondra machacekondra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general looks good to me, some minor comments.

mkdir -p $PKG_DOC_DIR

cp -pR defaults/ $PKG_DATA_DIR
cp -pR tasks/ $PKG_DATA_DIR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add here also:

cp -pR templates/ $PKG_DATA_DIR

meta/main.yml Outdated

license: Apache License 2.0

min_ansible_version: 2.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, include_tasks for example.

Requires: ansible >= 2.3

%description
This Ansible role to install required packages for oVirt Engine deployment,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/This Ansible role to/This Ansible role


galaxy_tags: [ovirt, rhv, rhev, virtualization]

dependencies: []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In readme you say dependecies oVirt.repostiories so I am just wondering whether we should depends on it really... I think we shouldn't but I am open to suggestion why we should.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really dependent, just this role expect oVirt repositories enabled on the target machine. I 'd rather remove the dependency from README.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way how to verify if oVirt.repositories are properly installed as a dependency if you install oVirt.engine-setup from Galaxy?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's installed as a depency in case you specify it in meta/main.yml as dependency, but that's something we don't want. no ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't want it, target machine's repos can be preconfigured.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, let's see what Martin thinks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

BuildArch: noarch
Url: http://www.ovirt.org

Requires: ansible >= 2.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.4

when: ovirt_engine_setup_answer_file_path is defined

- name: Update setup packages
shell: 'yum -y update ovirt*setup*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to not use yum module?

Copy link
Contributor Author

@KKoukiou KKoukiou Dec 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yum module doesn't never run yum update, even if you specify latest. I always runs yum install + params.
When I used the ansible yum module, I was hitting dependency issues, when updating setup packages, and it was complaining about missing dependecies that I could see they are in repository.
I can rerun with this change and check again, however. Maybe there was other issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

- skip_ansible_lint

- name: Update all packages
shell: 'yum -y update'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use yum module?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same ^.
I 'll change and rerun tests I said. Maybe there was non related issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

shell: 'yum -y update'
when: ovirt_engine_setup_update_all_packages
tags:
- skip_ansible_lint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What this tag means?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/willthames/ansible-lint#false-positives

It's from ansible-lint checking.

Because I think linters will compain I am not using yum module :) Will confirm, I it will be needed to keep this instead of yum module.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, if possible we shouldn't use it, and use correct format. And if we need to use it we should document why.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already removed and I am using yum module. I think you see outdated page.

@KKoukiou
Copy link
Contributor Author

@mwperina @machacekondra Anything else I can do for this one?

* OVN related options:

| Name | Default value | Description |
|---------------------------------|-----------------------|-----------------------------------------------------------|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about option to enable/disable OVN configuration during engine-setup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

README.md Outdated
| ovirt_engine_setup_provider_ovn_username | admin@internal | Username for OVN. |
| ovirt_engine_setup_provider_ovn_password | UNDEF | Password for OVN. |

* ISO domain related options: (This following options are deprecated for versions > 3.6)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that ISO domain config was removed from engine-setup in 4.2. Am I right Didi? If so, please change the text inside brackets to: "Following options are valid only for version < 4.2

@didib

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks it's in the docs for 4.1. Fixed.

README.md Outdated
# Contains encrypted `ovirt_engine_setup_admin_password` variable using ansible-vault
- passwords.yml
vars:
ovirt_engine_setup_version: '4.1'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to 4.2

README.md Outdated
ovirt_engine_setup_version: '4.1'
ovirt_engine_setup_organization: 'of.ovirt.engine.com'
ovirt_engine_setup_admin_password: "{{ ovirt_engine_setup_admin_password }}"
ovirt_repositories_ovirt_release_rpm: 'http://resources.ovirt.org/pub/yum-repo/ovirt-release41.rpm'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to 4.2 (right now it does not exist, but it should exist before this roles is officially released)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- passwords.yml
vars:
ovirt_engine_setup_type: "ovirt-engine"
ovirt_engine_setup_version: "4.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to 4.2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

ovirt_engine_setup_dwh_db_host: "localhost"
ovirt_engine_setup_configure_iso_domain: true
ovirt_engine_setup_firewall_manager: null
ovirt_repositories_ovirt_release_rpm: "http://plain.resources.ovirt.org/pub/yum-repo/ovirt-release41.rpm"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to 4.2 (right now it does not exist, but it should exist before this roles is officially released)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


galaxy_tags: [ovirt, rhv, rhev, virtualization]

dependencies: []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way how to verify if oVirt.repositories are properly installed as a dependency if you install oVirt.engine-setup from Galaxy?

@@ -0,0 +1,9 @@
{% include "./templates/basic_answerfile.txt.j2" %},
[environment:default]
OVESETUP_OVN/ovirtProviderOvn=bool:True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be provided as role parameter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwperina oVrt.repositories is not really a dependency, since if the target machines has the repositories by some other way (user brought them manually) role will work fine.

@@ -0,0 +1,11 @@
{% include "./templates/basic_answerfile.txt.j2" %},
OVESETUP_OVN/ovirtProviderOvn=bool:True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be provided as role parameter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

BuildArch: noarch
Url: http://www.ovirt.org

Requires: ansible >= 2.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add dependency to oVirt.respositories role:

Requires: ovirt-ansible-repositories

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want this package is required ? isn't it better if it's optional ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, let's leave it optional

Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except minor typo and resolving both RPM and Galaxy dependencies it looks good to me

README.md Outdated
| ovirt_engine_setup_provider_ovn_username | admin@internal | Username for OVN. |
| ovirt_engine_setup_provider_ovn_password | UNDEF | Password for OVN. |

* ISO domain related options: (This following options are valied for versions < 4.2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valied -> valid

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And maybe without "This":
Following options are valid for versions < 4.2

@KKoukiou KKoukiou force-pushed the initial-commit branch 2 times, most recently from fdaef32 to 0e174aa Compare December 19, 2017 09:03
@KKoukiou
Copy link
Contributor Author

KKoukiou commented Jan 4, 2018

@didib This role is used to deploy also engine for 3.6 and there ISO prameters are not deprecated IIUC.

@mykaul
Copy link

mykaul commented Jan 4, 2018

I don't see a reason to support deploying 3.6.

@didib
Copy link
Member

didib commented Jan 4, 2018

Re ISO domain - as you wish, but that bug affects also 3.6. I'd personally set it to False and not mention it in README.

@didib
Copy link
Member

didib commented Jan 4, 2018

Not that important, but also in RHV 'yum install ovirt-engine' should work just as well, at least since 4.0 - no need to make ovirt_engine_setup_product_type a parameter. See also: https://bugzilla.redhat.com/show_bug.cgi?id=1251129 .

- block:
- name: Set answer file path
set_fact:
answer_file_path: "/tmp/answerfile-{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}.txt"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is insecure. Please use mktemp or ansible tempfile module. If you require root, you can also use /root/something .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this insecure?

- name: Run engine-setup with answerfile
command: "engine-setup --config-append={{ answer_file_path }} {{ accept_defaults }}"
tags:
- skip_ansible_lint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this? BTW, you can also set acceptdefaults in the answer file, no need to pass it on the command line. See also: https://bugzilla.redhat.com/1270719#8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one. Didn't know, I'll change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to change to use this answerfile variable but it didn't work.. It failed on the question to auomatically upgrade the postgresql with EOF, which means the default answer was not passed. Moved back to command line option.


- name: Check if Engine health page is up
uri:
url: "http://{{ ansible_fqdn }}/ovirt-engine/services/health"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The health service is considered deprecated and might be removed in the future, see also: https://bugzilla.redhat.com/show_bug.cgi?id=1027210

If you decide to keep the code as-is, please open an issue to replace this and comment on that bug - so that we know that ovirt-ansible-engine-setup uses it too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll try to replace and make it point to the api

@@ -0,0 +1,4 @@
{% include "./templates/basic_answerfile.txt.j2" %},
OVESETUP_DB/upgradeWithHeEl6Hosts=none:None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You do not really need these. Generally speaking, almost all vars default to None, so setting them to None in the answerfile almost always does nothing. But no harm in keeping them anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this file.

README.md Outdated
| ovirt_engine_setup_update_setup_packages | False | If `True`, setup packages will be updated before `engine-setup` will be executed. Makes sense if Engine is already installed. |
| ovirt_engine_setup_update_all_packages | True | If `True`, all packages will be updated before `engine-setup` will be executed. |
| ovirt_engine_setup_accept_defaults | False | If `True` use option `--accept-defaults` when executing `engine-setup`. |
| ovirt_engine_setup_require_rollback | UNDEF | If `True` setup will require to be able to rollback new packages in case of a failure. If not passed the default answer from `engine-setup` will be chosen. Valid for updating/upgrading.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand this. Isn't the default answer chosen only if using "accept_defaults"? If not, engine-setup should prompt. Do we then let the user answer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I have in the ansewr fille, OSETUP_RPMDISTRO/requireRollback=none:None in case user doesn't give answer, so default value will be chosen, without the use of accept-defaults.
What we have decided is that all answers should exists in the answer file.
Accept defaults makes sense for example when custom answer file will be used.

OVESETUP_CONFIG/engineDbBackupDir=str:/var/lib/ovirt-engine/backups
OVESETUP_CONFIG/engineHeapMin=str:1024M
OVESETUP_CONFIG/imageioProxyConfig=bool:True
OVESETUP_PROVISIONING/postgresProvisioningEnabled=bool:True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no way to set this to False, we do not support remote databases. Is it so? If so, not sure we need to have so much code to allow configuring database and db user names etc., the defaults are good enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. So, in the past we used to have this option not confiugrable as well, but we used to be able to connect to preconfigured remote db.
So, what probably happens, is that first checks if OVESETUP_DB/host is set to localhost, and if it's not localhost, it will try to connect to remote database and all other options will be used.

OVESETUP_DWH_DB/securedHostValidation=none:None
{% endif %}
OVESETUP_ENGINE_CORE/enable=bool:True
OVESETUP_CORE/engineStop=none:None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better drop this line, or set it to True. If you keep it, you rely on the fact that otopi lets the last occurrence of a key to override previous ones, and this isn't documented officially (so in theory might change in the future, or even make it alert/abort/whatever). This is because in upgrades you pass True. No harm in setting it here to True and remove from upgrades - clean setups will be ok.

Copy link
Contributor Author

@KKoukiou KKoukiou Jan 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I 'll try. But can you please point me to the documentation pages for the answerfile options?
I can't seem to find it anywhere.

OVESETUP_SYSTEM/memCheckEnabled=bool:False
OVESETUP_SYSTEM/nfsConfigEnabled=bool:False
OVESETUP_PKI/organization=str:{{ ovirt_engine_setup_organization }}
OVESETUP_PKI/renew=none:None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None means that if a user needs to renew pki on upgrade, we prompt. Please either set to True or to False or at least open a bug/issue to consider how to handle this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, False means we'll not renew, and this will eventually be required, so user will have to run manually engine-setup and answer Yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this option is valid only for upgrade? I should probably move it to only the upgrade files.

OVESETUP_CONFIG/isoDomainMountPoint=none:None
OVESETUP_SYSTEM/nfsConfigEnabled=bool:False
{% endif %}
OVESETUP_CONFIG/engineHeapMax=str:1024M
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove engineHeapMin and engineHeapMax , so that engine-setup does its guesswork. See also: https://bugzilla.redhat.com/1185411

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

OVESETUP_DWH_CONFIG/dwhDbBackupDir=str:/var/lib/ovirt-engine-dwh/backups
OVESETUP_DWH_DB/restoreBackupLate=bool:True
OVESETUP_DWH_DB/disconnectExistingDwh=none:None
OVESETUP_DWH_DB/performBackup=none:None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better drop, same as OVESETUP_CORE/engineStop

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what is the default option here to set it explicitly. You mean I should set it to False?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And is this option also related only to upgrade? I should probably move these options to some upgrade specific file.

roles:
- role: oVirt.repositories
- role: oVirt.engine-setup
# --accept-defaults needed because of: https://bugzilla.redhat.com/show_bug.cgi?id=1518697
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be interested in using https://bugzilla.redhat.com/show_bug.cgi?id=1396925 instead? I set needinfo on Lukas but got no reply... Current project may be the best way to move this forward.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I 'll add it as well, sure.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with having otopi answer files only. However we need to wait for the patches to be merged and available. i would say it is out of scope of this patch, and I would rather handle this after this and mentioned BZ patch is released.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged the patch earlier this morning, should be available later on today - in master-snapshot repo.

@didib
Copy link
Member

didib commented Jan 4, 2018

Finished my review for now. Didn't mark any comments as requested items, sorry - some are quite important, most are less so.

@KKoukiou
Copy link
Contributor Author

KKoukiou commented Jan 5, 2018

@didib thanks a lot for the review! I adjusted all comments, can you only point me to any doc pages related to answer file options? It would be really helpful, and I can add it here for future adjustments.

@KKoukiou KKoukiou force-pushed the initial-commit branch 4 times, most recently from b0acf64 to 27888d2 Compare January 5, 2018 11:41
Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

{% if ovirt_engine_setup_provider_ovn_password is defined %}
OVESETUP_OVN/ovirtProviderOvnPassword=str:{{ ovirt_engine_setup_provider_ovn_password }}
{% else %}
OVESETUP_OVN/ovirtProviderOvnPassword=none:None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we set the default to be the admin@internal pass instead of none?
passing none will result in a non-functional OVN provider

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nellyc for all passwords we have default None, see for example OVESETUP_DB/password=none:None.
I think we can simply set the passwd it with the relevant parameter if you agree.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consult and send a separate PR if needed, I am merging
.

@mwperina
Copy link
Member

Tomorrow we have a 4.2.1 compose. Are we OK to merge it and release? Or are there any updates planning, so we will need to postpone the release to next week?

@KKoukiou
Copy link
Contributor Author

@mwperina From my side it's all done, only last @nellyc comment is not included, so if she agrees I am ok.

@machacekondra machacekondra merged commit 3f4d42d into oVirt:master Jan 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants