Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1538905 Details for
Bug 1680970
Static IPv6 Address is lost on host deploy if NM manages the interface
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
ovirt-engine-setup-20190226170604-v83a48.log
ovirt-engine-setup-20190226170604-v83a48.log (text/plain), 2.94 MB, created by
arend.lapere
on 2019-02-26 16:30:59 UTC
(
hide
)
Description:
ovirt-engine-setup-20190226170604-v83a48.log
Filename:
MIME Type:
Creator:
arend.lapere
Created:
2019-02-26 16:30:59 UTC
Size:
2.94 MB
patch
obsolete
>2019-02-26 17:06:04,137+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/log=bool:'True' >2019-02-26 17:06:04,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileHandle=file:'<open file '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', mode 'a' at 0x7f50757dc300>' >2019-02-26 17:06:04,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileName=str:'/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log' >2019-02-26 17:06:04,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilter=_MyLoggerFilter:'filter' >2019-02-26 17:06:04,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilterRe=list:'[<_sre.SRE_Pattern object at 0x1888b40>]' >2019-02-26 17:06:04,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logRemoveAtExit=bool:'False' >2019-02-26 17:06:04,137+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,137+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.core.misc.Plugin._init >2019-02-26 17:06:04,137+0100 DEBUG otopi.context context.dumpSequence:662 SEQUENCE DUMP - BEGIN >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:664 STAGE boot >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._boot (None) >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._preinit (None) >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.core.misc.Plugin._boot (None) >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection.Plugin._boot (None) >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._boot (None) >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.websocket_proxy.core.Plugin._boot (None) >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.core.misc.Plugin._preinit (None) >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.filter_secrets.Plugin._boot (osetup.secrets.filtered.from.setup.attrs.modules) >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.log.Plugin._init (otopi.core.log.init) >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.misc.Plugin._init (None) >2019-02-26 17:06:04,138+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.misc.Plugin._init (otopi.dialog.misc.boot) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.info.Plugin._init (None) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.human.Plugin._init (None) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.machine.Plugin._init (None) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.misc.Plugin._boot_misc_done (otopi.dialog.boot.done) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._boot (None) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._boot (otopi.packagers.yum.boot) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:664 STAGE init >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.config.Plugin._init (otopi.core.config.init) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._init (None) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._init (None) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.command.Plugin._init (None) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._init (None) >2019-02-26 17:06:04,139+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.core.Plugin._init (otopi.packagers.detection) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.transaction.Plugin._init (otopi.core.transactions.init) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.answer_file.Plugin._init (None) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.cli.Plugin._init (None) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.machine.Plugin._init_machine_events_stuff (None) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._init (None) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.iptables.Plugin._init (None) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.ssh.Plugin._init (None) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.clock.Plugin._init (None) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.reboot.Plugin._init (None) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.answerfile.Plugin._init (None) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.duplicated_constants_check.Plugin._init (None) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.offlinepackager.Plugin._init (None) >2019-02-26 17:06:04,140+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.postinstall.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.reconfigure.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_firewalld.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.hostname.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.connection.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.pgpass.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.engine.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.fence_kdump_listener.Plugin._init (None) >2019-02-26 17:06:04,141+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.config.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.connection.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.system.he.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.config.java.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.core.protocols.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.provisioning.postgres.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.apache.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.environment.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.config.dwh_uuid.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.misc.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.service.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.config.Plugin._init (None) >2019-02-26 17:06:04,142+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.pgpass.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_imageio_proxy.core.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.vmconsole_proxy_helper.core.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.websocket_proxy.core.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.core.misc.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.dialog.preview.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.system.environment.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.core.misc.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.engine.Plugin._init (None) >2019-02-26 17:06:04,143+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.domain_type.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.iso_domain.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.java.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.notifier.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.public_glance_repository.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.storage.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.misc.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.vacuum.Plugin._init (None) >2019-02-26 17:06:04,144+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.distro-rpm.packages.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.core.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.misc.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._init (None) >2019-02-26 17:06:04,145+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.jboss.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh_database.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.vacuum.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.distro-rpm.packages.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._init (None) >2019-02-26 17:06:04,146+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._init (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._init (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._init (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.packages.Plugin._init (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._init (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:664 STAGE setup >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._setup_existence (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._setup_existence (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.config.Plugin._post_init (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.log.Plugin._setup (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.misc.Plugin._setup (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._setup (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._setup (None) >2019-02-26 17:06:04,147+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_root_ssh.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.hostname.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.openrc.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.rhel.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.systemd.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.clock.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.reboot.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._setup_common_titles (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_firewalld.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_human.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_iptables.Plugin._setup (None) >2019-02-26 17:06:04,148+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.hostname.Plugin._setup (None) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine.Plugin._setup (None) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_manual_files.Plugin._setup (None) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._setup (None) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.mem.Plugin._setup (None) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._setup (None) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.connection.Plugin._setup (osetup.cinderlib.db.connection.setup) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.connection.Plugin._setup (osetup.db.connection.setup) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.core.protocols.Plugin._setup (None) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.apache.Plugin._setup (None) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.config.dwh_uuid.Plugin._setup (None) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.misc.Plugin._setup (None) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection.Plugin._commands (None) >2019-02-26 17:06:04,149+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection.Plugin._setup (osetup.dwh.db.connection.setup) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._setup_dbtransaction (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_imageio_proxy.core.Plugin._setup (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.vmconsole_proxy_helper.core.Plugin._setup (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._setup (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._setup (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.jboss.Plugin._setup (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.misc.Plugin._setup (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._setup (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._setup (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._setup (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._setup (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._setup (None) >2019-02-26 17:06:04,150+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._setup (None) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._setup (None) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._setup (None) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin._setup (None) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._setup (None) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.connection.Plugin._setup (None) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.legacy.config.Plugin._setup (None) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._setup_engine_db_credentials (None) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._keep_only_valid_firewall_managers (osetup.keep.only.valid.firewall.managers) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._setup (None) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._setup (None) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._setup (None) >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:664 STAGE internal_packages >2019-02-26 17:06:04,151+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.transaction.Plugin._pre_prepare (None) >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._internal_packages_end (None) >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._internal_packages_end (None) >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.transaction.Plugin._pre_end (None) >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:664 STAGE programs >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.command.Plugin._programs (otopi.system.command.detection) >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh.Plugin._setup (None) >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._programs (None) >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.pki.Plugin._setup (None) >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.openrc.Plugin._programs (None) >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.rhel.Plugin._programs (None) >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.systemd.Plugin._programs (None) >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:664 STAGE late_setup >2019-02-26 17:06:04,152+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._late_setup (None) >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._late_setup_service_state (None) >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._late_setup_service_state (None) >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:664 STAGE customization >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._customization (None) >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.config.Plugin._customize1 (None) >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.cli.Plugin._customize (otopi.dialog.cli.customization) >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.reconfigure.Plugin._customization (None) >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._version_lock_customization (None) >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._customization_enable (osetup.engine.system.nfs.allow) >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.jboss.Plugin._version_lock_customization (None) >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_s_product_options (osetup.dialog.titles.productoptions.start) >2019-02-26 17:06:04,153+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._customization (osetup.system.nfs.available) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.core.misc.Plugin.__customization_cinderlib_db_enable (None) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.iso_domain.Plugin._customization (None) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.misc.Plugin._customization (osetup.engine.core.enable) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._customization (None) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._customization (setup.config.imageio-proxy.customization) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._customization (setup.config.websocket-proxy.customization) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._customization (None) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.java.Plugin._customization (None) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.distro-rpm.packages.Plugin._customization (None) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.misc.Plugin._customization (osetup.dwh.core.enable) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._customization (None) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.packages.Plugin._customization (None) >2019-02-26 17:06:04,154+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_e_product_options (osetup.dialog.titles.productoptions.end) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.distro-rpm.packages.Plugin._customization (None) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_packages (osetup.dialog.titles.packaging.start) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin._customization (osetup.distro-rpm.package.update.check) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_packages (osetup.dialog.titles.packages.end) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_network (osetup.dialog.titles.network.start) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.hostname.Plugin._customization (osetup.config.protocols.customization) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._customization_is_requested (None) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._customization (osetup.net.firewallmanager.available) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.protocols.Plugin._customization (None) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.firewall.Plugin._configuration (None) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._firewall (None) >2019-02-26 17:06:04,155+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.firewall.Plugin._configuration (None) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._network_owners_config_customized (osetup.network.owners.config.customized) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._remote_engine_customization (None) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._customization_network (None) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._customizationNetwork (None) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._customization_network (None) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_network (osetup.dialog.titles.network.end) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_database (osetup.dialog.titles.database.start) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._customization_enable (osetup.cinderlib.db.connection.allow) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._customization_enable (osetup.cinderlib.provisioning.pgsql.allow) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._customization_enable (osetup.engine.db.connection.allow) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._customization_enable (osetup.engine.provisioning.pgsql.allow) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._customization (None) >2019-02-26 17:06:04,156+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._customization (None) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._customization (None) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.connection.Plugin._customization (osetup.dwh.db.connection.customization) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._customization (osetup.cinderlib.db.connection.customization) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._customization (osetup.db.connection.customization) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._customization (None) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade.Plugin._customization (osetup.db.cust.upgrade.dbms.engine) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.auth_url_validation.Plugin._customization (None) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._db_owners_connections_customized (osetup.db.owners.connections.customized) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.dbmsupgrade.Plugin._customization (osetup.db.cust.upgrade.dbms.dwh) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection.Plugin._engine_customization (None) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._customization (None) >2019-02-26 17:06:04,157+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.vacuum.Plugin._customization (None) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_database (osetup.dialog.titles.database.end) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_engine (osetup.dialog.titles.engine.start) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._customization (osetup.admin.password.set) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._customization_enable (osetup.engine.config.appmode.allow) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.vacuum.Plugin._customization (None) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._customization (osetup.config.applicationMode.available) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._customization_credentials (None) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.domain_type.Plugin._customization (None) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_engine (osetup.dialog.titles.engine.end) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_storage (osetup.dialog.titles.storage.start) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.storage.Plugin._configureSANWipeAfterDelete (None) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_storage (osetup.dialog.titles.storage.end) >2019-02-26 17:06:04,158+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_pki (osetup.dialog.titles.pki.start) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._customization (None) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._customization_upgrade (None) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._customization (None) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._customization (None) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_pki (osetup.dialog.titles.pki.end) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_apache (osetup.dialog.titles.apache.start) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._customization (None) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._customization (None) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._customization_already_configured (None) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_apache (osetup.dialog.titles.apache.end) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_system (osetup.dialog.titles.system.start) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._customization_disable (osetup.engine.kdump.allow) >2019-02-26 17:06:04,159+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._customization_firewall (None) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._customization_firewall (None) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._customization_firewall (None) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_system (osetup.dialog.titles.system.end) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_misc (osetup.dialog.titles.misc.start) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.scale.Plugin._customization (None) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_misc (osetup.dialog.titles.misc.end) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.config.Plugin._customize2 (None) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._customization_firewall (None) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._customization_firewall (None) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._customization_firewall (None) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:664 STAGE validation >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.misc.Plugin._validation (None) >2019-02-26 17:06:04,160+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._validation_enable (None) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._validateEnv (None) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._validate_enable (None) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.log.Plugin._validation (None) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.hostname.Plugin._validation (None) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.ssh.Plugin._validation (None) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._validation_changed_files (None) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._validation (None) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.pgpass.Plugin._validation (osetup.cinderlib.db.connection.credentials.early) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.engine.Plugin._validation (None) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.config.Plugin._validation (None) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass.Plugin._validation (osetup.db.connection.credentials.early) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.system.he.Plugin._validate (None) >2019-02-26 17:06:04,161+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.config.java.Plugin._validation (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.config.Plugin._validation (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._validation (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._validation (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.notifier.Plugin._validation (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin.checkUuidOsspExtensionForRemoteDbOrDevEnv (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._validation (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._validation (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._validation (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._validate_ssl (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._validation (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.check_etl.Plugin._validation (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._validation (None) >2019-02-26 17:06:04,162+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._validation (None) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._validation (None) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._validation (otopi.network.firewalld.validation) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.iptables.Plugin._validate (otopi.network.iptables.validation) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_checks.ovirt_engine.db.versions.Plugin._validation (None) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema.Plugin._validation (None) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._validate_provider_uniqueness (None) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._validateMemory (osetup.memory.check) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._validateZombies (None) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._review_config (None) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._validateContinueLowMemory (None) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.dialog.preview.Plugin._customization (None) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._validation_late (None) >2019-02-26 17:06:04,163+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaakerbldap.Plugin._validation_late (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._validateAsyncTasks (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations.Plugin._validation (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaainternal.Plugin._validation (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:664 STAGE transaction-prepare >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.transaction.Plugin._main_prepare (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.engine.Plugin._transactionBegin (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.fence_kdump_listener.Plugin._transactionBegin (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.service.Plugin._transactionBegin (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_imageio_proxy.core.Plugin._transactionBegin (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.vmconsole_proxy_helper.core.Plugin._transactionBegin (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.websocket_proxy.core.Plugin._transactionBegin (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.external_truststore.Plugin.remove_external_truststore (None) >2019-02-26 17:06:04,164+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._transaction_begin (osetup.system.hostile.detection) >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._transactionBegin (None) >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:664 STAGE early_misc >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._early_misc (None) >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade.Plugin._updateDBMS (osetup.db.upgrade.dbms.engine) >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations.Plugin._misc (None) >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.dbmsupgrade.Plugin._updateDBMS (osetup.db.upgrade.dbms.dwh) >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._updatePGConf (None) >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:664 STAGE packages >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.iptables.Plugin._packages (None) >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin.packages (None) >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._packages (None) >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._packages (None) >2019-02-26 17:06:04,165+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._packages (None) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:664 STAGE misc >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.jboss.Plugin._jboss (None) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.command.Plugin._misc (otopi.system.command.redetection) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._misc (osetup.system.sysctl.available) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._misc (None) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.iptables.Plugin._store_iptables (None) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.ssh.Plugin._append_key (None) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.clock.Plugin._set_clock (None) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._prepare_examples (None) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._misc (None) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.engine.Plugin._misc (None) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._misc (None) >2019-02-26 17:06:04,166+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaainternal.Plugin._misc (None) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.java.Plugin._misc (None) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.jboss.Plugin._misc (None) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.protocols.Plugin._misc (None) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.tools.Plugin._misc (None) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.advertise_dwh.Plugin._get_dwh_host (None) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.vacuum.Plugin._vacuum (None) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_pki (None) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._restart_ovn_services (osetup.ovn.services.restart) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._miscUpgrade (None) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._misc (None) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._misc (None) >2019-02-26 17:06:04,167+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.answerfile_fixup.Plugin._misc (None) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.selinux.Plugin._misc (None) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._misc (None) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.versionlock_config.Plugin._misc (None) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh.Plugin._misc_stop_remote_dwh (None) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.scale.Plugin._misc (None) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._misc (None) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._misc_config (None) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._miscConfigVMConsoleHelper (None) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._miscConfigVMConsoleProxy (None) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._misc_config (None) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.pgpass.Plugin._misc (osetup.cinderlib.db.connection.credentials.late) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass.Plugin._misc (osetup.db.connection.credentials.late) >2019-02-26 17:06:04,168+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.pgpass.Plugin._misc (osetup.dwh.db.connection.credentials) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._misc (osetup.pki.ca.available) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._misc_cinderlib_schema (osetup.cinderlib.db.schema) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin.installUuidOsspExtensionForLocalDb (None) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_configure_ovn_pki (None) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_configure_provider (None) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh.Plugin._misc (osetup.pki.ssh.available) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._misc (osetup.dwh.db.schema) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._check_separate (None) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._misc_VDC (setup.config.imageio-proxy.remote_vdc) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._misc_pki (None) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.pki.Plugin._miscPKIEngine (None) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.pki.Plugin._miscPKIProxy (None) >2019-02-26 17:06:04,169+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._check_separate (None) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._misc_VDC (setup.config.websocket-proxy.remote_vdc) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._misc_pki (None) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.config.database.Plugin._misc (None) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.config.misc.Plugin._misc (None) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._connection (osetup.cinderlib.db.connection.available) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema.Plugin._misc (osetup.db.schema) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._restart_provider_service (osetup.ovn.provider.service.restart) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.config.Plugin._misc (None) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh_database.Plugin._miscDWHConfig (None) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.connection.Plugin._connection (osetup.dwh.db.connection.available) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.vacuum.Plugin._vacuum (None) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.database.Plugin._misc (None) >2019-02-26 17:06:04,170+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._connection (osetup.db.connection.available) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._engine_connection (osetup.dwh.engine.db.connection.available) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._attach_group_to_role (None) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._misc (osetup.aaa_jdbc.config.setup.admin.user) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._misc (None) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.ca.Plugin._misc (osetup.config.encryption.available) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.domain_type.Plugin._misc (None) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.iso_domain.Plugin._add_iso_domain_to_db (osetup.config.iso_domain.available) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.options.Plugin._miscAlways (None) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.options.Plugin._miscNewDatabase (None) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.public_glance_repository.Plugin._misc (None) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.sso.Plugin._misc (None) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.storage.Plugin._updateSANWipeAfterDelete (None) >2019-02-26 17:06:04,171+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.macpools.Plugin._misc_db_entries (osetup.macpool.db) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_db_entries (osetup.ovn.provider.db) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin.miscOptions (None) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.auth_url_validation.Plugin._update_providers (None) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._databaseOptions (None) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._setupAdminPassword (None) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._misc (None) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._misc (None) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._misc (None) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._misc (osetup.config.aaa.adminuser.setup) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._misc (osetup.setup.selinux) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.misc.Plugin._misc (None) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.postinstall.Plugin._misc (None) >2019-02-26 17:06:04,172+0100 DEBUG otopi.context context.dumpSequence:664 STAGE cleanup >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.transaction.Plugin._main_end (None) >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:664 STAGE closeup >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._closeup (None) >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.iptables.Plugin._closeup (None) >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._closeup (None) >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._closeup (None) >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.engine.Plugin._closeup (osetup.core.engine.start) >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._closeup (None) >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.service.Plugin._closeup (None) >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.legacy.config.Plugin._closeup (None) >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._closeup (None) >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._closeup (None) >2019-02-26 17:06:04,173+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._closeup (None) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_s_summary (osetup.dialog.titles.summary.start) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.apache.Plugin._closeup (osetup.apache.core.restart) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._closeup (None) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._closeup (None) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._closeup (None) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.protocols.Plugin._closeup (None) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._print_manual_commands (None) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._print_restart_services_commands (None) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._closeup (None) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh.Plugin._closeup (None) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._closeup (None) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._closeup (None) >2019-02-26 17:06:04,174+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._closeup (None) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh.Plugin._closeup (None) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh_database.Plugin._closeupDWHConfig (None) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._closeupEngineAccess (None) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._closeup (None) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._devenv_closeup (None) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_e_summary (osetup.dialog.titles.summary.end) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.reboot.Plugin._closeup (None) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:664 STAGE cleanup >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.answer_file.Plugin._generate_answer_file (otopi.core.answer.file.generated) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._cleanup (None) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine.Plugin._cleanup (None) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._cleanupEngineAccess (None) >2019-02-26 17:06:04,175+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._cleanup (None) >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._cleanup (None) >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._cleanup (None) >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.answerfile.Plugin._cleanup (None) >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.duplicated_constants_check.Plugin._cleanup (None) >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._rollback (None) >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:664 STAGE pre-terminate >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.misc.Plugin._preTerminate (None) >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.cli.Plugin._pre_terminate (otopi.dialog.cli.termination) >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:664 STAGE terminate >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._terminate (None) >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.human.Plugin._terminate (None) >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.machine.Plugin._terminate (None) >2019-02-26 17:06:04,176+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.log.Plugin._terminate (None) >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpSequence:664 STAGE reboot >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.reboot.Plugin._reboot (None) >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpSequence:671 SEQUENCE DUMP - END >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/aborted=bool:'False' >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/debug=int:'0' >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/error=bool:'False' >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/exceptionInfo=list:'[]' >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/executionDirectory=str:'/root' >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/exitCode=list:'[{'priority': 90001, 'code': 0}]' >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/log=bool:'True' >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/pluginGroups=str:'otopi:ovirt-engine-common:ovirt-engine-setup:ovirt-engine-checks' >2019-02-26 17:06:04,177+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/pluginPath=str:'/usr/share/otopi/plugins:/usr/share/ovirt-engine/setup/bin/../plugins' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/suppressEnvironmentKeys=list:'[]' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/pg_dump=str:'/opt/rh/rh-postgresql10/root/usr/bin/pg_dump' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/pg_restore=str:'/opt/rh/rh-postgresql10/root/usr/bin/pg_restore' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/postgresql-setup=str:'/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/psql=str:'/opt/rh/rh-postgresql10/root/usr/bin/psql' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/configFileAppend=str:':/tmp/answerfile-20190226170545Z.txt' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/configFileName=str:'/etc/ovirt-engine-setup.conf' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/failOnPrioOverride=bool:'True' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logDir=str:'/var/log/ovirt-engine/setup' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileHandle=file:'<open file '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', mode 'a' at 0x7f50757dc300>' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileName=str:'/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileNamePrefix=str:'ovirt-engine-setup' >2019-02-26 17:06:04,178+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilter=_MyLoggerFilter:'filter' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilterKeys=list:'['OVESETUP_DWH_DB/password', 'OVESETUP_DB/password', 'OVESETUP_CONFIG/remoteEngineHostRootPassword', 'OVESETUP_DB/password', 'OVESETUP_PKI/storePassword', 'OVESETUP_CONFIG/adminPassword', 'OVESETUP_OVN/ovirtProviderOvnSecret', 'OVESETUP_OVN/ovirtProviderOvnPassword', 'OVESETUP_CL_DB/password']' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilterRe=list:'[<_sre.SRE_Pattern object at 0x1888b40>]' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logRemoveAtExit=bool:'False' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/randomizeEvents=bool:'False' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/autoAcceptDefault=bool:'True' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_NAME=str:'otopi' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_VERSION=str:'1.8.1_master' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/totalMemoryMB=NoneType:'None' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/setupAttributesModules=list:'[<module 'ovirt_engine_setup.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/constants.pyc'>, <module 'ovirt_engine_setup.engine_common.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/constants.pyc'>, <module 'ovirt_engine_setup.engine.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/constants.pyc'>, <module 'ovirt_engine_setup.cinderlib.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/cinderlib/constants.pyc'>, <module 'ovirt_engine_setup.websocket_proxy.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/websocket_proxy/constants.pyc'>]' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/oldPostgresService=str:'rh-postgresql95-postgresql' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresConf=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf' >2019-02-26 17:06:04,179+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresPgHba=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf' >2019-02-26 17:06:04,180+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresPgVersion=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION' >2019-02-26 17:06:04,180+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresService=str:'rh-postgresql10-postgresql' >2019-02-26 17:06:04,180+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,180+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,180+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_NAME=str:'otopi' >2019-02-26 17:06:04,180+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_VERSION=str:'1.8.1_master' >2019-02-26 17:06:04,180+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,180+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.dialog.misc.Plugin._init >2019-02-26 17:06:04,180+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,181+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/dialect=str:'human' >2019-02-26 17:06:04,181+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,181+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.system.info.Plugin._init >2019-02-26 17:06:04,181+0100 DEBUG otopi.plugins.otopi.system.info info._init:39 SYSTEM INFORMATION - BEGIN >2019-02-26 17:06:04,181+0100 DEBUG otopi.plugins.otopi.system.info info._init:40 executable /bin/python >2019-02-26 17:06:04,181+0100 DEBUG otopi.plugins.otopi.system.info info._init:41 python version 2.7.5 (default, Oct 30 2018, 23:45:53) >[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] >2019-02-26 17:06:04,181+0100 DEBUG otopi.plugins.otopi.system.info info._init:42 python /bin/python >2019-02-26 17:06:04,181+0100 DEBUG otopi.plugins.otopi.system.info info._init:43 platform linux2 >2019-02-26 17:06:04,181+0100 DEBUG otopi.plugins.otopi.system.info info._init:44 distribution ('CentOS Linux', '7.6.1810', 'Core') >2019-02-26 17:06:04,181+0100 DEBUG otopi.plugins.otopi.system.info info._init:45 host 'gb60kf2.democustomer.televic.com' >2019-02-26 17:06:04,182+0100 DEBUG otopi.plugins.otopi.system.info info._init:51 uid 0 euid 0 gid 0 egid 0 >2019-02-26 17:06:04,182+0100 DEBUG otopi.plugins.otopi.system.info info._init:53 SYSTEM INFORMATION - END >2019-02-26 17:06:04,182+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.dialog.human.Plugin._init >2019-02-26 17:06:04,182+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,182+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/boundary=str:'--=451b80dc-996f-432e-9e4f-2b29ef6d1141=--' >2019-02-26 17:06:04,182+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,183+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.dialog.machine.Plugin._init >2019-02-26 17:06:04,183+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:04,183+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.dialog.misc.Plugin._boot_misc_done >2019-02-26 17:06:04,183+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._boot >2019-02-26 17:06:04,184+0100 DEBUG otopi.plugins.otopi.packagers.dnfpackager dnfpackager._boot:173 Cannot initialize minidnf >Traceback (most recent call last): > File "/usr/share/otopi/plugins/otopi/packagers/dnfpackager.py", line 157, in _boot > constants.PackEnv.DNF_DISABLED_PLUGINS > File "/usr/share/otopi/plugins/otopi/packagers/dnfpackager.py", line 60, in _getMiniDNF > from otopi import minidnf > File "/usr/lib/python2.7/site-packages/otopi/minidnf.py", line 16, in <module> > import dnf >ImportError: No module named dnf >2019-02-26 17:06:04,184+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,184+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfDisabledPlugins=list:'[]' >2019-02-26 17:06:04,184+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfExpireCache=bool:'True' >2019-02-26 17:06:04,184+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfRollback=bool:'True' >2019-02-26 17:06:04,184+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfpackagerEnabled=bool:'True' >2019-02-26 17:06:04,184+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/keepAliveInterval=int:'30' >2019-02-26 17:06:04,185+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,185+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._boot >Loaded plugins: fastestmirror, versionlock >Repository ovirt-4.3-epel is listed more than once in the configuration >Repository ovirt-4.3-centos-gluster5 is listed more than once in the configuration >Repository ovirt-4.3-virtio-win-latest is listed more than once in the configuration >Repository ovirt-4.3-centos-qemu-ev is listed more than once in the configuration >Repository ovirt-4.3-centos-ovirt43 is listed more than once in the configuration >Repository ovirt-4.3-centos-opstools is listed more than once in the configuration >Repository centos-sclo-rh-release is listed more than once in the configuration >Repository sac-gluster-ansible is listed more than once in the configuration >Repository centos-sclo-rh-release is listed more than once in the configuration >Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:04,499+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,500+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/log=bool:'True' >2019-02-26 17:06:04,500+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileHandle=file:'<open file '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', mode 'a' at 0x7f1fe50f6a50>' >2019-02-26 17:06:04,500+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileName=str:'/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log' >2019-02-26 17:06:04,500+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilter=_MyLoggerFilter:'filter' >2019-02-26 17:06:04,500+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilterRe=list:'[<_sre.SRE_Pattern object at 0x2363440>]' >2019-02-26 17:06:04,500+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logRemoveAtExit=bool:'False' >2019-02-26 17:06:04,500+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,500+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.core.misc.Plugin._init >2019-02-26 17:06:04,500+0100 DEBUG otopi.context context.dumpSequence:662 SEQUENCE DUMP - BEGIN >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:664 STAGE boot >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._boot (None) >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._preinit (None) >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.core.misc.Plugin._boot (None) >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection.Plugin._boot (None) >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._boot (None) >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.websocket_proxy.core.Plugin._boot (None) >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.core.misc.Plugin._preinit (None) >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.filter_secrets.Plugin._boot (osetup.secrets.filtered.from.setup.attrs.modules) >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.log.Plugin._init (otopi.core.log.init) >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.misc.Plugin._init (None) >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.misc.Plugin._init (otopi.dialog.misc.boot) >2019-02-26 17:06:04,501+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.info.Plugin._init (None) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.human.Plugin._init (None) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.machine.Plugin._init (None) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.misc.Plugin._boot_misc_done (otopi.dialog.boot.done) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._boot (None) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._boot (otopi.packagers.yum.boot) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:664 STAGE init >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.config.Plugin._init (otopi.core.config.init) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._init (None) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._init (None) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.command.Plugin._init (None) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._init (None) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.core.Plugin._init (otopi.packagers.detection) >2019-02-26 17:06:04,502+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.transaction.Plugin._init (otopi.core.transactions.init) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.answer_file.Plugin._init (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.cli.Plugin._init (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.machine.Plugin._init_machine_events_stuff (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._init (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.iptables.Plugin._init (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.ssh.Plugin._init (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.clock.Plugin._init (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.reboot.Plugin._init (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.answerfile.Plugin._init (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.duplicated_constants_check.Plugin._init (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.offlinepackager.Plugin._init (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.postinstall.Plugin._init (None) >2019-02-26 17:06:04,503+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.reconfigure.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_firewalld.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.hostname.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.connection.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.pgpass.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.engine.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.fence_kdump_listener.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.config.Plugin._init (None) >2019-02-26 17:06:04,504+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.connection.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.system.he.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.config.java.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.core.protocols.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.provisioning.postgres.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.apache.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.environment.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.config.dwh_uuid.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.misc.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.service.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.config.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection.Plugin._init (None) >2019-02-26 17:06:04,505+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.pgpass.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_imageio_proxy.core.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.vmconsole_proxy_helper.core.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.websocket_proxy.core.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.core.misc.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.dialog.preview.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.system.environment.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.core.misc.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.engine.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._init (None) >2019-02-26 17:06:04,506+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.domain_type.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.iso_domain.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.java.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.notifier.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.public_glance_repository.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.storage.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.misc.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.vacuum.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.distro-rpm.packages.Plugin._init (None) >2019-02-26 17:06:04,507+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.core.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.misc.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.jboss.Plugin._init (None) >2019-02-26 17:06:04,508+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh_database.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.vacuum.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.distro-rpm.packages.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._init (None) >2019-02-26 17:06:04,509+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._init (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._init (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._init (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.packages.Plugin._init (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._init (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:664 STAGE setup >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._setup_existence (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._setup_existence (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.config.Plugin._post_init (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.log.Plugin._setup (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.misc.Plugin._setup (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._setup (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._setup (None) >2019-02-26 17:06:04,510+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_root_ssh.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.hostname.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.openrc.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.rhel.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.systemd.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.clock.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.reboot.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._setup_common_titles (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_firewalld.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_human.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_iptables.Plugin._setup (None) >2019-02-26 17:06:04,511+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.hostname.Plugin._setup (None) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine.Plugin._setup (None) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_manual_files.Plugin._setup (None) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._setup (None) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.mem.Plugin._setup (None) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._setup (None) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.connection.Plugin._setup (osetup.cinderlib.db.connection.setup) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.connection.Plugin._setup (osetup.db.connection.setup) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.core.protocols.Plugin._setup (None) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.apache.Plugin._setup (None) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.config.dwh_uuid.Plugin._setup (None) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.misc.Plugin._setup (None) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection.Plugin._commands (None) >2019-02-26 17:06:04,512+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection.Plugin._setup (osetup.dwh.db.connection.setup) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._setup_dbtransaction (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_imageio_proxy.core.Plugin._setup (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.vmconsole_proxy_helper.core.Plugin._setup (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._setup (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._setup (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.jboss.Plugin._setup (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.misc.Plugin._setup (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._setup (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._setup (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._setup (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._setup (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._setup (None) >2019-02-26 17:06:04,513+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._setup (None) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._setup (None) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._setup (None) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin._setup (None) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._setup (None) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.connection.Plugin._setup (None) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.legacy.config.Plugin._setup (None) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._setup_engine_db_credentials (None) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._keep_only_valid_firewall_managers (osetup.keep.only.valid.firewall.managers) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._setup (None) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._setup (None) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._setup (None) >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:664 STAGE internal_packages >2019-02-26 17:06:04,514+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.transaction.Plugin._pre_prepare (None) >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._internal_packages_end (None) >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._internal_packages_end (None) >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.transaction.Plugin._pre_end (None) >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:664 STAGE programs >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.command.Plugin._programs (otopi.system.command.detection) >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh.Plugin._setup (None) >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._programs (None) >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.pki.Plugin._setup (None) >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.openrc.Plugin._programs (None) >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.rhel.Plugin._programs (None) >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.services.systemd.Plugin._programs (None) >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:664 STAGE late_setup >2019-02-26 17:06:04,515+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._late_setup (None) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._late_setup_service_state (None) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._late_setup_service_state (None) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:664 STAGE customization >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._customization (None) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.config.Plugin._customize1 (None) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.cli.Plugin._customize (otopi.dialog.cli.customization) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.reconfigure.Plugin._customization (None) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._version_lock_customization (None) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._customization_enable (osetup.engine.system.nfs.allow) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.jboss.Plugin._version_lock_customization (None) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_s_product_options (osetup.dialog.titles.productoptions.start) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._customization (osetup.system.nfs.available) >2019-02-26 17:06:04,516+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.core.misc.Plugin.__customization_cinderlib_db_enable (None) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.iso_domain.Plugin._customization (None) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.misc.Plugin._customization (osetup.engine.core.enable) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._customization (None) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._customization (setup.config.imageio-proxy.customization) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._customization (setup.config.websocket-proxy.customization) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._customization (None) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.java.Plugin._customization (None) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.distro-rpm.packages.Plugin._customization (None) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.misc.Plugin._customization (osetup.dwh.core.enable) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._customization (None) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.packages.Plugin._customization (None) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_e_product_options (osetup.dialog.titles.productoptions.end) >2019-02-26 17:06:04,517+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.distro-rpm.packages.Plugin._customization (None) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_packages (osetup.dialog.titles.packaging.start) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin._customization (osetup.distro-rpm.package.update.check) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_packages (osetup.dialog.titles.packages.end) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_network (osetup.dialog.titles.network.start) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.network.hostname.Plugin._customization (osetup.config.protocols.customization) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._customization_is_requested (None) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._customization (osetup.net.firewallmanager.available) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.protocols.Plugin._customization (None) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.firewall.Plugin._configuration (None) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._firewall (None) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.firewall.Plugin._configuration (None) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._network_owners_config_customized (osetup.network.owners.config.customized) >2019-02-26 17:06:04,518+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._remote_engine_customization (None) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._customization_network (None) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._customizationNetwork (None) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._customization_network (None) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_network (osetup.dialog.titles.network.end) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_database (osetup.dialog.titles.database.start) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._customization_enable (osetup.cinderlib.db.connection.allow) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._customization_enable (osetup.cinderlib.provisioning.pgsql.allow) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._customization_enable (osetup.engine.db.connection.allow) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._customization_enable (osetup.engine.provisioning.pgsql.allow) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._customization (None) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._customization (None) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._customization (None) >2019-02-26 17:06:04,519+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.connection.Plugin._customization (osetup.dwh.db.connection.customization) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._customization (osetup.cinderlib.db.connection.customization) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._customization (osetup.db.connection.customization) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._customization (None) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade.Plugin._customization (osetup.db.cust.upgrade.dbms.engine) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.auth_url_validation.Plugin._customization (None) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._db_owners_connections_customized (osetup.db.owners.connections.customized) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.dbmsupgrade.Plugin._customization (osetup.db.cust.upgrade.dbms.dwh) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection.Plugin._engine_customization (None) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._customization (None) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.vacuum.Plugin._customization (None) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_database (osetup.dialog.titles.database.end) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_engine (osetup.dialog.titles.engine.start) >2019-02-26 17:06:04,520+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._customization (osetup.admin.password.set) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._customization_enable (osetup.engine.config.appmode.allow) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.vacuum.Plugin._customization (None) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._customization (osetup.config.applicationMode.available) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._customization_credentials (None) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.domain_type.Plugin._customization (None) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_engine (osetup.dialog.titles.engine.end) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_storage (osetup.dialog.titles.storage.start) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.storage.Plugin._configureSANWipeAfterDelete (None) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_storage (osetup.dialog.titles.storage.end) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_pki (osetup.dialog.titles.pki.start) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._customization (None) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._customization_upgrade (None) >2019-02-26 17:06:04,521+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._customization (None) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._customization (None) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_pki (osetup.dialog.titles.pki.end) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_apache (osetup.dialog.titles.apache.start) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._customization (None) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._customization (None) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._customization_already_configured (None) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_apache (osetup.dialog.titles.apache.end) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_system (osetup.dialog.titles.system.start) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._customization_disable (osetup.engine.kdump.allow) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._customization_firewall (None) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._customization_firewall (None) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._customization_firewall (None) >2019-02-26 17:06:04,522+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_system (osetup.dialog.titles.system.end) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_misc (osetup.dialog.titles.misc.start) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.scale.Plugin._customization (None) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_misc (osetup.dialog.titles.misc.end) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.config.Plugin._customize2 (None) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._customization_firewall (None) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._customization_firewall (None) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._customization_firewall (None) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:664 STAGE validation >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.misc.Plugin._validation (None) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._validation_enable (None) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._validateEnv (None) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._validate_enable (None) >2019-02-26 17:06:04,523+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.log.Plugin._validation (None) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.hostname.Plugin._validation (None) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.ssh.Plugin._validation (None) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._validation_changed_files (None) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._validation (None) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.pgpass.Plugin._validation (osetup.cinderlib.db.connection.credentials.early) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.engine.Plugin._validation (None) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.config.Plugin._validation (None) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass.Plugin._validation (osetup.db.connection.credentials.early) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.system.he.Plugin._validate (None) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.config.java.Plugin._validation (None) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.config.Plugin._validation (None) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._validation (None) >2019-02-26 17:06:04,524+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._validation (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.notifier.Plugin._validation (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin.checkUuidOsspExtensionForRemoteDbOrDevEnv (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._validation (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._validation (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._validation (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._validate_ssl (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._validation (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.check_etl.Plugin._validation (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._validation (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._validation (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._validation (None) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._validation (otopi.network.firewalld.validation) >2019-02-26 17:06:04,525+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.iptables.Plugin._validate (otopi.network.iptables.validation) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_checks.ovirt_engine.db.versions.Plugin._validation (None) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema.Plugin._validation (None) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._validate_provider_uniqueness (None) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._validateMemory (osetup.memory.check) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._validateZombies (None) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._review_config (None) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._validateContinueLowMemory (None) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.dialog.preview.Plugin._customization (None) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._validation_late (None) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaakerbldap.Plugin._validation_late (None) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._validateAsyncTasks (None) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations.Plugin._validation (None) >2019-02-26 17:06:04,526+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaainternal.Plugin._validation (None) >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:664 STAGE transaction-prepare >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.transaction.Plugin._main_prepare (None) >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.engine.Plugin._transactionBegin (None) >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.fence_kdump_listener.Plugin._transactionBegin (None) >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.service.Plugin._transactionBegin (None) >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_imageio_proxy.core.Plugin._transactionBegin (None) >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.vmconsole_proxy_helper.core.Plugin._transactionBegin (None) >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.websocket_proxy.core.Plugin._transactionBegin (None) >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.external_truststore.Plugin.remove_external_truststore (None) >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._transaction_begin (osetup.system.hostile.detection) >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._transactionBegin (None) >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:664 STAGE early_misc >2019-02-26 17:06:04,527+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._early_misc (None) >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade.Plugin._updateDBMS (osetup.db.upgrade.dbms.engine) >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations.Plugin._misc (None) >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.dbmsupgrade.Plugin._updateDBMS (osetup.db.upgrade.dbms.dwh) >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._updatePGConf (None) >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:664 STAGE packages >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.iptables.Plugin._packages (None) >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin.packages (None) >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._packages (None) >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._packages (None) >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._packages (None) >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:664 STAGE misc >2019-02-26 17:06:04,528+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.jboss.Plugin._jboss (None) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.command.Plugin._misc (otopi.system.command.redetection) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._misc (osetup.system.sysctl.available) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._misc (None) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.iptables.Plugin._store_iptables (None) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.ssh.Plugin._append_key (None) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.clock.Plugin._set_clock (None) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._prepare_examples (None) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._misc (None) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.engine.Plugin._misc (None) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._misc (None) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaainternal.Plugin._misc (None) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.java.Plugin._misc (None) >2019-02-26 17:06:04,529+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.jboss.Plugin._misc (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.protocols.Plugin._misc (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.tools.Plugin._misc (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.advertise_dwh.Plugin._get_dwh_host (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.vacuum.Plugin._vacuum (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_pki (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._restart_ovn_services (osetup.ovn.services.restart) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._miscUpgrade (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._misc (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._misc (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.answerfile_fixup.Plugin._misc (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.selinux.Plugin._misc (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._misc (None) >2019-02-26 17:06:04,530+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.versionlock_config.Plugin._misc (None) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh.Plugin._misc_stop_remote_dwh (None) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.scale.Plugin._misc (None) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._misc (None) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._misc_config (None) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._miscConfigVMConsoleHelper (None) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._miscConfigVMConsoleProxy (None) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._misc_config (None) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.pgpass.Plugin._misc (osetup.cinderlib.db.connection.credentials.late) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass.Plugin._misc (osetup.db.connection.credentials.late) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.pgpass.Plugin._misc (osetup.dwh.db.connection.credentials) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._misc (osetup.pki.ca.available) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._misc_cinderlib_schema (osetup.cinderlib.db.schema) >2019-02-26 17:06:04,531+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin.installUuidOsspExtensionForLocalDb (None) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_configure_ovn_pki (None) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_configure_provider (None) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh.Plugin._misc (osetup.pki.ssh.available) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._misc (osetup.dwh.db.schema) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._check_separate (None) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._misc_VDC (setup.config.imageio-proxy.remote_vdc) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._misc_pki (None) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.pki.Plugin._miscPKIEngine (None) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.pki.Plugin._miscPKIProxy (None) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._check_separate (None) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._misc_VDC (setup.config.websocket-proxy.remote_vdc) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._misc_pki (None) >2019-02-26 17:06:04,532+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.config.database.Plugin._misc (None) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.config.misc.Plugin._misc (None) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._connection (osetup.cinderlib.db.connection.available) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema.Plugin._misc (osetup.db.schema) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._restart_provider_service (osetup.ovn.provider.service.restart) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.config.Plugin._misc (None) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh_database.Plugin._miscDWHConfig (None) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.connection.Plugin._connection (osetup.dwh.db.connection.available) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.vacuum.Plugin._vacuum (None) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.database.Plugin._misc (None) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._connection (osetup.db.connection.available) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._engine_connection (osetup.dwh.engine.db.connection.available) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._attach_group_to_role (None) >2019-02-26 17:06:04,533+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._misc (osetup.aaa_jdbc.config.setup.admin.user) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._misc (None) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.ca.Plugin._misc (osetup.config.encryption.available) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.domain_type.Plugin._misc (None) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.iso_domain.Plugin._add_iso_domain_to_db (osetup.config.iso_domain.available) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.options.Plugin._miscAlways (None) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.options.Plugin._miscNewDatabase (None) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.public_glance_repository.Plugin._misc (None) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.sso.Plugin._misc (None) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.storage.Plugin._updateSANWipeAfterDelete (None) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.macpools.Plugin._misc_db_entries (osetup.macpool.db) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_db_entries (osetup.ovn.provider.db) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin.miscOptions (None) >2019-02-26 17:06:04,534+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.auth_url_validation.Plugin._update_providers (None) >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._databaseOptions (None) >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._setupAdminPassword (None) >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._misc (None) >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._misc (None) >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._misc (None) >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._misc (osetup.config.aaa.adminuser.setup) >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._misc (osetup.setup.selinux) >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.misc.Plugin._misc (None) >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.postinstall.Plugin._misc (None) >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:664 STAGE cleanup >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.transaction.Plugin._main_end (None) >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:664 STAGE closeup >2019-02-26 17:06:04,535+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.firewalld.Plugin._closeup (None) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.network.iptables.Plugin._closeup (None) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._closeup (None) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._closeup (None) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.engine.Plugin._closeup (osetup.core.engine.start) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._closeup (None) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.service.Plugin._closeup (None) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.legacy.config.Plugin._closeup (None) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._closeup (None) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._closeup (None) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._closeup (None) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_s_summary (osetup.dialog.titles.summary.start) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.apache.Plugin._closeup (osetup.apache.core.restart) >2019-02-26 17:06:04,536+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._closeup (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._closeup (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._closeup (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.protocols.Plugin._closeup (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._print_manual_commands (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._print_restart_services_commands (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._closeup (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh.Plugin._closeup (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._closeup (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._closeup (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._closeup (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh.Plugin._closeup (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh_database.Plugin._closeupDWHConfig (None) >2019-02-26 17:06:04,537+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._closeupEngineAccess (None) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._closeup (None) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._devenv_closeup (None) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_e_summary (osetup.dialog.titles.summary.end) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.reboot.Plugin._closeup (None) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:664 STAGE cleanup >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.answer_file.Plugin._generate_answer_file (otopi.core.answer.file.generated) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._cleanup (None) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine.Plugin._cleanup (None) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._cleanupEngineAccess (None) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._cleanup (None) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._cleanup (None) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._cleanup (None) >2019-02-26 17:06:04,538+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.answerfile.Plugin._cleanup (None) >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.duplicated_constants_check.Plugin._cleanup (None) >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._rollback (None) >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:664 STAGE pre-terminate >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.misc.Plugin._preTerminate (None) >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.cli.Plugin._pre_terminate (otopi.dialog.cli.termination) >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:664 STAGE terminate >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._terminate (None) >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.human.Plugin._terminate (None) >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.dialog.machine.Plugin._terminate (None) >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.core.log.Plugin._terminate (None) >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:664 STAGE reboot >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:669 METHOD otopi.plugins.otopi.system.reboot.Plugin._reboot (None) >2019-02-26 17:06:04,539+0100 DEBUG otopi.context context.dumpSequence:671 SEQUENCE DUMP - END >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/aborted=bool:'False' >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/debug=int:'0' >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/error=bool:'False' >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/exceptionInfo=list:'[]' >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/executionDirectory=str:'/root' >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/exitCode=list:'[{'priority': 90001, 'code': 0}]' >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/log=bool:'True' >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/pluginGroups=str:'otopi:ovirt-engine-common:ovirt-engine-setup:ovirt-engine-checks' >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/pluginPath=str:'/usr/share/otopi/plugins:/usr/share/ovirt-engine/setup/bin/../plugins' >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/suppressEnvironmentKeys=list:'[]' >2019-02-26 17:06:04,540+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/pg_dump=str:'/opt/rh/rh-postgresql10/root/usr/bin/pg_dump' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/pg_restore=str:'/opt/rh/rh-postgresql10/root/usr/bin/pg_restore' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/postgresql-setup=str:'/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/psql=str:'/opt/rh/rh-postgresql10/root/usr/bin/psql' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/configFileAppend=str:':/tmp/answerfile-20190226170545Z.txt' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/configFileName=str:'/etc/ovirt-engine-setup.conf' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/failOnPrioOverride=bool:'True' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logDir=str:'/var/log/ovirt-engine/setup' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileHandle=file:'<open file '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', mode 'a' at 0x7f1fe50f6a50>' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileName=str:'/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileNamePrefix=str:'ovirt-engine-setup' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilter=_MyLoggerFilter:'filter' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilterKeys=list:'['OVESETUP_DWH_DB/password', 'OVESETUP_DB/password', 'OVESETUP_CONFIG/remoteEngineHostRootPassword', 'OVESETUP_DB/password', 'OVESETUP_PKI/storePassword', 'OVESETUP_CONFIG/adminPassword', 'OVESETUP_OVN/ovirtProviderOvnSecret', 'OVESETUP_OVN/ovirtProviderOvnPassword', 'OVESETUP_CL_DB/password']' >2019-02-26 17:06:04,541+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilterRe=list:'[<_sre.SRE_Pattern object at 0x2363440>]' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logRemoveAtExit=bool:'False' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/randomizeEvents=bool:'False' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/autoAcceptDefault=bool:'True' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_NAME=str:'otopi' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_VERSION=str:'1.8.1_master' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/totalMemoryMB=NoneType:'None' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/setupAttributesModules=list:'[<module 'ovirt_engine_setup.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/constants.pyc'>, <module 'ovirt_engine_setup.engine_common.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/constants.pyc'>, <module 'ovirt_engine_setup.engine.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/constants.pyc'>, <module 'ovirt_engine_setup.cinderlib.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/cinderlib/constants.pyc'>, <module 'ovirt_engine_setup.websocket_proxy.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/websocket_proxy/constants.pyc'>]' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/oldPostgresService=str:'rh-postgresql95-postgresql' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresConf=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresPgHba=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresPgVersion=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresService=str:'rh-postgresql10-postgresql' >2019-02-26 17:06:04,542+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,543+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,543+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_NAME=str:'otopi' >2019-02-26 17:06:04,543+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_VERSION=str:'1.8.1_master' >2019-02-26 17:06:04,543+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,543+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.dialog.misc.Plugin._init >2019-02-26 17:06:04,543+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,543+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/dialect=str:'human' >2019-02-26 17:06:04,543+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,544+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.system.info.Plugin._init >2019-02-26 17:06:04,544+0100 DEBUG otopi.plugins.otopi.system.info info._init:39 SYSTEM INFORMATION - BEGIN >2019-02-26 17:06:04,544+0100 DEBUG otopi.plugins.otopi.system.info info._init:40 executable /bin/python >2019-02-26 17:06:04,544+0100 DEBUG otopi.plugins.otopi.system.info info._init:41 python version 2.7.5 (default, Oct 30 2018, 23:45:53) >[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] >2019-02-26 17:06:04,544+0100 DEBUG otopi.plugins.otopi.system.info info._init:42 python /bin/python >2019-02-26 17:06:04,544+0100 DEBUG otopi.plugins.otopi.system.info info._init:43 platform linux2 >2019-02-26 17:06:04,544+0100 DEBUG otopi.plugins.otopi.system.info info._init:44 distribution ('CentOS Linux', '7.6.1810', 'Core') >2019-02-26 17:06:04,544+0100 DEBUG otopi.plugins.otopi.system.info info._init:45 host 'gb60kf2.democustomer.televic.com' >2019-02-26 17:06:04,544+0100 DEBUG otopi.plugins.otopi.system.info info._init:51 uid 0 euid 0 gid 0 egid 0 >2019-02-26 17:06:04,544+0100 DEBUG otopi.plugins.otopi.system.info info._init:53 SYSTEM INFORMATION - END >2019-02-26 17:06:04,545+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.dialog.human.Plugin._init >2019-02-26 17:06:04,545+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,545+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/boundary=str:'--=451b80dc-996f-432e-9e4f-2b29ef6d1141=--' >2019-02-26 17:06:04,545+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,545+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.dialog.machine.Plugin._init >2019-02-26 17:06:04,545+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:04,546+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.dialog.misc.Plugin._boot_misc_done >2019-02-26 17:06:04,546+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._boot >2019-02-26 17:06:04,546+0100 DEBUG otopi.plugins.otopi.packagers.dnfpackager dnfpackager._boot:173 Cannot initialize minidnf >Traceback (most recent call last): > File "/usr/share/otopi/plugins/otopi/packagers/dnfpackager.py", line 157, in _boot > constants.PackEnv.DNF_DISABLED_PLUGINS > File "/usr/share/otopi/plugins/otopi/packagers/dnfpackager.py", line 60, in _getMiniDNF > from otopi import minidnf > File "/usr/lib/python2.7/site-packages/otopi/minidnf.py", line 16, in <module> > import dnf >ImportError: No module named dnf >2019-02-26 17:06:04,547+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,547+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfDisabledPlugins=list:'[]' >2019-02-26 17:06:04,547+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfExpireCache=bool:'True' >2019-02-26 17:06:04,547+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfRollback=bool:'True' >2019-02-26 17:06:04,547+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfpackagerEnabled=bool:'True' >2019-02-26 17:06:04,547+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/keepAliveInterval=int:'30' >2019-02-26 17:06:04,547+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,548+0100 DEBUG otopi.context context._executeMethod:127 Stage boot METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._boot >Loaded plugins: fastestmirror, versionlock >Repository ovirt-4.3-epel is listed more than once in the configuration >Repository ovirt-4.3-centos-gluster5 is listed more than once in the configuration >Repository ovirt-4.3-virtio-win-latest is listed more than once in the configuration >Repository ovirt-4.3-centos-qemu-ev is listed more than once in the configuration >Repository ovirt-4.3-centos-ovirt43 is listed more than once in the configuration >Repository ovirt-4.3-centos-opstools is listed more than once in the configuration >Repository centos-sclo-rh-release is listed more than once in the configuration >Repository sac-gluster-ansible is listed more than once in the configuration >Repository centos-sclo-rh-release is listed more than once in the configuration >Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:04,655+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,655+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumDisabledPlugins=list:'[]' >2019-02-26 17:06:04,655+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumEnabledPlugins=list:'[]' >2019-02-26 17:06:04,655+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumExpireCache=bool:'True' >2019-02-26 17:06:04,655+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumRollback=bool:'True' >2019-02-26 17:06:04,655+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumpackagerEnabled=bool:'True' >2019-02-26 17:06:04,655+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,655+0100 INFO otopi.context context.runSequence:610 Stage: Initializing >2019-02-26 17:06:04,655+0100 DEBUG otopi.context context.runSequence:614 STAGE init >2019-02-26 17:06:04,656+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.core.config.Plugin._init >2019-02-26 17:06:04,657+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,657+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/requireRollback=NoneType:'None' >2019-02-26 17:06:04,657+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configureRootRedirectionDefault=bool:'True' >2019-02-26 17:06:04,657+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configured=bool:'True' >2019-02-26 17:06:04,657+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/enable=bool:'False' >2019-02-26 17:06:04,657+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminPassword=str:'**FILTERED**' >2019-02-26 17:06:04,657+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUser=str:'admin@internal' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserAuthzName=str:'internal-authz' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserAuthzType=str:'ovirt-engine-extension-aaa-jdbc' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserId=str:'50a91983-19f1-4193-9755-227c79ab5e36' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserNamespace=str:'*' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallManager=str:'firewalld' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdn=str:'gb60kf2.democustomer.televic.com' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyConfig=bool:'True' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainExists=bool:'False' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainMountPoint=NoneType:'None' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainName=NoneType:'None' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainSdUuid=NoneType:'None' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainStorageDir=NoneType:'None' >2019-02-26 17:06:04,658+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossHome=str:'/usr/share/ovirt-engine-wildfly' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/sanWipeAfterDelete=bool:'False' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/updateFirewall=bool:'True' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyConfig=bool:'True' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/generatedByVersion=str:'4.3.1.2_master' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/database=str:'engine' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/dwhVacuumFull=bool:'False' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/engineVacuumFull=bool:'False' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/host=str:'localhost' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/password=NoneType:'None' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/port=int:'5432' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/user=str:'engine' >2019-02-26 17:06:04,659+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/remoteEngineConfigured=bool:'False' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/scale=str:'1' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CORE/enable=bool:'True' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/database=str:'ovirt_engine_history' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/host=str:'localhost' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/password=NoneType:'None' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/port=int:'5432' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/secured=bool:'False' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/securedHostValidation=bool:'False' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/user=str:'ovirt_engine_history' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_PROVISIONING/postgresProvisioningEnabled=bool:'True' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ENGINE_CORE/enable=bool:'True' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvn=bool:'True' >2019-02-26 17:06:04,660+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvnId=str:'92e45e35-9ffe-4ded-b153-d69ee53e5bd6' >2019-02-26 17:06:04,661+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvnPassword=str:'**FILTERED**' >2019-02-26 17:06:04,661+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvnUser=str:'admin@internal' >2019-02-26 17:06:04,661+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/country=str:'US' >2019-02-26 17:06:04,661+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/organization=str:'demospace.televic.com' >2019-02-26 17:06:04,661+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/jbossPackages=str:'ovirt-engine-wildfly,ovirt-engine-wildfly-overlay' >2019-02-26 17:06:04,661+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckEnabled=bool:'False' >2019-02-26 17:06:04,661+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/nfsConfigEnabled_legacyInPostInstall=bool:'False' >2019-02-26 17:06:04,661+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyConfig=bool:'True' >2019-02-26 17:06:04,661+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,662+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._init >2019-02-26 17:06:04,662+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:04,662+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._init >2019-02-26 17:06:04,662+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager._init:199 Registering yum packager >2019-02-26 17:06:04,663+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.system.command.Plugin._init >2019-02-26 17:06:04,663+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,663+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/commandPath=str:'/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin' >2019-02-26 17:06:04,663+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,664+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._init >2019-02-26 17:06:04,664+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.misc misc._init:114 Package: ovirt-engine-4.3.1.2_master (4.3.1.2-0.0.master.20190225111554.git314f81b.el7) >2019-02-26 17:06:04,664+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,664+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/developerMode=bool:'False' >2019-02-26 17:06:04,664+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/originalGeneratedByVersion=str:'4.3.1.2_master' >2019-02-26 17:06:04,664+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/upgradeSupportedVersions=str:'4.1,4.2,4.3' >2019-02-26 17:06:04,664+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,665+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.packagers.core.Plugin._init >2019-02-26 17:06:04,665+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.core.transaction.Plugin._init >2019-02-26 17:06:04,665+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,665+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/internalPackageTransaction=Transaction:'transaction' >2019-02-26 17:06:04,665+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/mainTransaction=Transaction:'transaction' >2019-02-26 17:06:04,666+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/modifiedFiles=list:'[]' >2019-02-26 17:06:04,666+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,666+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.dialog.answer_file.Plugin._init >2019-02-26 17:06:04,666+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,666+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/answerFile=NoneType:'None' >2019-02-26 17:06:04,667+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,667+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.dialog.cli.Plugin._init >2019-02-26 17:06:04,667+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,667+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/cliVersion=int:'1' >2019-02-26 17:06:04,667+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/customization=bool:'False' >2019-02-26 17:06:04,668+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,668+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.dialog.machine.Plugin._init_machine_events_stuff >2019-02-26 17:06:04,668+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:04,668+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.network.firewalld.Plugin._init >2019-02-26 17:06:04,669+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,669+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/firewalldAvailable=bool:'False' >2019-02-26 17:06:04,669+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/firewalldDisableServices=list:'[]' >2019-02-26 17:06:04,669+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/firewalldEnable=bool:'False' >2019-02-26 17:06:04,669+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,669+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.network.iptables.Plugin._init >2019-02-26 17:06:04,670+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,670+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/iptablesEnable=bool:'False' >2019-02-26 17:06:04,670+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/iptablesRules=NoneType:'None' >2019-02-26 17:06:04,670+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,670+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.network.ssh.Plugin._init >2019-02-26 17:06:04,671+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,671+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/sshEnable=bool:'False' >2019-02-26 17:06:04,671+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/sshKey=NoneType:'None' >2019-02-26 17:06:04,671+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/sshUser=str:'' >2019-02-26 17:06:04,671+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,671+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.system.clock.Plugin._init >2019-02-26 17:06:04,672+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,672+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/clockMaxGap=int:'5' >2019-02-26 17:06:04,672+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/clockSet=bool:'False' >2019-02-26 17:06:04,672+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,672+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.otopi.system.reboot.Plugin._init >2019-02-26 17:06:04,673+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,673+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/reboot=bool:'False' >2019-02-26 17:06:04,673+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/rebootAllow=bool:'True' >2019-02-26 17:06:04,673+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/rebootDeferTime=int:'10' >2019-02-26 17:06:04,673+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,673+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.core.answerfile.Plugin._init >2019-02-26 17:06:04,674+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,674+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/answerFile=NoneType:'None' >2019-02-26 17:06:04,674+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/generateStandardAnswerfile=bool:'True' >2019-02-26 17:06:04,674+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,674+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.core.duplicated_constants_check.Plugin._init >2019-02-26 17:06:04,675+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,675+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/failOnDulicatedConstant=bool:'False' >2019-02-26 17:06:04,675+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,675+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.core.offlinepackager.Plugin._init >2019-02-26 17:06:04,676+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,676+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/offlinePackager=bool:'False' >2019-02-26 17:06:04,676+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,676+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.core.postinstall.Plugin._init >2019-02-26 17:06:04,676+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,677+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/generatePostInstall=bool:'True' >2019-02-26 17:06:04,677+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,677+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.core.reconfigure.Plugin._init >2019-02-26 17:06:04,677+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,677+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/reconfigureOptionalComponents=NoneType:'None' >2019-02-26 17:06:04,678+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,678+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._init >2019-02-26 17:06:04,679+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,679+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/registerUninstallGroups=RegisterGroups:'<otopi.plugins.ovirt_engine_common.base.core.uninstall.RegisterGroups object at 0x7f1fdf5a12d0>' >2019-02-26 17:06:04,679+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallGroupsDescriptions=dict:'{}' >2019-02-26 17:06:04,679+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallUninstallFiles=list:'['/etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf', '/etc/ovirt-engine/uninstall.d/20190226164849-uninstall.conf', '/etc/ovirt-engine/uninstall.d/20190226170203-uninstall.conf']' >2019-02-26 17:06:04,679+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallUnremovableFiles=list:'[]' >2019-02-26 17:06:04,679+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,679+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager.Plugin._init >2019-02-26 17:06:04,680+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,680+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallManagers=list:'[]' >2019-02-26 17:06:04,680+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,680+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_firewalld.Plugin._init >2019-02-26 17:06:04,681+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,681+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldServices=list:'[]' >2019-02-26 17:06:04,681+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldSubst=dict:'{}' >2019-02-26 17:06:04,681+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,681+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.network.hostname.Plugin._init >2019-02-26 17:06:04,682+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,682+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdnIsNeeded=bool:'True' >2019-02-26 17:06:04,682+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdnNonLoopback=bool:'False' >2019-02-26 17:06:04,682+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdnReverseValidation=bool:'False' >2019-02-26 17:06:04,682+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,683+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine.Plugin._init >2019-02-26 17:06:04,683+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,683+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostClientKey=NoneType:'None' >2019-02-26 17:06:04,683+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostKnownHosts=NoneType:'None' >2019-02-26 17:06:04,683+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostRootPassword=NoneType:'None' >2019-02-26 17:06:04,683+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostSshPort=NoneType:'None' >2019-02-26 17:06:04,683+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineSetupStyle=NoneType:'None' >2019-02-26 17:06:04,683+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineSetupStyles=list:'[]' >2019-02-26 17:06:04,683+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/remoteEngine=NoneType:'None' >2019-02-26 17:06:04,684+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,684+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._init >2019-02-26 17:06:04,684+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,685+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/hostileServices=str:'ovirt-engine-dwhd,ovirt-engine-notifier' >2019-02-26 17:06:04,685+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,685+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._init >2019-02-26 17:06:04,685+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,686+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/selinuxBooleans=list:'[]' >2019-02-26 17:06:04,686+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/selinuxContexts=list:'[]' >2019-02-26 17:06:04,686+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/selinuxRestorePaths=list:'[]' >2019-02-26 17:06:04,686+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,686+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.connection.Plugin._init >2019-02-26 17:06:04,686+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/connection=NoneType:'None' >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/database=NoneType:'None' >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/dumper=str:'pg_custom' >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/filter=NoneType:'None' >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/host=NoneType:'None' >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/justRestored=bool:'False' >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/needDBMSUpgrade=bool:'False' >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/newDatabase=bool:'True' >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/password=NoneType:'None' >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/port=NoneType:'None' >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/restoreJobs=int:'2' >2019-02-26 17:06:04,687+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/secured=NoneType:'None' >2019-02-26 17:06:04,688+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/securedHostValidation=NoneType:'None' >2019-02-26 17:06:04,688+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/statement=NoneType:'None' >2019-02-26 17:06:04,688+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/user=NoneType:'None' >2019-02-26 17:06:04,688+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,688+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.pgpass.Plugin._init >2019-02-26 17:06:04,689+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,689+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/pgPassFile=NoneType:'None' >2019-02-26 17:06:04,689+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,690+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.engine.Plugin._init >2019-02-26 17:06:04,692+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,692+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineServiceStopNeeded=bool:'True' >2019-02-26 17:06:04,692+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/engineStop=NoneType:'None' >2019-02-26 17:06:04,692+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,693+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.fence_kdump_listener.Plugin._init >2019-02-26 17:06:04,693+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fenceKdumpListenerStopNeeded=bool:'False' >2019-02-26 17:06:04,694+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,694+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.config.Plugin._init >2019-02-26 17:06:04,694+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineDbBackupDir=str:'/var/lib/ovirt-engine/backups' >2019-02-26 17:06:04,695+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,695+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.connection.Plugin._init >2019-02-26 17:06:04,696+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/connection=NoneType:'None' >2019-02-26 17:06:04,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/dumper=str:'pg_custom' >2019-02-26 17:06:04,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/filter=NoneType:'None' >2019-02-26 17:06:04,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/justRestored=bool:'False' >2019-02-26 17:06:04,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/needDBMSUpgrade=bool:'False' >2019-02-26 17:06:04,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/newDatabase=bool:'True' >2019-02-26 17:06:04,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/restoreJobs=int:'2' >2019-02-26 17:06:04,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/secured=NoneType:'None' >2019-02-26 17:06:04,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/securedHostValidation=NoneType:'None' >2019-02-26 17:06:04,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/statement=NoneType:'None' >2019-02-26 17:06:04,697+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,697+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass.Plugin._init >2019-02-26 17:06:04,697+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/pgPassFile=NoneType:'None' >2019-02-26 17:06:04,698+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,698+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.system.he.Plugin._init >2019-02-26 17:06:04,699+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/continueSetupOnHEVM=NoneType:'None' >2019-02-26 17:06:04,699+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,699+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.config.java.Plugin._init >2019-02-26 17:06:04,700+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/javaHome=NoneType:'None' >2019-02-26 17:06:04,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/javaNeeded=bool:'False' >2019-02-26 17:06:04,700+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,701+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.core.protocols.Plugin._init >2019-02-26 17:06:04,701+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/httpPort=int:'80' >2019-02-26 17:06:04,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/httpsPort=int:'443' >2019-02-26 17:06:04,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossAjpPort=int:'8702' >2019-02-26 17:06:04,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossDebugAddress=str:'127.0.0.1:8787' >2019-02-26 17:06:04,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossDirectHttpPort=NoneType:'None' >2019-02-26 17:06:04,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossDirectHttpsPort=NoneType:'None' >2019-02-26 17:06:04,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossHttpPort=int:'8080' >2019-02-26 17:06:04,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossHttpsPort=int:'8443' >2019-02-26 17:06:04,702+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,702+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.provisioning.postgres.Plugin._init >2019-02-26 17:06:04,703+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumAnalyzeScaleFactor=float:'0.075' >2019-02-26 17:06:04,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumMaintenanceWorkMem=int:'65536' >2019-02-26 17:06:04,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumMaxWorkers=int:'6' >2019-02-26 17:06:04,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumVacuumScaleFactor=float:'0.01' >2019-02-26 17:06:04,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresLCMessages=str:''en_US.UTF-8'' >2019-02-26 17:06:04,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresListenAddress=str:''*'' >2019-02-26 17:06:04,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresMaxConn=int:'150' >2019-02-26 17:06:04,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresUpgradeCleanold=bool:'False' >2019-02-26 17:06:04,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresUpgradeInplace=bool:'False' >2019-02-26 17:06:04,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresWorkMemKb=int:'8192' >2019-02-26 17:06:04,704+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,704+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.apache.Plugin._init >2019-02-26 17:06:04,705+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/httpdService=str:'httpd' >2019-02-26 17:06:04,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/needRestart=bool:'False' >2019-02-26 17:06:04,705+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,706+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.environment.Plugin._init >2019-02-26 17:06:04,706+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/groupKvm=str:'kvm' >2019-02-26 17:06:04,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userApache=str:'apache' >2019-02-26 17:06:04,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userPostgres=str:'postgres' >2019-02-26 17:06:04,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userRoot=str:'root' >2019-02-26 17:06:04,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userVdsm=str:'vdsm' >2019-02-26 17:06:04,707+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,707+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.config.dwh_uuid.Plugin._init >2019-02-26 17:06:04,708+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,708+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CORE/uuid=NoneType:'None' >2019-02-26 17:06:04,708+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,709+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.misc.Plugin._init >2019-02-26 17:06:04,710+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.service.Plugin._init >2019-02-26 17:06:04,710+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/dwhServiceStopNeeded=bool:'False' >2019-02-26 17:06:04,710+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,711+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.config.Plugin._init >2019-02-26 17:06:04,711+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/dwhDbBackupDir=str:'/var/lib/ovirt-engine-dwh/backups' >2019-02-26 17:06:04,712+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,712+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection.Plugin._init >2019-02-26 17:06:04,713+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/connection=NoneType:'None' >2019-02-26 17:06:04,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/dumper=str:'pg_custom' >2019-02-26 17:06:04,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/filter=NoneType:'None' >2019-02-26 17:06:04,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/needDBMSUpgrade=bool:'False' >2019-02-26 17:06:04,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/newDatabase=bool:'True' >2019-02-26 17:06:04,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/restoreJobs=int:'2' >2019-02-26 17:06:04,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/statement=NoneType:'None' >2019-02-26 17:06:04,714+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,714+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._init >2019-02-26 17:06:04,715+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.pgpass.Plugin._init >2019-02-26 17:06:04,716+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/pgPassFile=NoneType:'None' >2019-02-26 17:06:04,716+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,716+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.ovirt_imageio_proxy.core.Plugin._init >2019-02-26 17:06:04,717+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyStopNeeded=bool:'False' >2019-02-26 17:06:04,717+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,718+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.vmconsole_proxy_helper.core.Plugin._init >2019-02-26 17:06:04,718+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/vmconsoleProxyStopNeeded=bool:'False' >2019-02-26 17:06:04,719+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,719+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_common.websocket_proxy.core.Plugin._init >2019-02-26 17:06:04,719+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,720+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyStopNeeded=bool:'False' >2019-02-26 17:06:04,720+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,720+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.base.core.misc.Plugin._init >2019-02-26 17:06:04,721+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,721+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/action=str:'setup' >2019-02-26 17:06:04,721+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,722+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.base.dialog.preview.Plugin._init >2019-02-26 17:06:04,722+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,722+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DIALOG/confirmSettings=NoneType:'None' >2019-02-26 17:06:04,723+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,723+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._init >2019-02-26 17:06:04,723+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,724+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallChangesReview=NoneType:'None' >2019-02-26 17:06:04,724+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/validFirewallManagers=str:'' >2019-02-26 17:06:04,724+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,725+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.base.system.environment.Plugin._init >2019-02-26 17:06:04,725+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,725+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/groupEngine=str:'ovirt' >2019-02-26 17:06:04,725+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userEngine=str:'ovirt' >2019-02-26 17:06:04,725+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,726+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.cinderlib.core.misc.Plugin._init >2019-02-26 17:06:04,727+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._init >2019-02-26 17:06:04,727+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,727+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_PROVISIONING/postgresProvisioningEnabled=NoneType:'None' >2019-02-26 17:06:04,728+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,728+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.engine.Plugin._init >2019-02-26 17:06:04,729+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,729+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configFileOvirtEngine=str:'/etc/httpd/conf.d/z-ovirt-engine-proxy.conf' >2019-02-26 17:06:04,729+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,730+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._init >2019-02-26 17:06:04,730+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,730+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configFileOvirtRoot=str:'/etc/httpd/conf.d/ovirt-engine-root-redirect.conf' >2019-02-26 17:06:04,730+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configureRootRedirection=NoneType:'None' >2019-02-26 17:06:04,731+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,731+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._init >2019-02-26 17:06:04,732+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._init >2019-02-26 17:06:04,733+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,733+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/aaaJdbcPackage=str:'ovirt-engine-extension-aaa-jdbc' >2019-02-26 17:06:04,733+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,734+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._init >2019-02-26 17:06:04,734+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,734+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/applicationMode=NoneType:'None' >2019-02-26 17:06:04,735+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,735+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.domain_type.Plugin._init >2019-02-26 17:06:04,735+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,736+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/storageIsLocal=bool:'False' >2019-02-26 17:06:04,736+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/storageType=NoneType:'None' >2019-02-26 17:06:04,736+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,737+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.iso_domain.Plugin._init >2019-02-26 17:06:04,737+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,737+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainDefaultMountPoint=str:'/var/lib/exports/iso' >2019-02-26 17:06:04,737+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,738+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.java.Plugin._init >2019-02-26 17:06:04,738+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,738+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineHeapMax=NoneType:'None' >2019-02-26 17:06:04,738+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineHeapMin=NoneType:'None' >2019-02-26 17:06:04,739+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,739+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.notifier.Plugin._init >2019-02-26 17:06:04,740+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,740+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/ignoreVdsgroupInNotifier=NoneType:'None' >2019-02-26 17:06:04,740+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,741+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.public_glance_repository.Plugin._init >2019-02-26 17:06:04,741+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,741+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/addOvirtGlanceRepository=bool:'True' >2019-02-26 17:06:04,742+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,742+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.storage.Plugin._init >2019-02-26 17:06:04,743+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.misc.Plugin._init >2019-02-26 17:06:04,744+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._init >2019-02-26 17:06:04,745+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,745+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/fixDbConfiguration=NoneType:'None' >2019-02-26 17:06:04,745+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/invalidConfigItems=NoneType:'None' >2019-02-26 17:06:04,745+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresExtraConfigItems=tuple:'()' >2019-02-26 17:06:04,745+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,746+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.vacuum.Plugin._init >2019-02-26 17:06:04,747+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.distro-rpm.packages.Plugin._init >2019-02-26 17:06:04,748+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,748+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/additionalPackages=str:'ovirt-host-deploy,ovirt-iso-uploader,ovirt-engine-ui-extensions,ovirt-web-ui' >2019-02-26 17:06:04,748+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/enginePackages=str:'ovirt-engine' >2019-02-26 17:06:04,748+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/engineSetupPackages=str:'ovirt-engine-setup' >2019-02-26 17:06:04,748+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,749+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._init >2019-02-26 17:06:04,749+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,749+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/firewalldServices=str:'ovn-central-firewall-service,ovirt-provider-ovn' >2019-02-26 17:06:04,749+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/firewalldServicesDir=str:'/usr/lib/firewalld/services' >2019-02-26 17:06:04,750+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,750+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._init >2019-02-26 17:06:04,751+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,751+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/pkiRenewalDocUrl=str:'https://www.ovirt.org/develop/release-management/features/infra/pki-renew/' >2019-02-26 17:06:04,751+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/entities=list:'[{'keepKey': True, 'extract': False, 'name': 'engine', 'user': 'OVESETUP_SYSTEM/userEngine'}, {'keepKey': False, 'extract': False, 'name': 'jboss', 'user': 'OVESETUP_SYSTEM/userEngine'}, {'keepKey': False, 'extract': True, 'name': 'websocket-proxy', 'user': 'OVESETUP_SYSTEM/userEngine'}, {'keepKey': False, 'extract': True, 'name': 'apache', 'user': 'OVESETUP_SYSTEM/userRoot'}, {'keepKey': False, 'extract': True, 'name': 'reports', 'user': 'OVESETUP_SYSTEM/userRoot'}, {'keepKey': False, 'extract': True, 'name': 'imageio-proxy', 'user': 'OVESETUP_SYSTEM/userRoot'}]' >2019-02-26 17:06:04,751+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/renew=NoneType:'None' >2019-02-26 17:06:04,751+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/storePassword=str:'**FILTERED**' >2019-02-26 17:06:04,751+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,752+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._init >2019-02-26 17:06:04,753+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,753+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresProvisioningEnabled=NoneType:'None' >2019-02-26 17:06:04,753+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,753+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._init >2019-02-26 17:06:04,754+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,754+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainACL=NoneType:'None' >2019-02-26 17:06:04,754+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,755+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._init >2019-02-26 17:06:04,755+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,756+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoPathsToUpload=list:'[]' >2019-02-26 17:06:04,756+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,757+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._init >2019-02-26 17:06:04,757+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,757+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckMinimumMB=int:'4096' >2019-02-26 17:06:04,757+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckRecommendedMB=int:'16384' >2019-02-26 17:06:04,757+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckThreshold=int:'90' >2019-02-26 17:06:04,758+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,758+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._init >2019-02-26 17:06:04,759+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,759+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/nfsConfigEnabled=NoneType:'None' >2019-02-26 17:06:04,759+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/nfsServiceName=NoneType:'None' >2019-02-26 17:06:04,759+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,760+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._init >2019-02-26 17:06:04,760+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,760+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ASYNC/clearTasks=bool:'True' >2019-02-26 17:06:04,760+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ASYNC/clearTasksWait=int:'20' >2019-02-26 17:06:04,761+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,762+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations.Plugin._init >2019-02-26 17:06:04,762+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,762+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/fixDbViolations=NoneType:'None' >2019-02-26 17:06:04,762+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,763+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.core.Plugin._init >2019-02-26 17:06:04,763+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,763+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/enable=bool:'False' >2019-02-26 17:06:04,764+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,765+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.misc.Plugin._init >2019-02-26 17:06:04,766+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._init >2019-02-26 17:06:04,766+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,766+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configFileSsl=str:'/etc/httpd/conf.d/ssl.conf' >2019-02-26 17:06:04,766+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configureSsl=NoneType:'None' >2019-02-26 17:06:04,767+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,767+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.jboss.Plugin._init >2019-02-26 17:06:04,768+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,768+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossNeeded=bool:'False' >2019-02-26 17:06:04,768+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,769+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin._init >2019-02-26 17:06:04,769+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,769+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/enableUpgrade=NoneType:'None' >2019-02-26 17:06:04,769+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockApply=list:'[]' >2019-02-26 17:06:04,770+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockFilter=list:'[]' >2019-02-26 17:06:04,770+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesSetup=list:'[]' >2019-02-26 17:06:04,770+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesUpgradeList=list:'[]' >2019-02-26 17:06:04,770+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,771+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._init >2019-02-26 17:06:04,775+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,776+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/shmmax=int:'68719476736' >2019-02-26 17:06:04,776+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,777+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh.Plugin._init >2019-02-26 17:06:04,778+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh_database.Plugin._init >2019-02-26 17:06:04,779+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._init >2019-02-26 17:06:04,780+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,780+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ENGINE_CONFIG/fqdn=NoneType:'None' >2019-02-26 17:06:04,780+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,781+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._init >2019-02-26 17:06:04,782+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,782+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/disconnectExistingDwh=NoneType:'None' >2019-02-26 17:06:04,782+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,783+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._init >2019-02-26 17:06:04,783+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,783+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/performBackup=NoneType:'None' >2019-02-26 17:06:04,784+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/restoreBackupLate=bool:'True' >2019-02-26 17:06:04,784+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,784+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.vacuum.Plugin._init >2019-02-26 17:06:04,786+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.distro-rpm.packages.Plugin._init >2019-02-26 17:06:04,786+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,787+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_RPMDISRO_PACKAGES=str:'ovirt-engine-dwh' >2019-02-26 17:06:04,787+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_RPMDISRO_PACKAGES_SETUP=str:'ovirt-engine-dwh-setup' >2019-02-26 17:06:04,787+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,788+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._init >2019-02-26 17:06:04,789+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._init >2019-02-26 17:06:04,789+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,789+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyHost=str:'localhost' >2019-02-26 17:06:04,789+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyPort=int:'54323' >2019-02-26 17:06:04,790+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,791+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._init >2019-02-26 17:06:04,791+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,791+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/pkiOIPCSRFilename=NoneType:'None' >2019-02-26 17:06:04,792+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,792+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._init >2019-02-26 17:06:04,793+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,793+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyPort=int:'2222' >2019-02-26 17:06:04,793+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,794+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._init >2019-02-26 17:06:04,795+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,795+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/groupVmConsole=str:'ovirt-vmconsole' >2019-02-26 17:06:04,795+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userVmConsole=str:'ovirt-vmconsole' >2019-02-26 17:06:04,795+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,796+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._init >2019-02-26 17:06:04,796+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,796+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyHost=str:'localhost' >2019-02-26 17:06:04,796+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyPort=int:'6100' >2019-02-26 17:06:04,797+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,797+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.packages.Plugin._init >2019-02-26 17:06:04,798+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,798+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_WSP_RPMDISTRO_PACKAGES=str:'ovirt-engine-websocket-proxy' >2019-02-26 17:06:04,798+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_WSP_RPMDISTRO_PACKAGES_SETUP=str:'ovirt-engine-setup-plugin-websocket-proxy' >2019-02-26 17:06:04,798+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,799+0100 DEBUG otopi.context context._executeMethod:127 Stage init METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._init >2019-02-26 17:06:04,799+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,800+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/pkiWSPCSRFilename=NoneType:'None' >2019-02-26 17:06:04,800+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,800+0100 INFO otopi.context context.runSequence:610 Stage: Environment setup >2019-02-26 17:06:04,800+0100 DEBUG otopi.context context.runSequence:614 STAGE setup >2019-02-26 17:06:04,801+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._setup_existence >2019-02-26 17:06:04,801+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:04,803+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._setup_existence >2019-02-26 17:06:04,804+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.core.config.Plugin._post_init >2019-02-26 17:06:04,804+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf', '/tmp/answerfile-20190226170545Z.txt'] >2019-02-26 17:06:04,805+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.core.log.Plugin._setup >2019-02-26 17:06:04,806+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log >2019-02-26 17:06:04,807+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.core.misc.Plugin._setup >2019-02-26 17:06:04,807+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Version: otopi-1.8.1_master (otopi-1.8.1-0.0.master.20190124100205.git34f4bf3.el7) >2019-02-26 17:06:04,809+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._setup >2019-02-26 17:06:04,809+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:04,810+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._setup >2019-02-26 17:06:04,812+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Cleaning caches: ['expire-cache']. >2019-02-26 17:06:04,819+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_root_ssh.Plugin._setup >2019-02-26 17:06:04,819+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,819+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineSetupStyles=list:'[<otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_root_ssh._RootSshManager object at 0x7f1fdf5ab6d0>]' >2019-02-26 17:06:04,820+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,820+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.network.firewalld.Plugin._setup >2019-02-26 17:06:04,821+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,821+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/firewall-cmd=NoneType:'None' >2019-02-26 17:06:04,821+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/python3=NoneType:'None' >2019-02-26 17:06:04,821+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,822+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.network.hostname.Plugin._setup >2019-02-26 17:06:04,822+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,822+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ip=NoneType:'None' >2019-02-26 17:06:04,823+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,824+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.services.openrc.Plugin._setup >2019-02-26 17:06:04,824+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,824+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/rc=NoneType:'None' >2019-02-26 17:06:04,824+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/rc-update=NoneType:'None' >2019-02-26 17:06:04,825+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,825+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.services.rhel.Plugin._setup >2019-02-26 17:06:04,826+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,826+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/chkconfig=NoneType:'None' >2019-02-26 17:06:04,826+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/initctl=NoneType:'None' >2019-02-26 17:06:04,826+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/service=NoneType:'None' >2019-02-26 17:06:04,826+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/systemctl=NoneType:'None' >2019-02-26 17:06:04,827+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,827+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.services.systemd.Plugin._setup >2019-02-26 17:06:04,829+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.system.clock.Plugin._setup >2019-02-26 17:06:04,829+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,829+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/chronyc=NoneType:'None' >2019-02-26 17:06:04,829+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/date=NoneType:'None' >2019-02-26 17:06:04,829+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/hwclock=NoneType:'None' >2019-02-26 17:06:04,829+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ntpq=NoneType:'None' >2019-02-26 17:06:04,830+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,831+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.otopi.system.reboot.Plugin._setup >2019-02-26 17:06:04,831+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,831+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/reboot=NoneType:'None' >2019-02-26 17:06:04,832+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,833+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._setup >2019-02-26 17:06:04,835+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf file_group_core: aggregated_lines = {} >2019-02-26 17:06:04,835+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf unremovable: aggregated_lines = {} >2019-02-26 17:06:04,835+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf file_group_ca_config: aggregated_lines = {} >2019-02-26 17:06:04,836+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf file_group_ovirt_dwh_files: aggregated_lines = {} >2019-02-26 17:06:04,836+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf file_group_ovirt-provider-ovn: aggregated_lines = {} >2019-02-26 17:06:04,836+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf file_group_vmconsole_proxy_helper_pki: aggregated_lines = {} >2019-02-26 17:06:04,836+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf file_group_ca_pki: aggregated_lines = {} >2019-02-26 17:06:04,836+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf file_group_vmconsole_proxy_pki: aggregated_lines = {} >2019-02-26 17:06:04,837+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf file_group_versionlock_conf: aggregated_lines = {'/etc/yum/pluginconf.d/versionlock.conf': [{'added': 'follow_obsoletes=1'}]} >2019-02-26 17:06:04,837+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf file_group_versionlock: aggregated_lines = {'/etc/yum/pluginconf.d/versionlock.list': [{'added': 'ovirt-engine-tools-backup-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-wildfly-14.0.1-3.el7.x86_64'}, {'added': 'ovirt-engine-restapi-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-dbscripts-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-dwh-4.3.0-1.el7.noarch'}, {'added': 'ovirt-engine-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-webadmin-portal-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-ui-extensions-1.0.3-1.el7.noarch'}, {'added': 'ovirt-engine-backend-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-wildfly-overlay-14.0.1-3.el7.noarch'}, {'added': 'ovirt-engine-extension-aaa-jdbc-1.1.8-1.el7.noarch'}, {'added': 'ovirt-engine-tools-4.3.0.4-1.el7.noarch'}]} >2019-02-26 17:06:04,837+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf file_group_ssl: aggregated_lines = {'/etc/httpd/conf.d/ssl.conf': [{'added': 'SSLCACertificateFile /etc/pki/ovirt-engine/apache-ca.pem'}, {'removed': 'SSLProtocol all -SSLv2 -SSLv3', 'added': '# SSLProtocol all -SSLv2 -SSLv3'}, {'removed': 'SSLCertificateKeyFile /etc/pki/tls/private/localhost.key', 'added': '# SSLCertificateKeyFile /etc/pki/tls/private/localhost.key'}, {'added': 'SSLCertificateKeyFile /etc/pki/ovirt-engine/keys/apache.key.nopass'}, {'removed': 'SSLCertificateFile /etc/pki/tls/certs/localhost.crt', 'added': '# SSLCertificateFile /etc/pki/tls/certs/localhost.crt'}, {'added': 'SSLCertificateFile /etc/pki/ovirt-engine/certs/apache.cer'}, {'removed': 'SSLProtocol all -SSLv2 -SSLv3', 'added': '# SSLProtocol all -SSLv2 -SSLv3'}, {'added': 'SSLProtocol all -SSLv3 -TLSv1'}, {'added': 'SSLCertificateKeyFile /etc/pki/ovirt-engine/keys/apache.key.nopass'}, {'added': 'SSLProtocol all -SSLv3 -TLSv1'}, {'removed': 'SSLCertificateFile /etc/pki/tls/certs/localhost.crt', 'added': '# SSLCertificateFile /etc/pki/tls/certs/localhost.crt'}, {'added': 'SSLCACertificateFile /etc/pki/ovirt-engine/apache-ca.pem'}, {'removed': 'SSLCertificateKeyFile /etc/pki/tls/private/localhost.key', 'added': '# SSLCertificateKeyFile /etc/pki/tls/private/localhost.key'}, {'added': 'SSLCertificateFile /etc/pki/ovirt-engine/certs/apache.cer'}]} >2019-02-26 17:06:04,838+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164849-uninstall.conf unremovable: aggregated_lines = {} >2019-02-26 17:06:04,838+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164849-uninstall.conf file_group_versionlock_conf: aggregated_lines = {} >2019-02-26 17:06:04,838+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226164849-uninstall.conf file_group_versionlock: aggregated_lines = {'/etc/yum/pluginconf.d/versionlock.list': [{'added': 'ovirt-engine-tools-backup-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-wildfly-15.0.1-1.el7.x86_64'}, {'added': 'ovirt-engine-restapi-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-dbscripts-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-dwh-4.3.0-1.el7.noarch'}, {'added': 'ovirt-engine-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-webadmin-portal-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-ui-extensions-1.0.3-1.el7.noarch'}, {'added': 'ovirt-engine-backend-4.3.0.4-1.el7.noarch'}, {'added': 'ovirt-engine-wildfly-overlay-15.0.1-1.el7.noarch'}, {'added': 'ovirt-engine-extension-aaa-jdbc-1.1.8-1.el7.noarch'}, {'added': 'ovirt-engine-tools-4.3.0.4-1.el7.noarch'}]} >2019-02-26 17:06:04,839+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226170203-uninstall.conf file_group_core: aggregated_lines = {} >2019-02-26 17:06:04,839+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226170203-uninstall.conf unremovable: aggregated_lines = {} >2019-02-26 17:06:04,839+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226170203-uninstall.conf file_group_versionlock_conf: aggregated_lines = {} >2019-02-26 17:06:04,839+0100 DEBUG otopi.plugins.ovirt_engine_common.base.core.uninstall uninstall.getLines:209 getLines /etc/ovirt-engine/uninstall.d/20190226170203-uninstall.conf file_group_versionlock: aggregated_lines = {'/etc/yum/pluginconf.d/versionlock.list': [{'added': 'ovirt-engine-tools-backup-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-wildfly-15.0.1-1.el7.x86_64'}, {'added': 'ovirt-engine-restapi-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-dbscripts-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-dwh-4.3.1-0.0.master.20190110155219.el7.noarch'}, {'added': 'ovirt-engine-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-webadmin-portal-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-ui-extensions-1.0.3-1.el7.noarch'}, {'added': 'ovirt-engine-backend-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-wildfly-overlay-15.0.1-1.el7.noarch'}, {'added': 'ovirt-engine-extension-aaa-jdbc-1.1.8-1.el7.noarch'}, {'added': 'ovirt-engine-tools-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}]} >2019-02-26 17:06:04,843+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,843+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallFilesInfo=dict:'{'/etc/pki/ovirt-engine/keys/reports.key.nopass': {'sha256': '5786546ba359fa30cc1aafa2f8184920aff22a0242af8c896e622bff6915654a', 'groups': ['ca_pki'], 'changed': False}, '/etc/yum/pluginconf.d/versionlock.list': {'sha256': 'b24d4cbdd21257b2bd18a2d0c74215914c6c6af6669982db603ad5536c33c85c', 'groups': ['unremovable'], 'changed': False}, '/etc/httpd/conf.d/ovirt-engine-root-redirect.conf': {'sha256': '725e6910924daf7b0ee32850d87e5ca34044466a83bab52e4701b36007c0605e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/cacert.conf': {'sha256': '8e6283fb385e553115e552a728c83305e19b579b896d38366ef6cb2ecb47b369', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-vmconsole/ca.pub': {'sha256': 'b1ccf8cb0574165993635052971e3e446dfc113969163ee0090355661f3c6035', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/imageio-proxy.key.nopass': {'sha256': '05d63444b83788dda4b6587313614d25708e45d3a5453b86c724bf1649c15dcc', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-websocket-proxy.xml': {'sha256': 'a3e2c90d0f9376eae859c80ec34fdfeddddb14d71d8e4ce7ac5451caaf92c626', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/vmconsole-proxy-user-cert.pub': {'sha256': '97821c32d42b4922621ed7ff231c395e3fd7d1cc7ff7a0c1b60bdb783b144cbb', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-engine/.truststore': {'sha256': '0208bd660df27eb6f41b7b6bf7cc3d85172f4a20c212bed8ede03d76f30dee1f', 'groups': ['ca_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-postgres.xml': {'sha256': 'ec1497fa614341e63f87356f45d355725cffd002f88f9c06f4cc4d22b8c6a111', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/vmconsole-proxy-helper.cer': {'sha256': '489067aa36a0e7156a4f7b133b017ba157f79f8eaa8cbf7d94caf464ed988a2e', 'groups': ['vmconsole_proxy_helper_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-provider-ovn.xml': {'sha256': '160675cdc8b9f21799dc0a4e128c92a538c39e0b2a9211db2b1075791e72499e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/ca.pem': {'sha256': 'acab4732736542e99d9acd3889b7770137ebd9ce3b903058c56fd402ce3bb2b5', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/certs/vmconsole-proxy-host-cert.pub': {'sha256': '6f42b0a2b51944325376725c5d296d6a40800e0b3f05ff530862a90aeb98f9fa', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf': {'sha256': '148cc4885960c035e4a144e8be309ee5387341a1141a7ffb84c103b30cfb1c57', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/extensions.d/internal-authz.properties': {'sha256': '8f725950bc98cf5ebc90b49a7164232bbc96dba496cdff49fb8695810c3ed25d', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovn-central-firewall-service.xml': {'sha256': '5e333ccf96a4ced8db8c7d6fce1103a9176d8ed6dd92aa3c65b4591019610479', 'groups': ['core'], 'changed': False}, '/etc/httpd/conf.d/ssl.conf': {'sha256': '16a0d7280fa0233a430b95a9e26ed932cc1cd37d95f97503c49bdcb278e46f34', 'groups': ['unremovable'], 'changed': False}, '/etc/pki/ovirt-engine/certs/ovn-ndb.cer': {'sha256': '6f9f3b3975cc56949fad8f2436ae13147060ac0d885524d27556e95defdeab4a', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-vmconsole-proxy.xml': {'sha256': '79572b94e2659e3fa00e05daef86ed585eb4c0b0fa2bf1a294f3931d682aaa43', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovirt-https.xml': {'sha256': '4c9dcba46006fd50fc5b3c2cae4c80b511a0b1cb85d8485564396e792227ed74', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/cacert.template': {'sha256': '8e6283fb385e553115e552a728c83305e19b579b896d38366ef6cb2ecb47b369', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf': {'sha256': '4b7456eb6f9fd945cf73d0c4ee42ba7eef326e7242f5c4bd1bbdecaa2640b4f5', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-http.xml': {'sha256': 'dae71c32b5e1f48169289864a4b6aaf0f05ed275411ca0e48f754bee38839c4b', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovirt-imageio-proxy.xml': {'sha256': '9fd6c2d442292be1a3e2bb76e01be7fdd48109581f6fcc74ca695f4fe5d70fce', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/cert.conf': {'sha256': 'f5e5f1f639a3739b1706f70908185225aa54737a03750461ce79be9182959bd3', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-uuid.conf': {'sha256': '89207814d037350e2145bf137a5b97ed7452d5c67af825a6af237ed0d6b12e6b', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_user_rsa-cert.pub': {'sha256': '97821c32d42b4922621ed7ff231c395e3fd7d1cc7ff7a0c1b60bdb783b144cbb', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-engine/certs/ovn-sdb.cer': {'sha256': '0e95c592994203f493a1748c63c70a1ef4258bfd3524748db062305ba7c46e5f', 'groups': ['ca_pki'], 'changed': False}, '/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf': {'sha256': 'e473a6d26516e2d53f2656419e2b972e7b8a98fabf8062152dd658cc87803103', 'groups': ['core', 'unremovable'], 'changed': False}, '/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf': {'sha256': '756d8fd6fc3dba3fbcdbb67f976fdcd3674d142186acba1f2d1f49eef9e4b90d', 'groups': ['core', 'unremovable'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-pki.conf': {'sha256': '473acc826d85e13c12a1963408c09236c0ae0df3dd273d01c2662615857c908c', 'groups': ['ca_config'], 'changed': False}, '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf': {'sha256': 'a56c71dbd4ffa4c4ef5e2242ba293c74526a6639e0ad74dcde0d0194e3385da4', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/ovirt-imageio-proxy/ovirt-imageio-proxy.conf': {'sha256': 'f318c37839090c1293601e99c175df6de5c031789402484cb87047c61cd67b1e', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf': {'sha256': '787af541ce3a5f3cc94a8cc5b69836185c85eb27ac7674968829fda2295fe5e8', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/firewalld/services/ovirt-vmconsole-proxy.xml': {'sha256': '79572b94e2659e3fa00e05daef86ed585eb4c0b0fa2bf1a294f3931d682aaa43', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-dwh-database.conf': {'sha256': 'c9ca6fb104a7f278d8f8967305eca046e08aa32925671dd4b000665cc6d5dc21', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-java.conf': {'sha256': '428cf474ba75072c2b43094d28531b8e20de57d5a61804cbe1e73e29b03d4d9a', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/ovirt-provider-ovn-conf.example': {'sha256': 'd103404352547707ef1c5e7554d8b9cfa46565831f7f5dac2b22c860b0676df6', 'groups': ['ovirt-provider-ovn'], 'changed': False}, '/etc/ovirt-engine/isouploader.conf.d/10-engine-setup.conf': {'sha256': '78a4331e420caa644e54eb50d27feabaab74640be84a8bc63d1db8a1ed907782', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/11-setup-sso.conf': {'sha256': 'c9e19cc3a7cfee6b7ba4ab2558173415609f524e920a72a0b24a0f90cc05c1bf', 'groups': ['core'], 'changed': False}, '/etc/yum/pluginconf.d/versionlock.conf': {'sha256': '7704b1e5aec28208978d1d82ea7426741f5a46c603058bfc0c40caaeffabddf4', 'groups': ['unremovable'], 'changed': False}, '/etc/pki/ovirt-engine/certs/apache.cer': {'sha256': '7266f5cf82cf35bf7a56b00a45ae44148cfeca3253b41973acad045f1cca8f06', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/iptables.example': {'sha256': '0bcb04737d92298c4d073c0eb5a341b121861b6840871a87615f67e39c91a03e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/apache.key.nopass': {'sha256': 'eeeebb779eef7f386e9134e173f1522da4568f66c7fa54cda05acdbe75cbf2ad', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/apache-ca.pem': {'sha256': 'acab4732736542e99d9acd3889b7770137ebd9ce3b903058c56fd402ce3bb2b5', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/aaa/internal.properties': {'sha256': '1c543148b3d3a613237a61a7d37929a437d45189f5a59c339e82219bb895acc3', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/vmconsole-proxy-helper.key.nopass': {'sha256': '83ff5b10f2e9e4db76f696330a5a5a6e6ae137a0ff7e88be4143f3c0f157c872', 'groups': ['vmconsole_proxy_helper_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-imageio-proxy.xml': {'sha256': '9fd6c2d442292be1a3e2bb76e01be7fdd48109581f6fcc74ca695f4fe5d70fce', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/websocket-proxy.cer': {'sha256': '20dee3e913e8e1c080f97b76e6a97f755cd6639bd9b2da3630b06ebbebf256ea', 'groups': ['ca_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-websocket-proxy.xml': {'sha256': 'a3e2c90d0f9376eae859c80ec34fdfeddddb14d71d8e4ce7ac5451caaf92c626', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/extensions.d/internal-authn.properties': {'sha256': 'e2cecb90c9c076747d578e225899b4b42a167a94f7df871a630fefded4faaf0b', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine-dwh/examples/10-setup-dwh-database.conf': {'sha256': '88a531652eb7ed1e67ddca7d0079f22bbe79c6977d572d0852f19eb7efe48845', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/pki/ovirt-engine/cert.template': {'sha256': 'f5e5f1f639a3739b1706f70908185225aa54737a03750461ce79be9182959bd3', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-database.conf': {'sha256': '5e9fed213d2d7e67092f4085f0a700b1eff6637e47d2d5ad8eaf894ac1bada87', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-https.xml': {'sha256': '4c9dcba46006fd50fc5b3c2cae4c80b511a0b1cb85d8485564396e792227ed74', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-cinderlib.conf': {'sha256': '91908e56616762d7f15da4e753e4581583d5ffa2d6199ae1b84b47cbf68ca82b', 'groups': ['core'], 'changed': False}, '/etc/ovirt-provider-ovn/conf.d/10-setup-ovirt-provider-ovn.conf': {'sha256': 'd103404352547707ef1c5e7554d8b9cfa46565831f7f5dac2b22c860b0676df6', 'groups': ['ovirt-provider-ovn'], 'changed': False}, '/etc/pki/ovirt-engine/private/ca.pem': {'sha256': '1df8e07c30f8f1fd4418fe808e9e22e94d699b4ce92ff356135d82659352ba81', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/ovn-sdb.key.nopass': {'sha256': '22afb845e5ce0c97857cdec190475805fba9e4e58173a13288d6d7074f0710f2', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/websocket-proxy.key.nopass': {'sha256': '08656d2d49c6ce8d42851b1288ce249052b3d1aac34c82eea7b66185b12cb90a', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-jboss.conf': {'sha256': '42db91c01eaa61ad8bbfe74c4de198be7287a09bd8cc1fc2c95bbc844c381d1f', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf': {'sha256': '1586d0f9f0839f12acd9210b89edb712f301a2b2070cf0ba59ea20c4d8eb8c3f', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_host_rsa-cert.pub': {'sha256': '6f42b0a2b51944325376725c5d296d6a40800e0b3f05ff530862a90aeb98f9fa', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/ovirt-engine/notifier/notifier.conf.d/10-setup-jboss.conf': {'sha256': '42db91c01eaa61ad8bbfe74c4de198be7287a09bd8cc1fc2c95bbc844c381d1f', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/logcollector.conf.d/10-engine-setup.conf': {'sha256': 'b57b6a8a257ba92441a3e2047e26003f5d9d16bc347f751773df6966670b1686', 'groups': ['core'], 'changed': False}, '/etc/httpd/conf.d/z-ovirt-engine-proxy.conf': {'sha256': 'bb2da5e6a7eb055ac75a7d29efaae581f6545eb23997bde2355b6e542eefa9d9', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-provider-ovn.xml': {'sha256': '160675cdc8b9f21799dc0a4e128c92a538c39e0b2a9211db2b1075791e72499e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/engine_id_rsa': {'sha256': '97c8f82a0ab8d5952fbbece09ac62801999ca3eac95fe905c432099adbf80ee4', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/imageio-proxy.cer': {'sha256': '0c50c7e8405172cf578dec8d44351702030e2b69fb466925881d9e2cf2b5e67a', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/ovirt-provider-ovn.key.nopass': {'sha256': 'f3c52037a36d94a84b28a017387aecfb0cfba9becb42539870787d13c02d0439', 'groups': ['ca_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-http.xml': {'sha256': 'dae71c32b5e1f48169289864a4b6aaf0f05ed275411ca0e48f754bee38839c4b', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/ovirt-provider-ovn.cer': {'sha256': 'cd96751d90af0d9530d627c8e018225bd3af6a2e32033e3c3abc5b8c97751827', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovn-central-firewall-service.xml': {'sha256': '5e333ccf96a4ced8db8c7d6fce1103a9176d8ed6dd92aa3c65b4591019610479', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_host_rsa': {'sha256': '98ce9eed1124a50f7863abc4e8c9fe3348459d439d8b83b560c9ae4c9964b2cc', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_user_rsa': {'sha256': 'd6da744a31597c598968586a2293e0cf7865a7a8a0a55a6703bc95086975102d', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/ovirt-vmconsole/ovirt-vmconsole-proxy/conf.d/20-ovirt-vmconsole-proxy-helper.conf': {'sha256': '545cc02604213084f5c397dd5f84d3827dcc8b7a226d07c0be6dbace037dae1b', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-postgres.xml': {'sha256': 'ec1497fa614341e63f87356f45d355725cffd002f88f9c06f4cc4d22b8c6a111', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovirt-fence-kdump-listener.xml': {'sha256': '3935d1dd81240dbd3578c39e32593c31e2441a3939055383b5f8c19ed2581025', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-fence-kdump-listener.xml': {'sha256': '3935d1dd81240dbd3578c39e32593c31e2441a3939055383b5f8c19ed2581025', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/ovirt-vmconsole-proxy-helper.conf.d/10-setup.conf': {'sha256': '910757bc728db6844a1d2ae3c8b5c59b8998c2c6eda1f9368e8703131fa0940f', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/vmconsole-proxy-helper.p12': {'sha256': '2a7222eb6ce9ec43ca1667a77bda949f784a20f829a50c4f651e8bb2d97857f6', 'groups': ['vmconsole_proxy_helper_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/ovn-ndb.key.nopass': {'sha256': '4720b1b2f579ad730346f446b4e6569494b2af48d6d43d518a9b424a2ea1c28c', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/certs/reports.cer': {'sha256': '24b6b068b64a11b3c4e71fca2e4e4a5172a801c879802a8d8af7a6cac59f398e', 'groups': ['ca_pki'], 'changed': False}}' >2019-02-26 17:06:04,843+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallGroupsDescriptions=dict:'{'core': 'Core files', 'ca_pki': 'PKI keys', 'ovirt-provider-ovn': 'ovirt-provider-ovn configuration files', 'ssl': 'Apache SSL configuration', 'ca_config': 'PKI configuration', 'vmconsole_proxy_helper_pki': 'VMConsole Helper PKI keys', 'versionlock_conf': 'Versionlock Plugin Configuration', 'versionlock': 'YUM version locking configuration', 'ovirt_dwh_files': 'DWH files', 'vmconsole_proxy_pki': 'VMConsole PKI Proxy keys'}' >2019-02-26 17:06:04,843+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallLinesInfo=dict:'{'/etc/httpd/conf.d/ssl.conf': [{'added': 'SSLCACertificateFile /etc/pki/ovirt-engine/apache-ca.pem'}, {'removed': 'SSLProtocol all -SSLv2 -SSLv3', 'added': '# SSLProtocol all -SSLv2 -SSLv3'}, {'removed': 'SSLCertificateKeyFile /etc/pki/tls/private/localhost.key', 'added': '# SSLCertificateKeyFile /etc/pki/tls/private/localhost.key'}, {'added': 'SSLCertificateKeyFile /etc/pki/ovirt-engine/keys/apache.key.nopass'}, {'removed': 'SSLCertificateFile /etc/pki/tls/certs/localhost.crt', 'added': '# SSLCertificateFile /etc/pki/tls/certs/localhost.crt'}, {'added': 'SSLCertificateFile /etc/pki/ovirt-engine/certs/apache.cer'}, {'removed': 'SSLProtocol all -SSLv2 -SSLv3', 'added': '# SSLProtocol all -SSLv2 -SSLv3'}, {'added': 'SSLProtocol all -SSLv3 -TLSv1'}, {'added': 'SSLCertificateKeyFile /etc/pki/ovirt-engine/keys/apache.key.nopass'}, {'added': 'SSLProtocol all -SSLv3 -TLSv1'}, {'removed': 'SSLCertificateFile /etc/pki/tls/certs/localhost.crt', 'added': '# SSLCertificateFile /etc/pki/tls/certs/localhost.crt'}, {'added': 'SSLCACertificateFile /etc/pki/ovirt-engine/apache-ca.pem'}, {'removed': 'SSLCertificateKeyFile /etc/pki/tls/private/localhost.key', 'added': '# SSLCertificateKeyFile /etc/pki/tls/private/localhost.key'}, {'added': 'SSLCertificateFile /etc/pki/ovirt-engine/certs/apache.cer'}], '/etc/yum/pluginconf.d/versionlock.list': [{'added': 'ovirt-engine-tools-backup-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-wildfly-15.0.1-1.el7.x86_64'}, {'added': 'ovirt-engine-restapi-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-dbscripts-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-dwh-4.3.1-0.0.master.20190110155219.el7.noarch'}, {'added': 'ovirt-engine-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-webadmin-portal-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-ui-extensions-1.0.3-1.el7.noarch'}, {'added': 'ovirt-engine-backend-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-wildfly-overlay-15.0.1-1.el7.noarch'}, {'added': 'ovirt-engine-extension-aaa-jdbc-1.1.8-1.el7.noarch'}, {'added': 'ovirt-engine-tools-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}], '/etc/yum/pluginconf.d/versionlock.conf': [{'added': 'follow_obsoletes=1'}]}' >2019-02-26 17:06:04,844+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,845+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._setup_common_titles >2019-02-26 17:06:04,845+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,845+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/needCommonTitles=bool:'True' >2019-02-26 17:06:04,846+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,847+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_firewalld.Plugin._setup >2019-02-26 17:06:04,847+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,847+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallManagers=list:'[<otopi.plugins.ovirt_engine_common.base.network.firewall_manager_firewalld._FirewalldManager object at 0x7f1fdf5ab9d0>]' >2019-02-26 17:06:04,848+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,849+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_human.Plugin._setup >2019-02-26 17:06:04,849+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,850+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallManagers=list:'[<otopi.plugins.ovirt_engine_common.base.network.firewall_manager_firewalld._FirewalldManager object at 0x7f1fdf5ab9d0>, <otopi.plugins.ovirt_engine_common.base.network.firewall_manager_human._HumanManager object at 0x7f1fdf5abd90>]' >2019-02-26 17:06:04,850+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,851+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.network.firewall_manager_iptables.Plugin._setup >2019-02-26 17:06:04,852+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,852+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallManagers=list:'[<otopi.plugins.ovirt_engine_common.base.network.firewall_manager_firewalld._FirewalldManager object at 0x7f1fdf5ab9d0>, <otopi.plugins.ovirt_engine_common.base.network.firewall_manager_human._HumanManager object at 0x7f1fdf5abd90>, <otopi.plugins.ovirt_engine_common.base.network.firewall_manager_iptables._IpTablesManager object at 0x7f1fdf5abdd0>]' >2019-02-26 17:06:04,852+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,853+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.network.hostname.Plugin._setup >2019-02-26 17:06:04,853+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,854+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/dig=NoneType:'None' >2019-02-26 17:06:04,854+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,855+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine.Plugin._setup >2019-02-26 17:06:04,856+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,856+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/remoteEngine=RemoteEngine:'<ovirt_engine_setup.remote_engine.RemoteEngine object at 0x7f1fdf5ab490>' >2019-02-26 17:06:04,857+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,858+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_manual_files.Plugin._setup >2019-02-26 17:06:04,858+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,858+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineSetupStyles=list:'[<otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_root_ssh._RootSshManager object at 0x7f1fdf5ab6d0>, <otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_manual_files._ManualFiles object at 0x7f1fdf5ab910>]' >2019-02-26 17:06:04,859+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,860+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._setup >2019-02-26 17:06:04,861+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.system.mem.Plugin._setup >2019-02-26 17:06:04,862+0100 DEBUG otopi.plugins.ovirt_engine_common.base.system.mem mem._setup:47 Checking total memory >2019-02-26 17:06:04,863+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,863+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/totalMemoryMB=int:'15715' >2019-02-26 17:06:04,863+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,864+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._setup >2019-02-26 17:06:04,864+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,864+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/restorecon=NoneType:'None' >2019-02-26 17:06:04,865+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/selinuxenabled=NoneType:'None' >2019-02-26 17:06:04,865+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/semanage=NoneType:'None' >2019-02-26 17:06:04,866+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,866+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.connection.Plugin._setup >2019-02-26 17:06:04,870+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.connection.Plugin._setup >2019-02-26 17:06:04,873+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select 1 > ', args: {} >2019-02-26 17:06:04,873+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:04,877+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'?column?': 1}] >2019-02-26 17:06:04,877+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.tryDatabaseConnect:399 Connection succeeded >2019-02-26 17:06:04,878+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select count(*) as count > from pg_catalog.pg_tables > where schemaname = 'public'; > ', args: {} >2019-02-26 17:06:04,878+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:04,882+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'count': 161L}] >2019-02-26 17:06:04,882+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'SHOW server_version', args: {} >2019-02-26 17:06:04,882+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:04,885+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'server_version': '10.6'}] >2019-02-26 17:06:04,885+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.checkServerVersion:467 PostgreSQL server version: 10.6 >2019-02-26 17:06:04,885+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine.db.connection plugin.executeRaw:813 execute: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version'), executable='None', cwd='None', env=None >2019-02-26 17:06:04,891+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine.db.connection plugin.executeRaw:863 execute-result: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version'), rc=0 >2019-02-26 17:06:04,892+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine.db.connection plugin.execute:921 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version') stdout: >psql (PostgreSQL) 10.6 > >2019-02-26 17:06:04,892+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine.db.connection plugin.execute:926 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version') stderr: > > >2019-02-26 17:06:04,892+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.checkClientVersion:483 PostgreSQL client version: 10.6 >2019-02-26 17:06:04,892+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select version, option_value > from vdc_options > where option_name = %(name)s > ', args: {'name': 'DbJustRestored'} >2019-02-26 17:06:04,892+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:04,897+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'version': 'general', 'option_value': '0'}] >2019-02-26 17:06:04,898+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,898+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/newDatabase=bool:'False' >2019-02-26 17:06:04,898+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/password=str:'**FILTERED**' >2019-02-26 17:06:04,898+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/port=str:'5432' >2019-02-26 17:06:04,898+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/secured=bool:'False' >2019-02-26 17:06:04,898+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/securedHostValidation=bool:'False' >2019-02-26 17:06:04,899+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,900+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.core.protocols.Plugin._setup >2019-02-26 17:06:04,900+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,900+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/publicHttpPort=int:'80' >2019-02-26 17:06:04,900+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/publicHttpsPort=int:'443' >2019-02-26 17:06:04,901+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,902+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.apache.Plugin._setup >2019-02-26 17:06:04,904+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.config.dwh_uuid.Plugin._setup >2019-02-26 17:06:04,906+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,906+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CORE/uuid=str:'bf29a673-1ae8-45e3-b07f-4f56faa3e4a5' >2019-02-26 17:06:04,906+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,907+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.misc.Plugin._setup >2019-02-26 17:06:04,907+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.misc misc._setup:66 dwh version: ovirt-engine-dwh-4.3.1_master (4.3.1_master) > >2019-02-26 17:06:04,908+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,908+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/setupAttributesModules=list:'[<module 'ovirt_engine_setup.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/constants.pyc'>, <module 'ovirt_engine_setup.engine_common.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/constants.pyc'>, <module 'ovirt_engine_setup.engine.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/constants.pyc'>, <module 'ovirt_engine_setup.cinderlib.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/cinderlib/constants.pyc'>, <module 'ovirt_engine_setup.websocket_proxy.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/websocket_proxy/constants.pyc'>, <module 'ovirt_engine_setup.dwh.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/dwh/constants.pyc'>]' >2019-02-26 17:06:04,908+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/ovirt_dwh_files=list:'[]' >2019-02-26 17:06:04,908+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_LINES_GROUP/ovirt_dwh_files=dict:'{}' >2019-02-26 17:06:04,909+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,909+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection.Plugin._commands >2019-02-26 17:06:04,911+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection.Plugin._setup >2019-02-26 17:06:04,912+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select 1 > ', args: {} >2019-02-26 17:06:04,912+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:04,915+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'?column?': 1}] >2019-02-26 17:06:04,915+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.tryDatabaseConnect:399 Connection succeeded >2019-02-26 17:06:04,915+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select count(*) as count > from pg_catalog.pg_tables > where schemaname = 'public'; > ', args: {} >2019-02-26 17:06:04,916+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:04,920+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'count': 40L}] >2019-02-26 17:06:04,920+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'SHOW server_version', args: {} >2019-02-26 17:06:04,920+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:04,923+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'server_version': '10.6'}] >2019-02-26 17:06:04,923+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.checkServerVersion:467 PostgreSQL server version: 10.6 >2019-02-26 17:06:04,923+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection plugin.executeRaw:813 execute: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version'), executable='None', cwd='None', env=None >2019-02-26 17:06:04,929+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection plugin.executeRaw:863 execute-result: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version'), rc=0 >2019-02-26 17:06:04,929+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection plugin.execute:921 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version') stdout: >psql (PostgreSQL) 10.6 > >2019-02-26 17:06:04,930+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.connection plugin.execute:926 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version') stderr: > > >2019-02-26 17:06:04,930+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.checkClientVersion:483 PostgreSQL client version: 10.6 >2019-02-26 17:06:04,931+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,931+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/newDatabase=bool:'False' >2019-02-26 17:06:04,931+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/password=str:'**FILTERED**' >2019-02-26 17:06:04,931+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,932+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._setup_dbtransaction >2019-02-26 17:06:04,934+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.ovirt_imageio_proxy.core.Plugin._setup >2019-02-26 17:06:04,935+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,935+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/setupAttributesModules=list:'[<module 'ovirt_engine_setup.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/constants.pyc'>, <module 'ovirt_engine_setup.engine_common.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/constants.pyc'>, <module 'ovirt_engine_setup.engine.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/constants.pyc'>, <module 'ovirt_engine_setup.cinderlib.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/cinderlib/constants.pyc'>, <module 'ovirt_engine_setup.websocket_proxy.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/websocket_proxy/constants.pyc'>, <module 'ovirt_engine_setup.dwh.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/dwh/constants.pyc'>, <module 'ovirt_engine_setup.ovirt_imageio_proxy.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/ovirt_imageio_proxy/constants.pyc'>]' >2019-02-26 17:06:04,936+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,937+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.vmconsole_proxy_helper.core.Plugin._setup >2019-02-26 17:06:04,937+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,937+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/setupAttributesModules=list:'[<module 'ovirt_engine_setup.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/constants.pyc'>, <module 'ovirt_engine_setup.engine_common.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/constants.pyc'>, <module 'ovirt_engine_setup.engine.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/constants.pyc'>, <module 'ovirt_engine_setup.cinderlib.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/cinderlib/constants.pyc'>, <module 'ovirt_engine_setup.websocket_proxy.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/websocket_proxy/constants.pyc'>, <module 'ovirt_engine_setup.dwh.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/dwh/constants.pyc'>, <module 'ovirt_engine_setup.ovirt_imageio_proxy.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/ovirt_imageio_proxy/constants.pyc'>, <module 'ovirt_engine_setup.vmconsole_proxy_helper.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/vmconsole_proxy_helper/constants.pyc'>]' >2019-02-26 17:06:04,938+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,939+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._setup >2019-02-26 17:06:04,941+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._setup >2019-02-26 17:06:04,943+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.jboss.Plugin._setup >2019-02-26 17:06:04,943+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,943+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/javaNeeded=bool:'True' >2019-02-26 17:06:04,943+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossNeeded=bool:'True' >2019-02-26 17:06:04,944+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,945+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.misc.Plugin._setup >2019-02-26 17:06:04,948+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._setup >2019-02-26 17:06:04,949+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,949+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresExtraConfigItems=tuple:'({'ok': <function <lambda> at 0x7f1fdf599578>, 'check_on_use': True, 'needed_on_create': True, 'key': 'autovacuum_vacuum_scale_factor', 'expected': 0.01, 'error_msg': "It is required to be at most '{expected}'"}, {'ok': <function <lambda> at 0x7f1fdf550f50>, 'check_on_use': True, 'needed_on_create': True, 'key': 'autovacuum_analyze_scale_factor', 'expected': 0.075, 'error_msg': "It is required to be at most '{expected}'"}, {'ok': <function <lambda> at 0x7f1fdf2e0140>, 'check_on_use': True, 'needed_on_create': True, 'key': 'autovacuum_max_workers', 'expected': 6, 'error_msg': "It is required to be at least '{expected}'"}, {'ok': <function <lambda> at 0x7f1fdf2e02a8>, 'check_on_use': True, 'needed_on_create': True, 'key': 'maintenance_work_mem', 'expected': 65536, 'error_msg': "It is required to be at least '{expected}'", 'useQueryForValue': True}, {'ok': <function <lambda> at 0x7f1fdf2e0230>, 'check_on_use': True, 'needed_on_create': True, 'key': 'work_mem', 'expected': 8192, 'error_msg': "It is required to be at least '{expected}'", 'useQueryForValue': True})' >2019-02-26 17:06:04,949+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,950+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._setup >2019-02-26 17:06:04,952+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._setup >2019-02-26 17:06:04,953+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,953+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fenceKdumpListenerStopNeeded=bool:'True' >2019-02-26 17:06:04,954+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,955+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._setup >2019-02-26 17:06:04,955+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,955+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/openssl=NoneType:'None' >2019-02-26 17:06:04,956+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,957+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._setup >2019-02-26 17:06:04,957+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,958+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/exportfs=NoneType:'None' >2019-02-26 17:06:04,959+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,960+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._setup >2019-02-26 17:06:04,960+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,960+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoPathsToUpload=list:'['/usr/share/virtio-win/virtio-win_x86.vfd', '/usr/share/virtio-win/virtio-win_amd64.vfd', '/usr/share/virtio-win/virtio-win.iso', '/usr/share/ovirt-guest-tools-iso/ovirt-tools-setup.iso', '/usr/share/rhev-guest-tools-iso/rhev-tools-setup.iso', '/usr/share/rhv-guest-tools-iso/rhv-tools-setup.iso']' >2019-02-26 17:06:04,961+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,962+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._setup >2019-02-26 17:06:04,964+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._setup >2019-02-26 17:06:04,965+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl ssl._read_and_process_file:117 _read_and_process_file: changed_lines: [] >2019-02-26 17:06:04,967+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin._setup >2019-02-26 17:06:04,968+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages util.getPackageManager:269 Using Yum as package manager >2019-02-26 17:06:04,968+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,968+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/rpm=NoneType:'None' >2019-02-26 17:06:04,969+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,970+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._setup >2019-02-26 17:06:04,970+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:04,970+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/sysctl=NoneType:'None' >2019-02-26 17:06:04,971+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:04,972+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.connection.Plugin._setup >2019-02-26 17:06:04,974+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.legacy.config.Plugin._setup >2019-02-26 17:06:04,974+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:04,976+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._setup_engine_db_credentials >2019-02-26 17:06:04,976+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:04,978+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._keep_only_valid_firewall_managers >2019-02-26 17:06:04,978+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:04,980+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._setup >2019-02-26 17:06:04,982+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._setup >2019-02-26 17:06:04,982+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:04,984+0100 DEBUG otopi.context context._executeMethod:127 Stage setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._setup >2019-02-26 17:06:04,984+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:04,985+0100 INFO otopi.context context.runSequence:610 Stage: Environment packages setup >2019-02-26 17:06:04,986+0100 DEBUG otopi.context context.runSequence:614 STAGE internal_packages >2019-02-26 17:06:04,987+0100 DEBUG otopi.context context._executeMethod:127 Stage internal_packages METHOD otopi.plugins.otopi.core.transaction.Plugin._pre_prepare >2019-02-26 17:06:04,987+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'Yum Transaction' >Loaded plugins: fastestmirror, versionlock >2019-02-26 17:06:05,029+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-epel is listed more than once in the configuration >2019-02-26 17:06:05,030+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-gluster5 is listed more than once in the configuration >2019-02-26 17:06:05,031+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-virtio-win-latest is listed more than once in the configuration >2019-02-26 17:06:05,031+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-qemu-ev is listed more than once in the configuration >2019-02-26 17:06:05,032+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-ovirt43 is listed more than once in the configuration >2019-02-26 17:06:05,032+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-opstools is listed more than once in the configuration >2019-02-26 17:06:05,033+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository centos-sclo-rh-release is listed more than once in the configuration >2019-02-26 17:06:05,033+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:05,041+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository centos-sclo-rh-release is listed more than once in the configuration >2019-02-26 17:06:05,042+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:05,046+0100 DEBUG otopi.context context._executeMethod:127 Stage internal_packages METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._internal_packages_end >2019-02-26 17:06:05,047+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:05,048+0100 DEBUG otopi.context context._executeMethod:127 Stage internal_packages METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._internal_packages_end >2019-02-26 17:06:05,049+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Building transaction >2019-02-26 17:06:05,073+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Empty transaction >2019-02-26 17:06:05,073+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Transaction Summary: >2019-02-26 17:06:05,075+0100 DEBUG otopi.context context._executeMethod:127 Stage internal_packages METHOD otopi.plugins.otopi.core.transaction.Plugin._pre_end >2019-02-26 17:06:05,076+0100 DEBUG otopi.transaction transaction.commit:147 committing 'Yum Transaction' >Loaded plugins: fastestmirror, versionlock >2019-02-26 17:06:05,117+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-epel is listed more than once in the configuration >2019-02-26 17:06:05,117+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-gluster5 is listed more than once in the configuration >2019-02-26 17:06:05,118+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-virtio-win-latest is listed more than once in the configuration >2019-02-26 17:06:05,118+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-qemu-ev is listed more than once in the configuration >2019-02-26 17:06:05,119+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-ovirt43 is listed more than once in the configuration >2019-02-26 17:06:05,119+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-opstools is listed more than once in the configuration >2019-02-26 17:06:05,120+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository centos-sclo-rh-release is listed more than once in the configuration >2019-02-26 17:06:05,121+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:05,129+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository centos-sclo-rh-release is listed more than once in the configuration >2019-02-26 17:06:05,130+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:05,132+0100 INFO otopi.context context.runSequence:610 Stage: Programs detection >2019-02-26 17:06:05,133+0100 DEBUG otopi.context context.runSequence:614 STAGE programs >2019-02-26 17:06:05,134+0100 DEBUG otopi.context context._executeMethod:127 Stage programs METHOD otopi.plugins.otopi.system.command.Plugin._programs >2019-02-26 17:06:05,135+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/chkconfig=str:'/usr/sbin/chkconfig' >2019-02-26 17:06:05,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/chronyc=str:'/usr/bin/chronyc' >2019-02-26 17:06:05,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/date=str:'/usr/bin/date' >2019-02-26 17:06:05,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/dig=str:'/usr/bin/dig' >2019-02-26 17:06:05,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/exportfs=str:'/usr/sbin/exportfs' >2019-02-26 17:06:05,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/firewall-cmd=str:'/usr/bin/firewall-cmd' >2019-02-26 17:06:05,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/hwclock=str:'/usr/sbin/hwclock' >2019-02-26 17:06:05,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ip=str:'/usr/sbin/ip' >2019-02-26 17:06:05,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ntpq=str:'/usr/sbin/ntpq' >2019-02-26 17:06:05,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/openssl=str:'/usr/bin/openssl' >2019-02-26 17:06:05,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/reboot=str:'/usr/sbin/reboot' >2019-02-26 17:06:05,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/restorecon=str:'/usr/sbin/restorecon' >2019-02-26 17:06:05,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/rpm=str:'/usr/bin/rpm' >2019-02-26 17:06:05,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/selinuxenabled=str:'/usr/sbin/selinuxenabled' >2019-02-26 17:06:05,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/semanage=str:'/usr/sbin/semanage' >2019-02-26 17:06:05,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/service=str:'/usr/sbin/service' >2019-02-26 17:06:05,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/sysctl=str:'/usr/sbin/sysctl' >2019-02-26 17:06:05,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/systemctl=str:'/usr/bin/systemctl' >2019-02-26 17:06:05,138+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,138+0100 DEBUG otopi.context context._executeMethod:127 Stage programs METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh.Plugin._setup >2019-02-26 17:06:05,139+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ssh-keygen=NoneType:'None' >2019-02-26 17:06:05,140+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,141+0100 DEBUG otopi.context context._executeMethod:127 Stage programs METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._programs >2019-02-26 17:06:05,143+0100 DEBUG otopi.context context._executeMethod:127 Stage programs METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.pki.Plugin._setup >2019-02-26 17:06:05,144+0100 DEBUG otopi.context context._executeMethod:127 Stage programs METHOD otopi.plugins.otopi.services.openrc.Plugin._programs >2019-02-26 17:06:05,146+0100 DEBUG otopi.context context._executeMethod:127 Stage programs METHOD otopi.plugins.otopi.services.rhel.Plugin._programs >2019-02-26 17:06:05,146+0100 DEBUG otopi.plugins.otopi.services.rhel plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show-environment'), executable='None', cwd='None', env=None >2019-02-26 17:06:05,154+0100 DEBUG otopi.plugins.otopi.services.rhel plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show-environment'), rc=0 >2019-02-26 17:06:05,155+0100 DEBUG otopi.plugins.otopi.services.rhel plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show-environment') stdout: >LANG=en_US.UTF-8 >PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin > >2019-02-26 17:06:05,155+0100 DEBUG otopi.plugins.otopi.services.rhel plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show-environment') stderr: > > >2019-02-26 17:06:05,157+0100 DEBUG otopi.context context._executeMethod:127 Stage programs METHOD otopi.plugins.otopi.services.systemd.Plugin._programs >2019-02-26 17:06:05,157+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show-environment'), executable='None', cwd='None', env=None >2019-02-26 17:06:05,162+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show-environment'), rc=0 >2019-02-26 17:06:05,163+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show-environment') stdout: >LANG=en_US.UTF-8 >PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin > >2019-02-26 17:06:05,163+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show-environment') stderr: > > >2019-02-26 17:06:05,163+0100 DEBUG otopi.plugins.otopi.services.systemd systemd._programs:49 registering systemd provider >2019-02-26 17:06:05,165+0100 INFO otopi.context context.runSequence:610 Stage: Environment setup (late) >2019-02-26 17:06:05,165+0100 DEBUG otopi.context context.runSequence:614 STAGE late_setup >2019-02-26 17:06:05,166+0100 DEBUG otopi.context context._executeMethod:127 Stage late_setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._late_setup >2019-02-26 17:06:05,166+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service nfs-server exists >2019-02-26 17:06:05,166+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'nfs-server.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:05,173+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'nfs-server.service'), rc=0 >2019-02-26 17:06:05,174+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'nfs-server.service') stdout: >LoadState=loaded > >2019-02-26 17:06:05,174+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'nfs-server.service') stderr: > > >2019-02-26 17:06:05,174+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs plugin.executeRaw:813 execute: ('/usr/sbin/exportfs',), executable='None', cwd='None', env=None >2019-02-26 17:06:05,178+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs plugin.executeRaw:863 execute-result: ('/usr/sbin/exportfs',), rc=0 >2019-02-26 17:06:05,178+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs plugin.execute:921 execute-output: ('/usr/sbin/exportfs',) stdout: > > >2019-02-26 17:06:05,178+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs plugin.execute:926 execute-output: ('/usr/sbin/exportfs',) stderr: > > >2019-02-26 17:06:05,180+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,180+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/nfsConfigEnabled=bool:'False' >2019-02-26 17:06:05,180+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/nfsServiceName=str:'nfs-server' >2019-02-26 17:06:05,180+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,181+0100 DEBUG otopi.context context._executeMethod:127 Stage late_setup METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._late_setup_service_state >2019-02-26 17:06:05,181+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.status:90 check service ovirt-imageio-proxy status >2019-02-26 17:06:05,181+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'status', 'ovirt-imageio-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:05,189+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'status', 'ovirt-imageio-proxy.service'), rc=0 >2019-02-26 17:06:05,190+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'status', 'ovirt-imageio-proxy.service') stdout: >â ovirt-imageio-proxy.service - oVirt ImageIO Proxy > Loaded: loaded (/usr/lib/systemd/system/ovirt-imageio-proxy.service; enabled; vendor preset: disabled) > Active: active (running) since Tue 2019-02-26 17:02:01 CET; 4min 3s ago > Main PID: 23420 (ovirt-imageio-p) > CGroup: /system.slice/ovirt-imageio-proxy.service > ââ23420 /usr/bin/python2 /usr/bin/ovirt-imageio-proxy > >Feb 26 17:02:01 gb60kf2.democustomer.televic.com systemd[1]: Starting oVirt ImageIO Proxy... >Feb 26 17:02:01 gb60kf2.democustomer.televic.com systemd[1]: Started oVirt ImageIO Proxy. > >2019-02-26 17:06:05,190+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'status', 'ovirt-imageio-proxy.service') stderr: > > >2019-02-26 17:06:05,192+0100 DEBUG otopi.context context._executeMethod:127 Stage late_setup METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._late_setup_service_state >2019-02-26 17:06:05,192+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.status:90 check service ovirt-websocket-proxy status >2019-02-26 17:06:05,192+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'status', 'ovirt-websocket-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:05,199+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'status', 'ovirt-websocket-proxy.service'), rc=0 >2019-02-26 17:06:05,199+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'status', 'ovirt-websocket-proxy.service') stdout: >â ovirt-websocket-proxy.service - oVirt Engine websockets proxy > Loaded: loaded (/usr/lib/systemd/system/ovirt-websocket-proxy.service; enabled; vendor preset: disabled) > Active: active (running) since Tue 2019-02-26 17:02:02 CET; 4min 3s ago > Main PID: 23480 (ovirt-websocket) > CGroup: /system.slice/ovirt-websocket-proxy.service > ââ23480 /usr/bin/python /usr/share/ovirt-engine/services/ovirt-websocket-proxy/ovirt-websocket-proxy.py --systemd=notify start > >Feb 26 17:02:02 gb60kf2.democustomer.televic.com ovirt-websocket-proxy.py[23480]: ovirt-websocket-proxy[23480] INFO msg:887 - SSL/TLS support >Feb 26 17:02:02 gb60kf2.democustomer.televic.com ovirt-websocket-proxy.py[23480]: ovirt-websocket-proxy[23480] INFO msg:887 - Deny non-SSL/TLS connections >Feb 26 17:02:02 gb60kf2.democustomer.televic.com ovirt-websocket[23480]: 2019-02-26 17:02:02,213+0100 ovirt-websocket-proxy: INFO daemonContext:438 Minimum SSL version requested: TLSv1.2 >Feb 26 17:02:02 gb60kf2.democustomer.televic.com ovirt-websocket[23480]: 2019-02-26 17:02:02,213+0100 ovirt-websocket-proxy: INFO msg:887 WebSocket server settings: >Feb 26 17:02:02 gb60kf2.democustomer.televic.com ovirt-websocket[23480]: 2019-02-26 17:02:02,213+0100 ovirt-websocket-proxy: INFO msg:887 - Listen on *:6100 >Feb 26 17:02:02 gb60kf2.democustomer.televic.com ovirt-websocket[23480]: 2019-02-26 17:02:02,213+0100 ovirt-websocket-proxy: INFO msg:887 - Flash security policy server >Feb 26 17:02:02 gb60kf2.democustomer.televic.com ovirt-websocket[23480]: 2019-02-26 17:02:02,213+0100 ovirt-websocket-proxy: INFO msg:887 - SSL/TLS support >Feb 26 17:02:02 gb60kf2.democustomer.televic.com ovirt-websocket[23480]: 2019-02-26 17:02:02,214+0100 ovirt-websocket-proxy: INFO msg:887 - Deny non-SSL/TLS connections >Feb 26 17:02:02 gb60kf2.democustomer.televic.com ovirt-websocket[23480]: 2019-02-26 17:02:02,215+0100 ovirt-websocket-proxy: INFO msg:887 - proxying from *:6100 to targets generated by str >Feb 26 17:02:02 gb60kf2.democustomer.televic.com ovirt-websocket-proxy.py[23480]: ovirt-websocket-proxy[23480] INFO msg:887 - proxying from *:6100 to targets generated by str > >2019-02-26 17:06:05,199+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'status', 'ovirt-websocket-proxy.service') stderr: > > >2019-02-26 17:06:05,201+0100 INFO otopi.context context.runSequence:610 Stage: Environment customization >2019-02-26 17:06:05,201+0100 DEBUG otopi.context context.runSequence:614 STAGE customization >2019-02-26 17:06:05,202+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.otopi.network.firewalld.Plugin._customization >2019-02-26 17:06:05,202+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service firewalld exists >2019-02-26 17:06:05,202+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'firewalld.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:05,208+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'firewalld.service'), rc=0 >2019-02-26 17:06:05,209+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'firewalld.service') stdout: >LoadState=loaded > >2019-02-26 17:06:05,209+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'firewalld.service') stderr: > > >2019-02-26 17:06:05,217+0100 DEBUG otopi.plugins.otopi.network.firewalld firewalld._get_firewalld_cmd_version:116 firewalld version: 0.5.3 >2019-02-26 17:06:05,217+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,218+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/firewalldAvailable=bool:'True' >2019-02-26 17:06:05,219+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,220+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.otopi.core.config.Plugin._customize1 >2019-02-26 17:06:05,221+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.otopi.dialog.cli.Plugin._customize >2019-02-26 17:06:05,222+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:05,223+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_common.base.core.reconfigure.Plugin._customization >2019-02-26 17:06:05,225+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._version_lock_customization >2019-02-26 17:06:05,226+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,226+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockApply=list:'['ovirt-engine-extension-aaa-jdbc']' >2019-02-26 17:06:05,226+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockFilter=list:'['ovirt-engine-extension-aaa-jdbc']' >2019-02-26 17:06:05,227+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesUpgradeList=list:'[{'packages': ['ovirt-engine-extension-aaa-jdbc']}]' >2019-02-26 17:06:05,227+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,228+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._customization_enable >2019-02-26 17:06:05,230+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.jboss.Plugin._version_lock_customization >2019-02-26 17:06:05,230+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,230+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockApply=list:'['ovirt-engine-extension-aaa-jdbc', 'ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay']' >2019-02-26 17:06:05,230+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockFilter=list:'['ovirt-engine-extension-aaa-jdbc', 'ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay']' >2019-02-26 17:06:05,231+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesUpgradeList=list:'[{'packages': ['ovirt-engine-extension-aaa-jdbc']}, {'packages': ['ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay']}]' >2019-02-26 17:06:05,231+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,232+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_s_product_options >2019-02-26 17:06:05,232+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:05,233+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== PRODUCT OPTIONS ==-- >2019-02-26 17:06:05,233+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:05,235+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._customization >2019-02-26 17:06:05,236+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.cinderlib.core.misc.Plugin.__customization_cinderlib_db_enable >2019-02-26 17:06:05,238+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.iso_domain.Plugin._customization >2019-02-26 17:06:05,239+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:05,240+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.misc.Plugin._customization >2019-02-26 17:06:05,241+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,241+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/enable=bool:'True' >2019-02-26 17:06:05,242+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,243+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._customization >2019-02-26 17:06:05,243+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn ovirtproviderovn._is_provider_installed:761 ovirt-provider-ovn already installed, skipping. >2019-02-26 17:06:05,244+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,244+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldServices=list:'[{'absolute_path': '/usr/lib/firewalld/services/ovn-central-firewall-service.xml', 'name': 'ovn-central-firewall-service'}, {'absolute_path': '/usr/lib/firewalld/services/ovirt-provider-ovn.xml', 'name': 'ovirt-provider-ovn'}]' >2019-02-26 17:06:05,244+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,245+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._customization >2019-02-26 17:06:05,246+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,246+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyStopNeeded=bool:'True' >2019-02-26 17:06:05,246+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,247+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._customization >2019-02-26 17:06:05,248+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,248+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyStopNeeded=bool:'True' >2019-02-26 17:06:05,249+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,250+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._customization >2019-02-26 17:06:05,252+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.java.Plugin._customization >2019-02-26 17:06:05,253+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,253+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineHeapMax=str:'3928M' >2019-02-26 17:06:05,253+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineHeapMin=str:'3928M' >2019-02-26 17:06:05,254+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,255+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.distro-rpm.packages.Plugin._customization >2019-02-26 17:06:05,255+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,255+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockApply=list:'['ovirt-engine-extension-aaa-jdbc', 'ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay', 'ovirt-engine', 'ovirt-engine-backend', 'ovirt-engine-dbscripts', 'ovirt-engine-restapi', 'ovirt-engine-tools', 'ovirt-engine-tools-backup', 'ovirt-engine-webadmin-portal', 'ovirt-engine-ui-extensions']' >2019-02-26 17:06:05,255+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockFilter=list:'['ovirt-engine-extension-aaa-jdbc', 'ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay', 'ovirt-engine']' >2019-02-26 17:06:05,256+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesSetup=list:'['ovirt-engine-setup']' >2019-02-26 17:06:05,256+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesUpgradeList=list:'[{'packages': ['ovirt-engine-extension-aaa-jdbc']}, {'packages': ['ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay']}, {'packages': ['ovirt-engine', 'ovirt-host-deploy', 'ovirt-iso-uploader', 'ovirt-engine-ui-extensions', 'ovirt-web-ui']}]' >2019-02-26 17:06:05,257+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,257+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.misc.Plugin._customization >2019-02-26 17:06:05,258+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,258+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/dwhServiceStopNeeded=bool:'True' >2019-02-26 17:06:05,259+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,260+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._customization >2019-02-26 17:06:05,260+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,260+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/vmconsoleProxyStopNeeded=bool:'True' >2019-02-26 17:06:05,261+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,262+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.packages.Plugin._customization >2019-02-26 17:06:05,263+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,263+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesSetup=list:'['ovirt-engine-setup', 'ovirt-engine-setup-plugin-websocket-proxy']' >2019-02-26 17:06:05,263+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesUpgradeList=list:'[{'packages': ['ovirt-engine-extension-aaa-jdbc']}, {'packages': ['ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay']}, {'packages': ['ovirt-engine', 'ovirt-host-deploy', 'ovirt-iso-uploader', 'ovirt-engine-ui-extensions', 'ovirt-web-ui']}, {'packages': ['ovirt-engine-websocket-proxy']}]' >2019-02-26 17:06:05,264+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,264+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_e_product_options >2019-02-26 17:06:05,266+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.distro-rpm.packages.Plugin._customization >2019-02-26 17:06:05,267+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:05,267+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockApply=list:'['ovirt-engine-extension-aaa-jdbc', 'ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay', 'ovirt-engine', 'ovirt-engine-backend', 'ovirt-engine-dbscripts', 'ovirt-engine-restapi', 'ovirt-engine-tools', 'ovirt-engine-tools-backup', 'ovirt-engine-webadmin-portal', 'ovirt-engine-ui-extensions', 'ovirt-engine-dwh']' >2019-02-26 17:06:05,267+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockFilter=list:'['ovirt-engine-extension-aaa-jdbc', 'ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay', 'ovirt-engine', 'ovirt-engine-dwh', 'ovirt-engine-dwh-setup']' >2019-02-26 17:06:05,268+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesSetup=list:'['ovirt-engine-setup', 'ovirt-engine-setup-plugin-websocket-proxy', 'ovirt-engine-dwh-setup']' >2019-02-26 17:06:05,268+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesUpgradeList=list:'[{'packages': ['ovirt-engine-extension-aaa-jdbc']}, {'packages': ['ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay']}, {'packages': ['ovirt-engine', 'ovirt-host-deploy', 'ovirt-iso-uploader', 'ovirt-engine-ui-extensions', 'ovirt-web-ui']}, {'packages': ['ovirt-engine-websocket-proxy']}, {'packages': ['ovirt-engine-dwh']}]' >2019-02-26 17:06:05,268+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:05,269+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_packages >2019-02-26 17:06:05,269+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:05,269+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== PACKAGES ==-- >2019-02-26 17:06:05,269+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:05,271+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin._customization >2019-02-26 17:06:05,272+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages._customization:358 Checking for product updates... >2019-02-26 17:06:05,313+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-epel is listed more than once in the configuration >2019-02-26 17:06:05,314+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-gluster5 is listed more than once in the configuration >2019-02-26 17:06:05,315+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-virtio-win-latest is listed more than once in the configuration >2019-02-26 17:06:05,315+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-qemu-ev is listed more than once in the configuration >2019-02-26 17:06:05,316+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-ovirt43 is listed more than once in the configuration >2019-02-26 17:06:05,316+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-opstools is listed more than once in the configuration >2019-02-26 17:06:05,317+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository centos-sclo-rh-release is listed more than once in the configuration >2019-02-26 17:06:05,318+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:05,325+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository centos-sclo-rh-release is listed more than once in the configuration >2019-02-26 17:06:05,327+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:07,126+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-epel/x86_64/metalink (0%) >2019-02-26 17:06:07,295+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-epel/x86_64/metalink 16 k(100%) >2019-02-26 17:06:08,209+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-master-epel/x86_64/metalink (0%) >2019-02-26 17:06:08,377+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-master-epel/x86_64/metalink 16 k(100%) >2019-02-26 17:06:12,587+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: base/7/x86_64 (0%) >2019-02-26 17:06:12,588+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: base/7/x86_64 3.6 k(100%) >2019-02-26 17:06:12,597+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-gluster5/7/x86_64 (0%) >2019-02-26 17:06:12,598+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-gluster5/7/x86_64 2.9 k(100%) >2019-02-26 17:06:12,938+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-opstools-release/x86_64 (0%) >2019-02-26 17:06:12,944+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-opstools-release/x86_64 2.9 k(100%) >2019-02-26 17:06:13,662+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-ovirt-common-testing/x86_64 (0%) >2019-02-26 17:06:13,664+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-ovirt-common-testing/x86_64 3.4 k(100%) >2019-02-26 17:06:14,381+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-ovirt43-testing/x86_64 (0%) >2019-02-26 17:06:14,383+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-ovirt43-testing/x86_64 3.4 k(100%) >2019-02-26 17:06:14,876+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-qemu-ev-release/x86_64 (0%) >2019-02-26 17:06:14,878+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-qemu-ev-release/x86_64 3.4 k(100%) >2019-02-26 17:06:14,935+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-sclo-rh-release/x86_64 (0%) >2019-02-26 17:06:14,942+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: centos-sclo-rh-release/x86_64 3.0 k(100%) >2019-02-26 17:06:14,953+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: extras/7/x86_64 (0%) >2019-02-26 17:06:14,954+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: extras/7/x86_64 3.4 k(100%) >2019-02-26 17:06:15,458+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: opstools7-common-testing/x86_64 (0%) >2019-02-26 17:06:15,460+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: opstools7-common-testing/x86_64 3.4 k(100%) >2019-02-26 17:06:15,959+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: opstools7-perfmon-common-testing/x86_64 (0%) >2019-02-26 17:06:15,961+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: opstools7-perfmon-common-testing/x86_64 3.4 k(100%) >2019-02-26 17:06:16,008+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3/7 (0%) >2019-02-26 17:06:16,009+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3/7 3.0 k(100%) >2019-02-26 17:06:16,067+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-centos-gluster5/x86_64 (0%) >2019-02-26 17:06:16,074+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-centos-gluster5/x86_64 2.9 k(100%) >2019-02-26 17:06:16,119+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-centos-opstools/x86_64 (0%) >2019-02-26 17:06:16,126+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-centos-opstools/x86_64 2.9 k(100%) >2019-02-26 17:06:16,197+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-centos-ovirt43/x86_64 (0%) >2019-02-26 17:06:16,203+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-centos-ovirt43/x86_64 2.9 k(100%) >2019-02-26 17:06:16,249+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-centos-qemu-ev/x86_64 (0%) >2019-02-26 17:06:16,257+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-centos-qemu-ev/x86_64 2.9 k(100%) >2019-02-26 17:06:16,283+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-snapshot/7 (0%) >2019-02-26 17:06:16,285+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-snapshot/7 2.9 k(100%) >2019-02-26 17:06:16,309+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-snapshot-static/7 (0%) >2019-02-26 17:06:16,311+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-snapshot-static/7 2.9 k(100%) >2019-02-26 17:06:17,001+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-virtio-win-latest (0%) >2019-02-26 17:06:17,003+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-4.3-virtio-win-latest 3.0 k(100%) >2019-02-26 17:06:17,047+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-master-centos-gluster5/x86_64 (0%) >2019-02-26 17:06:17,055+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-master-centos-gluster5/x86_64 2.9 k(100%) >2019-02-26 17:06:17,082+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-master-snapshot/7 (0%) >2019-02-26 17:06:17,083+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-master-snapshot/7 2.9 k(100%) >2019-02-26 17:06:17,108+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-master-snapshot-static/7 (0%) >2019-02-26 17:06:17,109+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-master-snapshot-static/7 3.0 k(100%) >2019-02-26 17:06:17,325+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-master-virtio-win-latest (0%) >2019-02-26 17:06:17,326+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirt-master-virtio-win-latest 3.0 k(100%) >2019-02-26 17:06:18,060+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirtwebui-ovirt-web-ui-master/x86_64 (0%) >2019-02-26 17:06:18,062+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: ovirtwebui-ovirt-web-ui-master/x86_64 3.0 k(100%) >2019-02-26 17:06:18,245+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: sac-gluster-ansible/x86_64 (0%) >2019-02-26 17:06:18,247+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: sac-gluster-ansible/x86_64 3.5 k(100%) >2019-02-26 17:06:18,258+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: updates/7/x86_64 (0%) >2019-02-26 17:06:18,259+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Downloading: updates/7/x86_64 3.4 k(100%) >2019-02-26 17:06:18,357+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum queue package ovirt-engine-extension-aaa-jdbc for install/update >2019-02-26 17:06:18,540+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum queue package ovirt-engine-wildfly for install/update >2019-02-26 17:06:18,705+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum queue package ovirt-engine-wildfly-overlay for install/update >2019-02-26 17:06:18,868+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum queue package ovirt-engine for install/update >2019-02-26 17:06:19,030+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum queue package ovirt-host-deploy for install/update >2019-02-26 17:06:19,241+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum processing package ovirt-host-deploy-1.8.0-0.0.master.20180531090832.git9811a30.el7.noarch for install/update >2019-02-26 17:06:19,495+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum package ovirt-host-deploy-1.8.0-0.0.master.20180531090832.git9811a30.el7.noarch queued >2019-02-26 17:06:19,495+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum queue package ovirt-iso-uploader for install/update >2019-02-26 17:06:19,654+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum queue package ovirt-engine-ui-extensions for install/update >2019-02-26 17:06:19,813+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum queue package ovirt-web-ui for install/update >2019-02-26 17:06:19,973+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum queue package ovirt-engine-websocket-proxy for install/update >2019-02-26 17:06:20,133+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum queue package ovirt-engine-dwh for install/update >2019-02-26 17:06:20,293+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Building transaction >2019-02-26 17:06:20,311+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Empty transaction >2019-02-26 17:06:20,311+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Transaction Summary: >2019-02-26 17:06:20,318+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages._customization:366 No product updates found >2019-02-26 17:06:20,321+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_packages >2019-02-26 17:06:20,322+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_network >2019-02-26 17:06:20,323+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,323+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== NETWORK CONFIGURATION ==-- >2019-02-26 17:06:20,323+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,325+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_common.base.network.hostname.Plugin._customization >2019-02-26 17:06:20,325+0100 DEBUG otopi.plugins.ovirt_engine_common.base.network.hostname hostname.__init__:162 Hostname initialized only at stage 6 so the detection of the required commands is up to the caller object >2019-02-26 17:06:20,328+0100 DEBUG otopi.plugins.ovirt_engine_common.base.network.hostname dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_CONFIG/fqdn >2019-02-26 17:06:20,329+0100 DEBUG otopi.plugins.ovirt_engine_common.base.network.hostname hostname.getResolvedAddresses:432 getResolvedAddresses: set(['10.99.100.3', 'fd00::1:1298:36ff:fea3:d613']) >2019-02-26 17:06:20,329+0100 DEBUG otopi.plugins.ovirt_engine_common.base.network.hostname hostname._validateFQDNresolvability:289 gb60kf2.democustomer.televic.com resolves to: set(['10.99.100.3', 'fd00::1:1298:36ff:fea3:d613']) >2019-02-26 17:06:20,329+0100 DEBUG otopi.plugins.ovirt_engine_common.base.network.hostname plugin.executeRaw:813 execute: ['/usr/bin/dig', '+noall', '+answer', 'gb60kf2.democustomer.televic.com', 'ANY'], executable='None', cwd='None', env=None >2019-02-26 17:06:20,340+0100 DEBUG otopi.plugins.ovirt_engine_common.base.network.hostname plugin.executeRaw:863 execute-result: ['/usr/bin/dig', '+noall', '+answer', 'gb60kf2.democustomer.televic.com', 'ANY'], rc=0 >2019-02-26 17:06:20,341+0100 DEBUG otopi.plugins.ovirt_engine_common.base.network.hostname plugin.execute:921 execute-output: ['/usr/bin/dig', '+noall', '+answer', 'gb60kf2.democustomer.televic.com', 'ANY'] stdout: >gb60kf2.democustomer.televic.com. 3600 IN A 10.99.100.3 >gb60kf2.democustomer.televic.com. 3600 IN AAAA fd00::1:1298:36ff:fea3:d613 > >2019-02-26 17:06:20,341+0100 DEBUG otopi.plugins.ovirt_engine_common.base.network.hostname plugin.execute:926 execute-output: ['/usr/bin/dig', '+noall', '+answer', 'gb60kf2.democustomer.televic.com', 'ANY'] stderr: > > >2019-02-26 17:06:20,343+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._customization_is_requested >2019-02-26 17:06:20,344+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service iptables exists >2019-02-26 17:06:20,344+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'iptables.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,351+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'iptables.service'), rc=0 >2019-02-26 17:06:20,352+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'iptables.service') stdout: >LoadState=not-found > >2019-02-26 17:06:20,352+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'iptables.service') stderr: > > >2019-02-26 17:06:20,354+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._customization >2019-02-26 17:06:20,355+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.status:90 check service firewalld status >2019-02-26 17:06:20,355+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'status', 'firewalld.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,363+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'status', 'firewalld.service'), rc=0 >2019-02-26 17:06:20,364+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'status', 'firewalld.service') stdout: >â firewalld.service - firewalld - dynamic firewall daemon > Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) > Active: active (running) since Tue 2019-02-26 16:37:09 CET; 29min ago > Docs: man:firewalld(1) > Main PID: 4241 (firewalld) > CGroup: /system.slice/firewalld.service > ââ4241 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid > >Feb 26 16:48:44 gb60kf2.democustomer.televic.com firewalld[4241]: WARNING: ALREADY_ENABLED: ovirt-provider-ovn >Feb 26 17:01:57 gb60kf2.democustomer.televic.com firewalld[4241]: WARNING: ALREADY_ENABLED: ovirt-postgres >Feb 26 17:01:57 gb60kf2.democustomer.televic.com firewalld[4241]: WARNING: ALREADY_ENABLED: ovirt-https >Feb 26 17:01:58 gb60kf2.democustomer.televic.com firewalld[4241]: WARNING: ALREADY_ENABLED: ovn-central-firewall-service >Feb 26 17:01:58 gb60kf2.democustomer.televic.com firewalld[4241]: WARNING: ALREADY_ENABLED: ovirt-fence-kdump-listener >Feb 26 17:01:58 gb60kf2.democustomer.televic.com firewalld[4241]: WARNING: ALREADY_ENABLED: ovirt-imageio-proxy >Feb 26 17:01:58 gb60kf2.democustomer.televic.com firewalld[4241]: WARNING: ALREADY_ENABLED: ovirt-websocket-proxy >Feb 26 17:01:59 gb60kf2.democustomer.televic.com firewalld[4241]: WARNING: ALREADY_ENABLED: ovirt-http >Feb 26 17:01:59 gb60kf2.democustomer.televic.com firewalld[4241]: WARNING: ALREADY_ENABLED: ovirt-vmconsole-proxy >Feb 26 17:01:59 gb60kf2.democustomer.televic.com firewalld[4241]: WARNING: ALREADY_ENABLED: ovirt-provider-ovn > >2019-02-26 17:06:20,364+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'status', 'firewalld.service') stderr: > > >2019-02-26 17:06:20,364+0100 INFO otopi.plugins.ovirt_engine_setup.base.network.firewall_manager firewall_manager._customization:223 firewalld will be configured as firewall manager. >2019-02-26 17:06:20,367+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.protocols.Plugin._customization >2019-02-26 17:06:20,368+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,368+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ENGINE_CONFIG/fqdn=str:'gb60kf2.democustomer.televic.com' >2019-02-26 17:06:20,368+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,369+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.firewall.Plugin._configuration >2019-02-26 17:06:20,370+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,370+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldSubst=dict:'{'@JBOSS_HTTP_PORT@': None, '@JBOSS_HTTPS_PORT@': None}' >2019-02-26 17:06:20,371+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,372+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._firewall >2019-02-26 17:06:20,372+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,374+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.firewall.Plugin._configuration >2019-02-26 17:06:20,375+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,375+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldServices=list:'[{'absolute_path': '/usr/lib/firewalld/services/ovn-central-firewall-service.xml', 'name': 'ovn-central-firewall-service'}, {'absolute_path': '/usr/lib/firewalld/services/ovirt-provider-ovn.xml', 'name': 'ovirt-provider-ovn'}, {'directory': 'ovirt-common', 'name': 'ovirt-http'}, {'directory': 'ovirt-common', 'name': 'ovirt-https'}]' >2019-02-26 17:06:20,375+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldSubst=dict:'{'@HTTPS_PORT@': 443, '@JBOSS_HTTP_PORT@': None, '@HTTP_PORT@': 80, '@JBOSS_HTTPS_PORT@': None}' >2019-02-26 17:06:20,375+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,376+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._network_owners_config_customized >2019-02-26 17:06:20,378+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._remote_engine_customization >2019-02-26 17:06:20,378+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,380+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._customization_network >2019-02-26 17:06:20,380+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config hostname.__init__:162 Hostname initialized only at stage 6 so the detection of the required commands is up to the caller object >2019-02-26 17:06:20,381+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_ENGINE_CONFIG/fqdn >2019-02-26 17:06:20,382+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config hostname.getResolvedAddresses:432 getResolvedAddresses: set(['10.99.100.3', 'fd00::1:1298:36ff:fea3:d613']) >2019-02-26 17:06:20,382+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config hostname._validateFQDNresolvability:289 gb60kf2.democustomer.televic.com resolves to: set(['10.99.100.3', 'fd00::1:1298:36ff:fea3:d613']) >2019-02-26 17:06:20,384+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._customizationNetwork >2019-02-26 17:06:20,384+0100 DEBUG otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config hostname.__init__:162 Hostname initialized only at stage 6 so the detection of the required commands is up to the caller object >2019-02-26 17:06:20,384+0100 DEBUG otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_ENGINE_CONFIG/fqdn >2019-02-26 17:06:20,385+0100 DEBUG otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config hostname.getResolvedAddresses:432 getResolvedAddresses: set(['10.99.100.3', 'fd00::1:1298:36ff:fea3:d613']) >2019-02-26 17:06:20,386+0100 DEBUG otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config hostname._validateFQDNresolvability:289 gb60kf2.democustomer.televic.com resolves to: set(['10.99.100.3', 'fd00::1:1298:36ff:fea3:d613']) >2019-02-26 17:06:20,386+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,387+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldServices=list:'[{'absolute_path': '/usr/lib/firewalld/services/ovn-central-firewall-service.xml', 'name': 'ovn-central-firewall-service'}, {'absolute_path': '/usr/lib/firewalld/services/ovirt-provider-ovn.xml', 'name': 'ovirt-provider-ovn'}, {'directory': 'ovirt-common', 'name': 'ovirt-http'}, {'directory': 'ovirt-common', 'name': 'ovirt-https'}, {'directory': 'vmconsole-proxy', 'name': 'ovirt-vmconsole-proxy'}]' >2019-02-26 17:06:20,387+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldSubst=dict:'{'@HTTPS_PORT@': 443, '@JBOSS_HTTP_PORT@': None, '@HTTP_PORT@': 80, '@VMCONSOLE_PROXY_PORT@': 2222, '@JBOSS_HTTPS_PORT@': None}' >2019-02-26 17:06:20,387+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,388+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._customization_network >2019-02-26 17:06:20,388+0100 DEBUG otopi.plugins.ovirt_engine_setup.websocket_proxy.config hostname.__init__:162 Hostname initialized only at stage 6 so the detection of the required commands is up to the caller object >2019-02-26 17:06:20,388+0100 DEBUG otopi.plugins.ovirt_engine_setup.websocket_proxy.config dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_ENGINE_CONFIG/fqdn >2019-02-26 17:06:20,389+0100 DEBUG otopi.plugins.ovirt_engine_setup.websocket_proxy.config hostname.getResolvedAddresses:432 getResolvedAddresses: set(['10.99.100.3', 'fd00::1:1298:36ff:fea3:d613']) >2019-02-26 17:06:20,389+0100 DEBUG otopi.plugins.ovirt_engine_setup.websocket_proxy.config hostname._validateFQDNresolvability:289 gb60kf2.democustomer.televic.com resolves to: set(['10.99.100.3', 'fd00::1:1298:36ff:fea3:d613']) >2019-02-26 17:06:20,391+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_network >2019-02-26 17:06:20,393+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_database >2019-02-26 17:06:20,393+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,394+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== DATABASE CONFIGURATION ==-- >2019-02-26 17:06:20,394+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,396+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._customization_enable >2019-02-26 17:06:20,398+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._customization_enable >2019-02-26 17:06:20,398+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,400+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._customization_enable >2019-02-26 17:06:20,402+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._customization_enable >2019-02-26 17:06:20,402+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,404+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._customization >2019-02-26 17:06:20,404+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,406+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._customization >2019-02-26 17:06:20,408+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._customization >2019-02-26 17:06:20,408+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,410+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.connection.Plugin._customization >2019-02-26 17:06:20,410+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,412+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._customization >2019-02-26 17:06:20,412+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,414+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._customization >2019-02-26 17:06:20,414+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection hostname.__init__:162 Hostname initialized only at stage 6 so the detection of the required commands is up to the caller object >2019-02-26 17:06:20,414+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_DB/host >2019-02-26 17:06:20,414+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection hostname.getResolvedAddresses:432 getResolvedAddresses: set(['127.0.0.1', '::1']) >2019-02-26 17:06:20,415+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection hostname._validateFQDNresolvability:289 localhost resolves to: set(['127.0.0.1', '::1']) >2019-02-26 17:06:20,415+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_DB/port >2019-02-26 17:06:20,415+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_DB/database >2019-02-26 17:06:20,415+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_DB/user >2019-02-26 17:06:20,415+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_DB/password >2019-02-26 17:06:20,415+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.getCredentials:1370 dbenv: {'OVESETUP_DB/database': 'engine', 'OVESETUP_DB/host': 'localhost', 'OVESETUP_DB/user': 'engine', 'OVESETUP_DB/secured': False, 'OVESETUP_DB/securedHostValidation': False, 'OVESETUP_DB/password': '**FILTERED**', 'OVESETUP_DB/port': '5432'} >2019-02-26 17:06:20,416+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select count(*) as count > from pg_catalog.pg_tables > where schemaname = 'public'; > ', args: {} >2019-02-26 17:06:20,416+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,420+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'count': 161L}] >2019-02-26 17:06:20,421+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'SHOW server_version', args: {} >2019-02-26 17:06:20,421+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,423+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'server_version': '10.6'}] >2019-02-26 17:06:20,423+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.checkServerVersion:467 PostgreSQL server version: 10.6 >2019-02-26 17:06:20,424+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection plugin.executeRaw:813 execute: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,431+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection plugin.executeRaw:863 execute-result: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version'), rc=0 >2019-02-26 17:06:20,432+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection plugin.execute:921 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version') stdout: >psql (PostgreSQL) 10.6 > >2019-02-26 17:06:20,432+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection plugin.execute:926 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version') stderr: > > >2019-02-26 17:06:20,432+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.checkClientVersion:483 PostgreSQL client version: 10.6 >2019-02-26 17:06:20,432+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection plugin.executeRaw:813 execute: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,439+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection plugin.executeRaw:863 execute-result: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V'), rc=0 >2019-02-26 17:06:20,440+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection plugin.execute:921 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V') stdout: >psql (PostgreSQL) 10.6 > >2019-02-26 17:06:20,440+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection plugin.execute:926 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V') stderr: > > >2019-02-26 17:06:20,440+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show autovacuum_vacuum_scale_factor', args: {} >2019-02-26 17:06:20,440+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,443+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'autovacuum_vacuum_scale_factor': '0.01'}] >2019-02-26 17:06:20,443+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show autovacuum_analyze_scale_factor', args: {} >2019-02-26 17:06:20,443+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,446+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'autovacuum_analyze_scale_factor': '0.075'}] >2019-02-26 17:06:20,446+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show autovacuum_max_workers', args: {} >2019-02-26 17:06:20,446+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,449+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'autovacuum_max_workers': '6'}] >2019-02-26 17:06:20,449+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'select setting maintenance_work_mem from pg_settings where name = 'maintenance_work_mem'', args: {} >2019-02-26 17:06:20,449+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,453+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'maintenance_work_mem': '65536'}] >2019-02-26 17:06:20,453+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'select setting work_mem from pg_settings where name = 'work_mem'', args: {} >2019-02-26 17:06:20,453+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,457+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'work_mem': '8192'}] >2019-02-26 17:06:20,457+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show server_encoding', args: {} >2019-02-26 17:06:20,457+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,460+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'server_encoding': 'UTF8'}] >2019-02-26 17:06:20,460+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show max_connections', args: {} >2019-02-26 17:06:20,460+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,463+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'max_connections': '150'}] >2019-02-26 17:06:20,463+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show lc_messages', args: {} >2019-02-26 17:06:20,463+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,465+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'lc_messages': 'en_US.UTF-8'}] >2019-02-26 17:06:20,466+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show server_version', args: {} >2019-02-26 17:06:20,466+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,468+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'server_version': '10.6'}] >2019-02-26 17:06:20,471+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._customization >2019-02-26 17:06:20,473+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade.Plugin._customization >2019-02-26 17:06:20,473+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,475+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.auth_url_validation.Plugin._customization >2019-02-26 17:06:20,475+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'SELECT id,name,auth_url FROM providers WHERE auth_url !~ '^http(s)?://[^/]*:[\d]+/(v3|v2\.0)/?$'', args: {} >2019-02-26 17:06:20,476+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,479+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:20,482+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._db_owners_connections_customized >2019-02-26 17:06:20,484+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.dbmsupgrade.Plugin._customization >2019-02-26 17:06:20,484+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,486+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection.Plugin._engine_customization >2019-02-26 17:06:20,486+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection hostname.__init__:162 Hostname initialized only at stage 6 so the detection of the required commands is up to the caller object >2019-02-26 17:06:20,486+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_DB/host >2019-02-26 17:06:20,487+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection hostname.getResolvedAddresses:432 getResolvedAddresses: set(['127.0.0.1', '::1']) >2019-02-26 17:06:20,487+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection hostname._validateFQDNresolvability:289 localhost resolves to: set(['127.0.0.1', '::1']) >2019-02-26 17:06:20,487+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_DB/port >2019-02-26 17:06:20,487+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_DB/database >2019-02-26 17:06:20,487+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_DB/user >2019-02-26 17:06:20,487+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_DB/password >2019-02-26 17:06:20,487+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.getCredentials:1370 dbenv: {'OVESETUP_DB/database': 'engine', 'OVESETUP_DB/host': 'localhost', 'OVESETUP_DB/user': 'engine', 'OVESETUP_DB/secured': False, 'OVESETUP_DB/securedHostValidation': False, 'OVESETUP_DB/password': '**FILTERED**', 'OVESETUP_DB/port': '5432'} >2019-02-26 17:06:20,488+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select count(*) as count > from pg_catalog.pg_tables > where schemaname = 'public'; > ', args: {} >2019-02-26 17:06:20,488+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,492+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'count': 161L}] >2019-02-26 17:06:20,492+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'SHOW server_version', args: {} >2019-02-26 17:06:20,492+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,495+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'server_version': '10.6'}] >2019-02-26 17:06:20,495+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.checkServerVersion:467 PostgreSQL server version: 10.6 >2019-02-26 17:06:20,495+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection plugin.executeRaw:813 execute: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,503+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection plugin.executeRaw:863 execute-result: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version'), rc=0 >2019-02-26 17:06:20,503+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection plugin.execute:921 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version') stdout: >psql (PostgreSQL) 10.6 > >2019-02-26 17:06:20,504+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection plugin.execute:926 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '--version') stderr: > > >2019-02-26 17:06:20,504+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.checkClientVersion:483 PostgreSQL client version: 10.6 >2019-02-26 17:06:20,504+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection plugin.executeRaw:813 execute: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,511+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection plugin.executeRaw:863 execute-result: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V'), rc=0 >2019-02-26 17:06:20,512+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection plugin.execute:921 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V') stdout: >psql (PostgreSQL) 10.6 > >2019-02-26 17:06:20,512+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.engine_connection plugin.execute:926 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V') stderr: > > >2019-02-26 17:06:20,512+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show autovacuum_vacuum_scale_factor', args: {} >2019-02-26 17:06:20,512+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,515+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'autovacuum_vacuum_scale_factor': '0.01'}] >2019-02-26 17:06:20,515+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show autovacuum_analyze_scale_factor', args: {} >2019-02-26 17:06:20,516+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,518+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'autovacuum_analyze_scale_factor': '0.075'}] >2019-02-26 17:06:20,518+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show autovacuum_max_workers', args: {} >2019-02-26 17:06:20,518+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,521+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'autovacuum_max_workers': '6'}] >2019-02-26 17:06:20,521+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'select setting maintenance_work_mem from pg_settings where name = 'maintenance_work_mem'', args: {} >2019-02-26 17:06:20,521+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,525+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'maintenance_work_mem': '65536'}] >2019-02-26 17:06:20,525+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'select setting work_mem from pg_settings where name = 'work_mem'', args: {} >2019-02-26 17:06:20,525+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,529+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'work_mem': '8192'}] >2019-02-26 17:06:20,529+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show server_encoding', args: {} >2019-02-26 17:06:20,529+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,532+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'server_encoding': 'UTF8'}] >2019-02-26 17:06:20,532+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show max_connections', args: {} >2019-02-26 17:06:20,532+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,535+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'max_connections': '150'}] >2019-02-26 17:06:20,535+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show lc_messages', args: {} >2019-02-26 17:06:20,535+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,537+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'lc_messages': 'en_US.UTF-8'}] >2019-02-26 17:06:20,538+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'show server_version', args: {} >2019-02-26 17:06:20,538+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,540+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'server_version': '10.6'}] >2019-02-26 17:06:20,543+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._customization >2019-02-26 17:06:20,543+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'SELECT pg_database_size(%(db)s) as size', args: {'db': 'ovirt_engine_history'} >2019-02-26 17:06:20,543+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,547+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'size': 29914599L}] >2019-02-26 17:06:20,548+0100 DEBUG otopi.plugins.otopi.dialog.human human.queryString:159 query OVESETUP_DWH_PERFORM_BACKUP >2019-02-26 17:06:20,548+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND The detected DWH database size is 28 MB. >2019-02-26 17:06:20,548+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Setup can backup the existing database. The time and space required for the database backup depend on its size. This process takes time, and in some cases (for instance, when the size is few GBs) may take several hours to complete. >2019-02-26 17:06:20,548+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND If you choose to not back up the database, and Setup later fails for some reason, it will not be able to restore the database and all DWH data will be lost. >2019-02-26 17:06:20,548+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Would you like to backup the existing database before upgrading it? (Yes, No) [Yes]: >2019-02-26 17:06:20,549+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,549+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/performBackup=bool:'True' >2019-02-26 17:06:20,550+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV QUESTION/1/OVESETUP_DWH_PERFORM_BACKUP=str:'yes' >2019-02-26 17:06:20,550+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,551+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.vacuum.Plugin._customization >2019-02-26 17:06:20,553+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_database >2019-02-26 17:06:20,555+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_engine >2019-02-26 17:06:20,555+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,555+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== OVIRT ENGINE CONFIGURATION ==-- >2019-02-26 17:06:20,555+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,557+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._customization >2019-02-26 17:06:20,557+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,559+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._customization_enable >2019-02-26 17:06:20,559+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,561+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.vacuum.Plugin._customization >2019-02-26 17:06:20,563+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._customization >2019-02-26 17:06:20,563+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,565+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._customization_credentials >2019-02-26 17:06:20,565+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,567+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.domain_type.Plugin._customization >2019-02-26 17:06:20,568+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,569+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_engine >2019-02-26 17:06:20,571+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_storage >2019-02-26 17:06:20,572+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,572+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== STORAGE CONFIGURATION ==-- >2019-02-26 17:06:20,572+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,574+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.storage.Plugin._configureSANWipeAfterDelete >2019-02-26 17:06:20,574+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,576+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_storage >2019-02-26 17:06:20,578+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_pki >2019-02-26 17:06:20,578+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,578+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== PKI CONFIGURATION ==-- >2019-02-26 17:06:20,578+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,580+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._customization >2019-02-26 17:06:20,580+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,582+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._customization_upgrade >2019-02-26 17:06:20,585+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:813 execute: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/engine.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,593+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:863 execute-result: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/engine.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), rc=0 >2019-02-26 17:06:20,593+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:921 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/engine.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stdout: >Bag Attributes > localKeyID: 4E D1 ED 65 E3 BB C3 88 18 A3 C8 84 A0 CF 4F 21 DC 16 D4 CE >subject=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com >issuer=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com.80269 >-----BEGIN CERTIFICATE----- >MIIE5jCCA86gAwIBAgICEAEwDQYJKoZIhvcNAQELBQAwXjELMAkGA1UEBhMCVVMx >HjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxldmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtm >Mi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb20uODAyNjkwHhcNMTkwMjI1MTU0MzQ2 >WhcNMjQwMTMxMTU0MzQ2WjBYMQswCQYDVQQGEwJVUzEeMBwGA1UECgwVZGVtb3Nw >YWNlLnRlbGV2aWMuY29tMSkwJwYDVQQDDCBnYjYwa2YyLmRlbW9jdXN0b21lci50 >ZWxldmljLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMIscfo+ >smYK8wVC3ghU8TmKXBwonLqm+R1FahvaYIz0lCUiIFkdaWIKjDmlhWkDq/eYQNdt >Ta7OQP3YNCQH0XookGusYaJJRpxqwNnj4VJUms9BebmLCu3gbm+9k6YD0m2LBz+N >r81tXOs7JUdiT1U/TeOyeX/f+o2rXII0ecSnHup4T7dg93NCErhItScHwdo2uNMb >ufD+k5H9PrL+PprIiLIqbIxMPyFFQzUtIYDscRk1dIF3B+VGg5y2/l3kWj0uIEKt >c9NCZkRrZ+FbMBOR79kpiYAwf4Mnzoy13ozv7b2KVUj8Te5T7QyruWZp9yd0F6tD >K8MwM+S1XKRvxsECAwEAAaOCAbIwggGuMB0GA1UdDgQWBBT9rZZL7uOuZfyjrSHg >LEXSxOIWTzCBlwYIKwYBBQUHAQEEgYowgYcwgYQGCCsGAQUFBzAChnhodHRwOi8v >Z2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb206ODAvb3ZpcnQtZW5naW5l >L3NlcnZpY2VzL3BraS1yZXNvdXJjZT9yZXNvdXJjZT1jYS1jZXJ0aWZpY2F0ZSZm >b3JtYXQ9WDUwOS1QRU0tQ0EwgYgGA1UdIwSBgDB+gBSci9HQj9/0YKiGbLZ6LGKu >EqwcZqFipGAwXjELMAkGA1UEBhMCVVMxHjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxl >dmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5j >b20uODAyNjmCAhAAMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgWgMCAGA1UdJQEB >/wQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjArBgNVHREEJDAigiBnYjYwa2YyLmRl >bW9jdXN0b21lci50ZWxldmljLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAPGYHXTqV >1qFQLGfDh12VlAWHk4U159LGQV2cX2YgaWZxfDwWkOqLjUCQ9JTZoE8cuo+Ql6Bj >dKJBlSNlLE8t2d52luh2wcdR1Auph9EI5iLPD/tKuLug1tVJcuvaTaADNHEIOR6m >b6Qv1+nbHsDGgwyAunWP3oUgZLMcH2MaCEblix/3Sa2Q7eANjnzJny4UHH90k52y >opczG/P2rOB0IIAhGImvjcCotN9b7DstSNzXHEJ+xm5KGh19ThgMhK80G+mRw+dW >6ezgC77vxOlIrPLIW6EPmF08YgVljO0aecpbqKBPk+SR22FVEOGaii+Yyxf2R98s >FIxZoK6WPVzifg== >-----END CERTIFICATE----- > >2019-02-26 17:06:20,594+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:926 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/engine.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stderr: >MAC verified OK > >2019-02-26 17:06:20,594+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._has_SAN:300 subjectAltName: DNS:gb60kf2.democustomer.televic.com >2019-02-26 17:06:20,594+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:813 execute: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/jboss.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,603+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:863 execute-result: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/jboss.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), rc=0 >2019-02-26 17:06:20,603+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:921 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/jboss.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stdout: >Bag Attributes > localKeyID: C9 9F 88 0D C9 31 E0 68 9C 8E 3E 7F A0 98 A6 14 BC D4 9E CC >subject=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com >issuer=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com.80269 >-----BEGIN CERTIFICATE----- >MIIE5jCCA86gAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwXjELMAkGA1UEBhMCVVMx >HjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxldmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtm >Mi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb20uODAyNjkwHhcNMTkwMjI1MTU0MzQ2 >WhcNMjQwMTMxMTU0MzQ2WjBYMQswCQYDVQQGEwJVUzEeMBwGA1UECgwVZGVtb3Nw >YWNlLnRlbGV2aWMuY29tMSkwJwYDVQQDDCBnYjYwa2YyLmRlbW9jdXN0b21lci50 >ZWxldmljLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMYICWZ+ >GFw883FP+Uoby+O1CYXAOzBKAUCFHZeamiHRIUWkuzaAGMJXLHymjUZH9m+HM/8k >yxneFbHa5FC5RKRKoI20ambIRRLt7TtMAS0O1asxgfl/blJ99WHwSP0+vw9ZuaBR >97HplIFGL4ezKOmd8iO9xMj1BVUglfHK4Y08bxTKWwzChTWlaJqbyOCV40ecXWFx >aBMWU9JcTvif9RTn19LQqoRWYVAE3CY+9HqooxjGAtZsajsBMPB+l4tHjVIoOAjH >sQ0tWRygeryLLSexpHO+v4TQ75UHuhN3Q7BdWf0wi3T6Sk6eY3tXDMciVUJA/eud >j59Yekbd/ysKB1UCAwEAAaOCAbIwggGuMB0GA1UdDgQWBBTuJutB/yr+vYgZj0eH >own97ohbHzCBlwYIKwYBBQUHAQEEgYowgYcwgYQGCCsGAQUFBzAChnhodHRwOi8v >Z2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb206ODAvb3ZpcnQtZW5naW5l >L3NlcnZpY2VzL3BraS1yZXNvdXJjZT9yZXNvdXJjZT1jYS1jZXJ0aWZpY2F0ZSZm >b3JtYXQ9WDUwOS1QRU0tQ0EwgYgGA1UdIwSBgDB+gBSci9HQj9/0YKiGbLZ6LGKu >EqwcZqFipGAwXjELMAkGA1UEBhMCVVMxHjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxl >dmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5j >b20uODAyNjmCAhAAMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgWgMCAGA1UdJQEB >/wQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjArBgNVHREEJDAigiBnYjYwa2YyLmRl >bW9jdXN0b21lci50ZWxldmljLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAao9DhjIg >3kHlWp7bavEbL4sUkmf8NVQ47G0FApMmY52Me1x3P1ZKrFhESQoTfo8JJYBV31+1 >T4B6hF3u3PgrIub9T4fFhK2vnQyRYXEqC2q6lduuTQqBBDh6T+/rwT9OFd4zLoGP >M+bcdnhOEoS0C4pxyIxNX3jjLQPfLiScEDXlpr6lR3C01uEmBnu4diS0XDTXu5O7 >ZneGFfZ9xhvS2jK/98BS6YloWqm/6r0hebsfohiq4OV/IJizN6gPFBABnOMNyAqI >BfTg49x6Z6+/zNKWxMP3Mi7GRN3xTlqNwNGFHy4XcGynkoBoY2TMTaPC9a828Vgd >I657SVBKw8iY1g== >-----END CERTIFICATE----- > >2019-02-26 17:06:20,603+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:926 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/jboss.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stderr: >MAC verified OK > >2019-02-26 17:06:20,604+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._has_SAN:300 subjectAltName: DNS:gb60kf2.democustomer.televic.com >2019-02-26 17:06:20,604+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:813 execute: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/websocket-proxy.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,612+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:863 execute-result: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/websocket-proxy.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), rc=0 >2019-02-26 17:06:20,613+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:921 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/websocket-proxy.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stdout: >Bag Attributes > localKeyID: 01 B1 5C 14 17 EA F3 3B 85 85 A2 5D 89 04 FB 45 5E EF F2 F1 >subject=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com >issuer=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com.80269 >-----BEGIN CERTIFICATE----- >MIIE5jCCA86gAwIBAgICEAMwDQYJKoZIhvcNAQELBQAwXjELMAkGA1UEBhMCVVMx >HjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxldmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtm >Mi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb20uODAyNjkwHhcNMTkwMjI1MTU0MzQ3 >WhcNMjQwMTMxMTU0MzQ3WjBYMQswCQYDVQQGEwJVUzEeMBwGA1UECgwVZGVtb3Nw >YWNlLnRlbGV2aWMuY29tMSkwJwYDVQQDDCBnYjYwa2YyLmRlbW9jdXN0b21lci50 >ZWxldmljLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMOPL+Ae >EPmnlJg2LVudPLljjW+eVT9zP0zRTF+8yIPUHc8ozrFJgPiySb84Yf8clgHWqIAc >boKYz60oPB5MA2UwszBGnw7WPapQT9RmdNZrWv+ZxA/KhrCKrHJaKk0r0mcNbo+v >OgmyYJq8ZD2qyYWUqfCLpSqpPwc7mN1DFX+G4X7Eg9fW83DDWoymMXpBJItS+v/H >/1EDyx/k4HXkSZHDkyyQBPLG2wnfzTru1gYbO4HODpZKLGYn9AlL1E/N4KVA1HPB >nJu3shHnlis+J4gQYIC3jhefa7XiUpT5U8/YZJs4KY3OOujAIpRbzndorVXkV5RW >lvzB5kftySVKPNUCAwEAAaOCAbIwggGuMB0GA1UdDgQWBBTTk/wAvInm7ob44fA9 >PyXnLIl5qjCBlwYIKwYBBQUHAQEEgYowgYcwgYQGCCsGAQUFBzAChnhodHRwOi8v >Z2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb206ODAvb3ZpcnQtZW5naW5l >L3NlcnZpY2VzL3BraS1yZXNvdXJjZT9yZXNvdXJjZT1jYS1jZXJ0aWZpY2F0ZSZm >b3JtYXQ9WDUwOS1QRU0tQ0EwgYgGA1UdIwSBgDB+gBSci9HQj9/0YKiGbLZ6LGKu >EqwcZqFipGAwXjELMAkGA1UEBhMCVVMxHjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxl >dmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5j >b20uODAyNjmCAhAAMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgWgMCAGA1UdJQEB >/wQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjArBgNVHREEJDAigiBnYjYwa2YyLmRl >bW9jdXN0b21lci50ZWxldmljLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAiugI0Typ >aEl8a91GC2g1qC1MQX9/YvuhJbsJ2UJGZrpBPDm/SoCB99nq0HHuKWd08a6PiKE8 >cXEZHVJd0LZWxEIRefA9IpgFrMGv07n+u73GCZzq2JOSOoAi9rCpO2KQiJfD6PII >ok0LxyqUrdYfuQsQ66X0JzTWypc7kbfs7Lub6G3mrTDXupDb5EbgQw+we5wiBsnB >tkfTWjqGdd28ZVCs94Uj+dGgQKPJuKX64Qw22M9O72trNjk9JlFDmXk4CrbyF6Y2 >INzBZNpQLgair76rYLtxOZg78okxIS1pf0B8kfyw7UW9tskzTXP/ACvSfT+4EvPF >kprdWOwpyeV8zA== >-----END CERTIFICATE----- > >2019-02-26 17:06:20,613+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:926 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/websocket-proxy.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stderr: >MAC verified OK > >2019-02-26 17:06:20,613+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._has_SAN:300 subjectAltName: DNS:gb60kf2.democustomer.televic.com >2019-02-26 17:06:20,614+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:813 execute: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/apache.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,622+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:863 execute-result: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/apache.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), rc=0 >2019-02-26 17:06:20,622+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:921 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/apache.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stdout: >Bag Attributes > localKeyID: 2D 06 79 65 87 69 D3 C1 9E D2 1C C1 E6 A2 12 37 0C FA F9 9A >subject=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com >issuer=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com.80269 >-----BEGIN CERTIFICATE----- >MIIE5jCCA86gAwIBAgICEAQwDQYJKoZIhvcNAQELBQAwXjELMAkGA1UEBhMCVVMx >HjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxldmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtm >Mi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb20uODAyNjkwHhcNMTkwMjI1MTU0MzQ3 >WhcNMjQwMTMxMTU0MzQ3WjBYMQswCQYDVQQGEwJVUzEeMBwGA1UECgwVZGVtb3Nw >YWNlLnRlbGV2aWMuY29tMSkwJwYDVQQDDCBnYjYwa2YyLmRlbW9jdXN0b21lci50 >ZWxldmljLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMUIuFjH >WMxD6KSr4qwrcj24PXc1TjZWVMlqK1EMdPeWSyPb1JUGVGyPXq4OC/5xT+riRCa8 >IaIf//g26z0HBZ14FFwynQk53RbSG95zGow5COcYnswi+9Vma1VBKuD/G1owcjHA >tVFFmjaPSm22w0FR8ZxcH7nNNm3D+/oSaa1NtRZuphazga1Zb5xCbuTaMwzufoFt >CyUYXw8gng5Nl1iYeopwvnQdKG0X8DqozJroka4HTwqzkOa2C/7EVu2RI4G6gbOA >lHCR6STFgIi2zsMGTHcw4O8CwTL0gfRH93dAQz/+zZ3+pqqhbUW2TRbkU6HpSoGr >15WvKJPa6eV5++UCAwEAAaOCAbIwggGuMB0GA1UdDgQWBBTdD+1YAIcd5mk7yNFo >E+YhPJxd8zCBlwYIKwYBBQUHAQEEgYowgYcwgYQGCCsGAQUFBzAChnhodHRwOi8v >Z2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb206ODAvb3ZpcnQtZW5naW5l >L3NlcnZpY2VzL3BraS1yZXNvdXJjZT9yZXNvdXJjZT1jYS1jZXJ0aWZpY2F0ZSZm >b3JtYXQ9WDUwOS1QRU0tQ0EwgYgGA1UdIwSBgDB+gBSci9HQj9/0YKiGbLZ6LGKu >EqwcZqFipGAwXjELMAkGA1UEBhMCVVMxHjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxl >dmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5j >b20uODAyNjmCAhAAMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgWgMCAGA1UdJQEB >/wQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjArBgNVHREEJDAigiBnYjYwa2YyLmRl >bW9jdXN0b21lci50ZWxldmljLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAoQbClb7o >UkG5bN8YBR2FO5aFMZPVYgt1/7GEBM2+hBc7Yjcw+qKGIbznS9OGNVXE+3UaaCY5 >aMaWfcCMYJ1objvEbC5DPByqK2P8q1Jvdegv7QH1FLNb0tIMeGF/ewSsMDaxN5yI >vrXaozfklgM/DBuciMgKggE3ZFwhs3prjsZoqZFUwio0HEa0ODQn6PsKviBe0lys >Fq6pZ6uaRXoGzpumbuTzhCup9uHB8d4XZrrLTqIERDsd27CY4UFOrkrbJIz5SlL4 >ciiBzyl6vkHO28CD/V7pJXMsXx/GFzMCN7bDXWYYqqLIJuooq1KvwzvpNLpscxYX >5oYy3zLsmGhjhw== >-----END CERTIFICATE----- > >2019-02-26 17:06:20,623+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:926 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/apache.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stderr: >MAC verified OK > >2019-02-26 17:06:20,623+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._has_SAN:300 subjectAltName: DNS:gb60kf2.democustomer.televic.com >2019-02-26 17:06:20,623+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:813 execute: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/reports.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,632+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:863 execute-result: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/reports.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), rc=0 >2019-02-26 17:06:20,632+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:921 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/reports.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stdout: >Bag Attributes > localKeyID: 23 9D 9D 87 53 FE AF 02 0A 50 53 B1 70 19 AA 44 F0 6D 44 58 >subject=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com >issuer=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com.80269 >-----BEGIN CERTIFICATE----- >MIIE5jCCA86gAwIBAgICEAUwDQYJKoZIhvcNAQELBQAwXjELMAkGA1UEBhMCVVMx >HjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxldmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtm >Mi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb20uODAyNjkwHhcNMTkwMjI1MTU0MzQ3 >WhcNMjQwMTMxMTU0MzQ3WjBYMQswCQYDVQQGEwJVUzEeMBwGA1UECgwVZGVtb3Nw >YWNlLnRlbGV2aWMuY29tMSkwJwYDVQQDDCBnYjYwa2YyLmRlbW9jdXN0b21lci50 >ZWxldmljLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAORnvb4x >LxyYMmGh5hYAcWQP2jjvHR7VUbvA2gYLVhIVO5Dkky/wC3IWZBsWnZE3At/5mT3v >2pDRY3xdhO/wF4RDgdv3LGVlAPWn2RGBa+nxZJjAheGht4yp/uBE3xGlyKjmNVwU >2VKGxlMcFNKiyNRxnMqfykMeC4I/ABcOkp25zx5G84rClykrNSl1Fr94v6SOcZbe >lwzjntWddjLW3ASt1eeoxMFBw91gRAmM6MZ2xD+RLhT+mU2/tsw0ug6XNrwDTHkO >tQRkwPuTdOk31zY6cWPkgmncoCoZgQdICzQ4k/jQe05glxZcpO/HvyO5M+o9/WeF >RfpkiCbP3+FKgpMCAwEAAaOCAbIwggGuMB0GA1UdDgQWBBSScop1Hm6qnbNBjrWE >eoe0zYYVBzCBlwYIKwYBBQUHAQEEgYowgYcwgYQGCCsGAQUFBzAChnhodHRwOi8v >Z2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb206ODAvb3ZpcnQtZW5naW5l >L3NlcnZpY2VzL3BraS1yZXNvdXJjZT9yZXNvdXJjZT1jYS1jZXJ0aWZpY2F0ZSZm >b3JtYXQ9WDUwOS1QRU0tQ0EwgYgGA1UdIwSBgDB+gBSci9HQj9/0YKiGbLZ6LGKu >EqwcZqFipGAwXjELMAkGA1UEBhMCVVMxHjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxl >dmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5j >b20uODAyNjmCAhAAMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgWgMCAGA1UdJQEB >/wQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjArBgNVHREEJDAigiBnYjYwa2YyLmRl >bW9jdXN0b21lci50ZWxldmljLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEASoA4sC29 >ob6p6GozC5yCD0LEAqbxEwXuMjfC0hDQVelzqi5C7OjHOPYFKMjwEI0A6BpzESpn >HnKma7nraJPybLUMuT2bmtiVObG8Bu64U0VgFP6gPAHSXlrTLP6BaZ3x8F40m59h >dm8iNYqM3OC0jMVZjSdhsfZfYAJP59oMTQoULWt0o5dX2leHPG+pBcEddRmCFIrq >yvM6jHwrnl2tsVxZBkLdq/qxBYBp6TNtrJ+Janc1bZLM4FNdBevVgLET2bEurjYk >besVKpBO+xipTw2CTXFQUlXkT6pngdsiFxr5oaDcROJg+urgw1aO1i8ENBToi8dw >SxiwtuoEyS7j+w== >-----END CERTIFICATE----- > >2019-02-26 17:06:20,632+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:926 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/reports.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stderr: >MAC verified OK > >2019-02-26 17:06:20,633+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._has_SAN:300 subjectAltName: DNS:gb60kf2.democustomer.televic.com >2019-02-26 17:06:20,633+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:813 execute: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/imageio-proxy.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,642+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.executeRaw:863 execute-result: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/imageio-proxy.p12', '-passin', 'pass:**FILTERED**', '-nokeys'), rc=0 >2019-02-26 17:06:20,642+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:921 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/imageio-proxy.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stdout: >Bag Attributes > localKeyID: 56 C6 66 64 6F B9 74 47 D0 1C 00 29 2A 31 93 30 0E A5 93 7D >subject=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com >issuer=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com.80269 >-----BEGIN CERTIFICATE----- >MIIE5jCCA86gAwIBAgICEAYwDQYJKoZIhvcNAQELBQAwXjELMAkGA1UEBhMCVVMx >HjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxldmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtm >Mi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb20uODAyNjkwHhcNMTkwMjI1MTU0MzQ3 >WhcNMjQwMTMxMTU0MzQ3WjBYMQswCQYDVQQGEwJVUzEeMBwGA1UECgwVZGVtb3Nw >YWNlLnRlbGV2aWMuY29tMSkwJwYDVQQDDCBnYjYwa2YyLmRlbW9jdXN0b21lci50 >ZWxldmljLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJTspsCD >2y/+hswsPwkjVHWi2D3JDdC/KjWHmPbYboPPBkcYTXOubBbVuzvXhoycb9cndqTX >atk29p1GfMeCBK6HHaYqPX6KV6MYLZQtMOGcofleppbuM+Sw5le0umwYw3bYnQS5 >d374wHd6u85dFsORKHReiz4vPXLnloyp65wQtVDa07YxI/SYP6OvF7fKsQ7J/VUz >ZZ4s8J1pgr617GJoZjjV2SOY0a2l6dDPBjcUE597wfD0Vgm05BHZhbLGJ6vvfFq+ >F5yayhuVINuVCkyrnNy6ZSqz6P+eyjFHkKONNMiWf/26Le6CXhSiFxisheKIb5Nq >sEBHj0rjw1PC/ncCAwEAAaOCAbIwggGuMB0GA1UdDgQWBBTLT84bsC7+Ju1nvLbm >XqZ/0918OTCBlwYIKwYBBQUHAQEEgYowgYcwgYQGCCsGAQUFBzAChnhodHRwOi8v >Z2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb206ODAvb3ZpcnQtZW5naW5l >L3NlcnZpY2VzL3BraS1yZXNvdXJjZT9yZXNvdXJjZT1jYS1jZXJ0aWZpY2F0ZSZm >b3JtYXQ9WDUwOS1QRU0tQ0EwgYgGA1UdIwSBgDB+gBSci9HQj9/0YKiGbLZ6LGKu >EqwcZqFipGAwXjELMAkGA1UEBhMCVVMxHjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxl >dmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5j >b20uODAyNjmCAhAAMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgWgMCAGA1UdJQEB >/wQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjArBgNVHREEJDAigiBnYjYwa2YyLmRl >bW9jdXN0b21lci50ZWxldmljLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAjkh6nsws >OkxoWHl8EWWf7uYg4NyXnAgzq/h1u6DWNoKO7l5A8Vs0EJbhxtzD+H5JpdJyiY7U >iPgdHH25nKc4q6VhqzRqFjjVDsXf67PBofllUz/IyBZ1MVtMFl/bHuFT0gN4PKy8 >X0YBW1OXxVIUlfg9ud9WbojtkTiss5iliscf7z5yW5MW+dG7jjK5q09jrQLKcs4+ >c+42I+38R42KUIN7r2A+jqqj3NCd1IWYQV95nigpdwCHp1K8opJIjuGPYfrvDOdq >E8348CwlxV2oZjt5MFgu4cDQBU+ujnH+OGwggXIw6YPi95nH12s83+uEfqmATIry >tJq3/gv7igZdZA== >-----END CERTIFICATE----- > >2019-02-26 17:06:20,643+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca plugin.execute:926 execute-output: ('/usr/bin/openssl', 'pkcs12', '-in', '/etc/pki/ovirt-engine/keys/imageio-proxy.p12', '-passin', 'pass:**FILTERED**', '-nokeys') stderr: >MAC verified OK > >2019-02-26 17:06:20,643+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._has_SAN:300 subjectAltName: DNS:gb60kf2.democustomer.televic.com >2019-02-26 17:06:20,646+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._customization >2019-02-26 17:06:20,646+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,648+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._customization >2019-02-26 17:06:20,648+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,650+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_pki >2019-02-26 17:06:20,652+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_apache >2019-02-26 17:06:20,652+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,652+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== APACHE CONFIGURATION ==-- >2019-02-26 17:06:20,653+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,655+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._customization >2019-02-26 17:06:20,655+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,657+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._customization >2019-02-26 17:06:20,657+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,659+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._customization_already_configured >2019-02-26 17:06:20,659+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,661+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_apache >2019-02-26 17:06:20,663+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_system >2019-02-26 17:06:20,663+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,663+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== SYSTEM CONFIGURATION ==-- >2019-02-26 17:06:20,663+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,665+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._customization_disable >2019-02-26 17:06:20,667+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._customization_firewall >2019-02-26 17:06:20,668+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,668+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldServices=list:'[{'absolute_path': '/usr/lib/firewalld/services/ovn-central-firewall-service.xml', 'name': 'ovn-central-firewall-service'}, {'absolute_path': '/usr/lib/firewalld/services/ovirt-provider-ovn.xml', 'name': 'ovirt-provider-ovn'}, {'directory': 'ovirt-common', 'name': 'ovirt-http'}, {'directory': 'ovirt-common', 'name': 'ovirt-https'}, {'directory': 'vmconsole-proxy', 'name': 'ovirt-vmconsole-proxy'}, {'directory': 'ovirt-imageio-proxy', 'name': 'ovirt-imageio-proxy'}]' >2019-02-26 17:06:20,668+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldSubst=dict:'{'@HTTPS_PORT@': 443, '@VMCONSOLE_PROXY_PORT@': 2222, '@HTTP_PORT@': 80, '@IMAGEIO_PROXY_PORT@': 54323, '@JBOSS_HTTPS_PORT@': None, '@JBOSS_HTTP_PORT@': None}' >2019-02-26 17:06:20,668+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,669+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._customization_firewall >2019-02-26 17:06:20,670+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,670+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldServices=list:'[{'absolute_path': '/usr/lib/firewalld/services/ovn-central-firewall-service.xml', 'name': 'ovn-central-firewall-service'}, {'absolute_path': '/usr/lib/firewalld/services/ovirt-provider-ovn.xml', 'name': 'ovirt-provider-ovn'}, {'directory': 'ovirt-common', 'name': 'ovirt-http'}, {'directory': 'ovirt-common', 'name': 'ovirt-https'}, {'directory': 'vmconsole-proxy', 'name': 'ovirt-vmconsole-proxy'}, {'directory': 'ovirt-imageio-proxy', 'name': 'ovirt-imageio-proxy'}, {'directory': 'websocket-proxy', 'name': 'ovirt-websocket-proxy'}]' >2019-02-26 17:06:20,671+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldSubst=dict:'{'@WEBSOCKET_PROXY_PORT@': 6100, '@HTTPS_PORT@': 443, '@VMCONSOLE_PROXY_PORT@': 2222, '@HTTP_PORT@': 80, '@IMAGEIO_PROXY_PORT@': 54323, '@JBOSS_HTTPS_PORT@': None, '@JBOSS_HTTP_PORT@': None}' >2019-02-26 17:06:20,671+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,672+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._customization_firewall >2019-02-26 17:06:20,673+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,673+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldServices=list:'[{'absolute_path': '/usr/lib/firewalld/services/ovn-central-firewall-service.xml', 'name': 'ovn-central-firewall-service'}, {'absolute_path': '/usr/lib/firewalld/services/ovirt-provider-ovn.xml', 'name': 'ovirt-provider-ovn'}, {'directory': 'ovirt-common', 'name': 'ovirt-http'}, {'directory': 'ovirt-common', 'name': 'ovirt-https'}, {'directory': 'vmconsole-proxy', 'name': 'ovirt-vmconsole-proxy'}, {'directory': 'ovirt-imageio-proxy', 'name': 'ovirt-imageio-proxy'}, {'directory': 'websocket-proxy', 'name': 'ovirt-websocket-proxy'}, {'directory': 'ovirt-engine', 'name': 'ovirt-fence-kdump-listener'}]' >2019-02-26 17:06:20,673+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,674+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_system >2019-02-26 17:06:20,676+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_s_misc >2019-02-26 17:06:20,676+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,676+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== MISC CONFIGURATION ==-- >2019-02-26 17:06:20,676+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,678+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.scale.Plugin._customization >2019-02-26 17:06:20,679+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.scale dialog.queryEnvKey:90 queryEnvKey called for key OVESETUP_DWH_CONFIG/scale >2019-02-26 17:06:20,681+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.dialog.titles.Plugin._title_e_misc >2019-02-26 17:06:20,681+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,681+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== END OF CONFIGURATION ==-- >2019-02-26 17:06:20,681+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:20,683+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.otopi.core.config.Plugin._customize2 >2019-02-26 17:06:20,685+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._customization_firewall >2019-02-26 17:06:20,685+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,687+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._customization_firewall >2019-02-26 17:06:20,688+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,688+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldServices=list:'[{'absolute_path': '/usr/lib/firewalld/services/ovn-central-firewall-service.xml', 'name': 'ovn-central-firewall-service'}, {'absolute_path': '/usr/lib/firewalld/services/ovirt-provider-ovn.xml', 'name': 'ovirt-provider-ovn'}, {'directory': 'ovirt-common', 'name': 'ovirt-http'}, {'directory': 'ovirt-common', 'name': 'ovirt-https'}, {'directory': 'vmconsole-proxy', 'name': 'ovirt-vmconsole-proxy'}, {'directory': 'ovirt-imageio-proxy', 'name': 'ovirt-imageio-proxy'}, {'directory': 'websocket-proxy', 'name': 'ovirt-websocket-proxy'}, {'directory': 'ovirt-engine', 'name': 'ovirt-fence-kdump-listener'}, {'directory': 'ovirt-common', 'name': 'ovirt-postgres'}]' >2019-02-26 17:06:20,688+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,689+0100 DEBUG otopi.context context._executeMethod:127 Stage customization METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._customization_firewall >2019-02-26 17:06:20,690+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,690+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldServices=list:'[{'absolute_path': '/usr/lib/firewalld/services/ovn-central-firewall-service.xml', 'name': 'ovn-central-firewall-service'}, {'absolute_path': '/usr/lib/firewalld/services/ovirt-provider-ovn.xml', 'name': 'ovirt-provider-ovn'}, {'directory': 'ovirt-common', 'name': 'ovirt-http'}, {'directory': 'ovirt-common', 'name': 'ovirt-https'}, {'directory': 'vmconsole-proxy', 'name': 'ovirt-vmconsole-proxy'}, {'directory': 'ovirt-imageio-proxy', 'name': 'ovirt-imageio-proxy'}, {'directory': 'websocket-proxy', 'name': 'ovirt-websocket-proxy'}, {'directory': 'ovirt-engine', 'name': 'ovirt-fence-kdump-listener'}, {'directory': 'ovirt-common', 'name': 'ovirt-postgres'}, {'directory': 'ovirt-common', 'name': 'ovirt-postgres'}]' >2019-02-26 17:06:20,691+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,691+0100 INFO otopi.context context.runSequence:610 Stage: Setup validation >2019-02-26 17:06:20,691+0100 DEBUG otopi.context context.runSequence:614 STAGE validation >2019-02-26 17:06:20,692+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.otopi.core.misc.Plugin._validation >2019-02-26 17:06:20,692+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,692+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/aborted=bool:'False' >2019-02-26 17:06:20,692+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/debug=int:'0' >2019-02-26 17:06:20,692+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/error=bool:'False' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/exceptionInfo=list:'[]' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/executionDirectory=str:'/root' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/exitCode=list:'[{'priority': 90001, 'code': 0}]' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/log=bool:'True' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/pluginGroups=str:'otopi:ovirt-engine-common:ovirt-engine-setup:ovirt-engine-checks' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/pluginPath=str:'/usr/share/otopi/plugins:/usr/share/ovirt-engine/setup/bin/../plugins' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/suppressEnvironmentKeys=list:'[]' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/chkconfig=str:'/usr/sbin/chkconfig' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/chronyc=str:'/usr/bin/chronyc' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/date=str:'/usr/bin/date' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/dig=str:'/usr/bin/dig' >2019-02-26 17:06:20,693+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/exportfs=str:'/usr/sbin/exportfs' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/firewall-cmd=str:'/usr/bin/firewall-cmd' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/hwclock=str:'/usr/sbin/hwclock' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/initctl=NoneType:'None' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ip=str:'/usr/sbin/ip' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ntpq=str:'/usr/sbin/ntpq' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/openssl=str:'/usr/bin/openssl' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/pg_dump=str:'/opt/rh/rh-postgresql10/root/usr/bin/pg_dump' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/pg_restore=str:'/opt/rh/rh-postgresql10/root/usr/bin/pg_restore' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/postgresql-setup=str:'/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/psql=str:'/opt/rh/rh-postgresql10/root/usr/bin/psql' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/python3=NoneType:'None' >2019-02-26 17:06:20,694+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/rc=NoneType:'None' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/rc-update=NoneType:'None' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/reboot=str:'/usr/sbin/reboot' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/restorecon=str:'/usr/sbin/restorecon' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/rpm=str:'/usr/bin/rpm' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/selinuxenabled=str:'/usr/sbin/selinuxenabled' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/semanage=str:'/usr/sbin/semanage' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/service=str:'/usr/sbin/service' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ssh-keygen=NoneType:'None' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/sysctl=str:'/usr/sbin/sysctl' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/systemctl=str:'/usr/bin/systemctl' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/configFileAppend=str:':/tmp/answerfile-20190226170545Z.txt' >2019-02-26 17:06:20,695+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/configFileName=str:'/etc/ovirt-engine-setup.conf' >2019-02-26 17:06:20,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/failOnPrioOverride=bool:'True' >2019-02-26 17:06:20,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/internalPackageTransaction=Transaction:'transaction' >2019-02-26 17:06:20,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logDir=str:'/var/log/ovirt-engine/setup' >2019-02-26 17:06:20,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileHandle=file:'<open file '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', mode 'a' at 0x7f1fe50f6a50>' >2019-02-26 17:06:20,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileName=str:'/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log' >2019-02-26 17:06:20,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileNamePrefix=str:'ovirt-engine-setup' >2019-02-26 17:06:20,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilter=_MyLoggerFilter:'filter' >2019-02-26 17:06:20,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilterKeys=list:'['OVESETUP_DWH_DB/password', 'OVESETUP_DB/password', 'OVESETUP_CONFIG/remoteEngineHostRootPassword', 'OVESETUP_DB/password', 'OVESETUP_PKI/storePassword', 'OVESETUP_CONFIG/adminPassword', 'OVESETUP_OVN/ovirtProviderOvnSecret', 'OVESETUP_OVN/ovirtProviderOvnPassword', 'OVESETUP_CL_DB/password']' >2019-02-26 17:06:20,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilterRe=list:'[<_sre.SRE_Pattern object at 0x2363440>]' >2019-02-26 17:06:20,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logRemoveAtExit=bool:'False' >2019-02-26 17:06:20,696+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/mainTransaction=Transaction:'transaction' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/modifiedFiles=list:'[]' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/randomizeEvents=bool:'False' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/answerFile=NoneType:'None' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/autoAcceptDefault=bool:'True' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/boundary=str:'--=451b80dc-996f-432e-9e4f-2b29ef6d1141=--' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/cliVersion=int:'1' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/customization=bool:'False' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/dialect=str:'human' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_NAME=str:'otopi' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_VERSION=str:'1.8.1_master' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/firewalldAvailable=bool:'True' >2019-02-26 17:06:20,697+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/firewalldDisableServices=list:'[]' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/firewalldEnable=bool:'False' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/iptablesEnable=bool:'False' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/iptablesRules=NoneType:'None' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/sshEnable=bool:'False' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/sshKey=NoneType:'None' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/sshUser=str:'' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/enableUpgrade=NoneType:'None' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/requireRollback=NoneType:'None' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockApply=list:'['ovirt-engine-extension-aaa-jdbc', 'ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay', 'ovirt-engine', 'ovirt-engine-backend', 'ovirt-engine-dbscripts', 'ovirt-engine-restapi', 'ovirt-engine-tools', 'ovirt-engine-tools-backup', 'ovirt-engine-webadmin-portal', 'ovirt-engine-ui-extensions', 'ovirt-engine-dwh']' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockFilter=list:'['ovirt-engine-extension-aaa-jdbc', 'ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay', 'ovirt-engine', 'ovirt-engine-dwh', 'ovirt-engine-dwh-setup']' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configFileOvirtEngine=str:'/etc/httpd/conf.d/z-ovirt-engine-proxy.conf' >2019-02-26 17:06:20,698+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configFileOvirtRoot=str:'/etc/httpd/conf.d/ovirt-engine-root-redirect.conf' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configFileSsl=str:'/etc/httpd/conf.d/ssl.conf' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configureRootRedirection=NoneType:'None' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configureRootRedirectionDefault=bool:'True' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configureSsl=NoneType:'None' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configured=bool:'True' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/enable=bool:'True' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/httpdService=str:'httpd' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/needRestart=bool:'False' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ASYNC/clearTasks=bool:'True' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ASYNC/clearTasksWait=int:'20' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/connection=NoneType:'None' >2019-02-26 17:06:20,699+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/database=NoneType:'None' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/dumper=str:'pg_custom' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/enable=bool:'False' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/filter=NoneType:'None' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/host=NoneType:'None' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/justRestored=bool:'False' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/needDBMSUpgrade=bool:'False' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/newDatabase=bool:'True' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/password=NoneType:'None' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/pgPassFile=NoneType:'None' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/port=NoneType:'None' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/restoreJobs=int:'2' >2019-02-26 17:06:20,700+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/secured=NoneType:'None' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/securedHostValidation=NoneType:'None' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/statement=NoneType:'None' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/user=NoneType:'None' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_PROVISIONING/postgresProvisioningEnabled=NoneType:'None' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/addOvirtGlanceRepository=bool:'True' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminPassword=str:'**FILTERED**' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUser=str:'admin@internal' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserAuthzName=str:'internal-authz' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserAuthzType=str:'ovirt-engine-extension-aaa-jdbc' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserId=str:'50a91983-19f1-4193-9755-227c79ab5e36' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserNamespace=str:'*' >2019-02-26 17:06:20,701+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/applicationMode=NoneType:'None' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/continueSetupOnHEVM=NoneType:'None' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineDbBackupDir=str:'/var/lib/ovirt-engine/backups' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineHeapMax=str:'3928M' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineHeapMin=str:'3928M' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineServiceStopNeeded=bool:'True' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fenceKdumpListenerStopNeeded=bool:'True' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallChangesReview=NoneType:'None' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallManager=str:'firewalld' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallManagers=list:'[<otopi.plugins.ovirt_engine_common.base.network.firewall_manager_firewalld._FirewalldManager object at 0x7f1fdf5ab9d0>, <otopi.plugins.ovirt_engine_common.base.network.firewall_manager_human._HumanManager object at 0x7f1fdf5abd90>, <otopi.plugins.ovirt_engine_common.base.network.firewall_manager_iptables._IpTablesManager object at 0x7f1fdf5abdd0>]' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdn=str:'gb60kf2.democustomer.televic.com' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdnIsNeeded=bool:'True' >2019-02-26 17:06:20,702+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdnNonLoopback=bool:'False' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdnReverseValidation=bool:'False' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/httpPort=int:'80' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/httpsPort=int:'443' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/ignoreVdsgroupInNotifier=NoneType:'None' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyConfig=bool:'True' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyHost=str:'localhost' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyPort=int:'54323' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyStopNeeded=bool:'True' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainACL=NoneType:'None' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainDefaultMountPoint=str:'/var/lib/exports/iso' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainExists=bool:'False' >2019-02-26 17:06:20,703+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainMountPoint=NoneType:'None' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainName=NoneType:'None' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainSdUuid=NoneType:'None' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainStorageDir=NoneType:'None' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoPathsToUpload=list:'['/usr/share/virtio-win/virtio-win_x86.vfd', '/usr/share/virtio-win/virtio-win_amd64.vfd', '/usr/share/virtio-win/virtio-win.iso', '/usr/share/ovirt-guest-tools-iso/ovirt-tools-setup.iso', '/usr/share/rhev-guest-tools-iso/rhev-tools-setup.iso', '/usr/share/rhv-guest-tools-iso/rhv-tools-setup.iso']' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/javaHome=NoneType:'None' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/javaNeeded=bool:'True' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossAjpPort=int:'8702' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossDebugAddress=str:'127.0.0.1:8787' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossDirectHttpPort=NoneType:'None' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossDirectHttpsPort=NoneType:'None' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossHome=str:'/usr/share/ovirt-engine-wildfly' >2019-02-26 17:06:20,704+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossHttpPort=int:'8080' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossHttpsPort=int:'8443' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossNeeded=bool:'True' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/needCommonTitles=bool:'True' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/pkiOIPCSRFilename=NoneType:'None' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/pkiRenewalDocUrl=str:'https://www.ovirt.org/develop/release-management/features/infra/pki-renew/' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/pkiWSPCSRFilename=NoneType:'None' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/publicHttpPort=int:'80' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/publicHttpsPort=int:'443' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostClientKey=NoneType:'None' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostKnownHosts=NoneType:'None' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostRootPassword=NoneType:'None' >2019-02-26 17:06:20,705+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostSshPort=NoneType:'None' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineSetupStyle=NoneType:'None' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineSetupStyles=list:'[<otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_root_ssh._RootSshManager object at 0x7f1fdf5ab6d0>, <otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_manual_files._ManualFiles object at 0x7f1fdf5ab910>]' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/sanWipeAfterDelete=bool:'False' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/storageIsLocal=bool:'False' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/storageType=NoneType:'None' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/totalMemoryMB=int:'15715' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/updateFirewall=bool:'True' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/validFirewallManagers=str:'' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/vmconsoleProxyStopNeeded=bool:'True' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyConfig=bool:'True' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyHost=str:'localhost' >2019-02-26 17:06:20,706+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyPort=int:'6100' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyStopNeeded=bool:'True' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/action=str:'setup' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/answerFile=NoneType:'None' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/developerMode=bool:'False' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/engineStop=NoneType:'None' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/failOnDulicatedConstant=bool:'False' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/generatePostInstall=bool:'True' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/generateStandardAnswerfile=bool:'True' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/generatedByVersion=str:'4.3.1.2_master' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/offlinePackager=bool:'False' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/originalGeneratedByVersion=str:'4.3.1.2_master' >2019-02-26 17:06:20,707+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/reconfigureOptionalComponents=NoneType:'None' >2019-02-26 17:06:20,708+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/registerUninstallGroups=RegisterGroups:'<otopi.plugins.ovirt_engine_common.base.core.uninstall.RegisterGroups object at 0x7f1fdf5a12d0>' >2019-02-26 17:06:20,708+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/remoteEngine=RemoteEngine:'<ovirt_engine_setup.remote_engine.RemoteEngine object at 0x7f1fdf5ab490>' >2019-02-26 17:06:20,708+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/setupAttributesModules=list:'[<module 'ovirt_engine_setup.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/constants.pyc'>, <module 'ovirt_engine_setup.engine_common.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/constants.pyc'>, <module 'ovirt_engine_setup.engine.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/constants.pyc'>, <module 'ovirt_engine_setup.cinderlib.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/cinderlib/constants.pyc'>, <module 'ovirt_engine_setup.websocket_proxy.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/websocket_proxy/constants.pyc'>, <module 'ovirt_engine_setup.dwh.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/dwh/constants.pyc'>, <module 'ovirt_engine_setup.ovirt_imageio_proxy.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/ovirt_imageio_proxy/constants.pyc'>, <module 'ovirt_engine_setup.vmconsole_proxy_helper.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/vmconsole_proxy_helper/constants.pyc'>]' >2019-02-26 17:06:20,708+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallFilesInfo=dict:'{'/etc/pki/ovirt-engine/keys/reports.key.nopass': {'sha256': '5786546ba359fa30cc1aafa2f8184920aff22a0242af8c896e622bff6915654a', 'groups': ['ca_pki'], 'changed': False}, '/etc/yum/pluginconf.d/versionlock.list': {'sha256': 'b24d4cbdd21257b2bd18a2d0c74215914c6c6af6669982db603ad5536c33c85c', 'groups': ['unremovable'], 'changed': False}, '/etc/httpd/conf.d/ovirt-engine-root-redirect.conf': {'sha256': '725e6910924daf7b0ee32850d87e5ca34044466a83bab52e4701b36007c0605e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/cacert.conf': {'sha256': '8e6283fb385e553115e552a728c83305e19b579b896d38366ef6cb2ecb47b369', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-vmconsole/ca.pub': {'sha256': 'b1ccf8cb0574165993635052971e3e446dfc113969163ee0090355661f3c6035', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/imageio-proxy.key.nopass': {'sha256': '05d63444b83788dda4b6587313614d25708e45d3a5453b86c724bf1649c15dcc', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-websocket-proxy.xml': {'sha256': 'a3e2c90d0f9376eae859c80ec34fdfeddddb14d71d8e4ce7ac5451caaf92c626', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/vmconsole-proxy-user-cert.pub': {'sha256': '97821c32d42b4922621ed7ff231c395e3fd7d1cc7ff7a0c1b60bdb783b144cbb', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-engine/.truststore': {'sha256': '0208bd660df27eb6f41b7b6bf7cc3d85172f4a20c212bed8ede03d76f30dee1f', 'groups': ['ca_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-postgres.xml': {'sha256': 'ec1497fa614341e63f87356f45d355725cffd002f88f9c06f4cc4d22b8c6a111', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/vmconsole-proxy-helper.cer': {'sha256': '489067aa36a0e7156a4f7b133b017ba157f79f8eaa8cbf7d94caf464ed988a2e', 'groups': ['vmconsole_proxy_helper_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-provider-ovn.xml': {'sha256': '160675cdc8b9f21799dc0a4e128c92a538c39e0b2a9211db2b1075791e72499e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/ca.pem': {'sha256': 'acab4732736542e99d9acd3889b7770137ebd9ce3b903058c56fd402ce3bb2b5', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/certs/vmconsole-proxy-host-cert.pub': {'sha256': '6f42b0a2b51944325376725c5d296d6a40800e0b3f05ff530862a90aeb98f9fa', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf': {'sha256': '148cc4885960c035e4a144e8be309ee5387341a1141a7ffb84c103b30cfb1c57', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/extensions.d/internal-authz.properties': {'sha256': '8f725950bc98cf5ebc90b49a7164232bbc96dba496cdff49fb8695810c3ed25d', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovn-central-firewall-service.xml': {'sha256': '5e333ccf96a4ced8db8c7d6fce1103a9176d8ed6dd92aa3c65b4591019610479', 'groups': ['core'], 'changed': False}, '/etc/httpd/conf.d/ssl.conf': {'sha256': '16a0d7280fa0233a430b95a9e26ed932cc1cd37d95f97503c49bdcb278e46f34', 'groups': ['unremovable'], 'changed': False}, '/etc/pki/ovirt-engine/certs/ovn-ndb.cer': {'sha256': '6f9f3b3975cc56949fad8f2436ae13147060ac0d885524d27556e95defdeab4a', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-vmconsole-proxy.xml': {'sha256': '79572b94e2659e3fa00e05daef86ed585eb4c0b0fa2bf1a294f3931d682aaa43', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovirt-https.xml': {'sha256': '4c9dcba46006fd50fc5b3c2cae4c80b511a0b1cb85d8485564396e792227ed74', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/cacert.template': {'sha256': '8e6283fb385e553115e552a728c83305e19b579b896d38366ef6cb2ecb47b369', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf': {'sha256': '4b7456eb6f9fd945cf73d0c4ee42ba7eef326e7242f5c4bd1bbdecaa2640b4f5', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-http.xml': {'sha256': 'dae71c32b5e1f48169289864a4b6aaf0f05ed275411ca0e48f754bee38839c4b', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovirt-imageio-proxy.xml': {'sha256': '9fd6c2d442292be1a3e2bb76e01be7fdd48109581f6fcc74ca695f4fe5d70fce', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/cert.conf': {'sha256': 'f5e5f1f639a3739b1706f70908185225aa54737a03750461ce79be9182959bd3', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-uuid.conf': {'sha256': '89207814d037350e2145bf137a5b97ed7452d5c67af825a6af237ed0d6b12e6b', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_user_rsa-cert.pub': {'sha256': '97821c32d42b4922621ed7ff231c395e3fd7d1cc7ff7a0c1b60bdb783b144cbb', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-engine/certs/ovn-sdb.cer': {'sha256': '0e95c592994203f493a1748c63c70a1ef4258bfd3524748db062305ba7c46e5f', 'groups': ['ca_pki'], 'changed': False}, '/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf': {'sha256': 'e473a6d26516e2d53f2656419e2b972e7b8a98fabf8062152dd658cc87803103', 'groups': ['core', 'unremovable'], 'changed': False}, '/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf': {'sha256': '756d8fd6fc3dba3fbcdbb67f976fdcd3674d142186acba1f2d1f49eef9e4b90d', 'groups': ['core', 'unremovable'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-pki.conf': {'sha256': '473acc826d85e13c12a1963408c09236c0ae0df3dd273d01c2662615857c908c', 'groups': ['ca_config'], 'changed': False}, '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf': {'sha256': 'a56c71dbd4ffa4c4ef5e2242ba293c74526a6639e0ad74dcde0d0194e3385da4', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/ovirt-imageio-proxy/ovirt-imageio-proxy.conf': {'sha256': 'f318c37839090c1293601e99c175df6de5c031789402484cb87047c61cd67b1e', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf': {'sha256': '787af541ce3a5f3cc94a8cc5b69836185c85eb27ac7674968829fda2295fe5e8', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/firewalld/services/ovirt-vmconsole-proxy.xml': {'sha256': '79572b94e2659e3fa00e05daef86ed585eb4c0b0fa2bf1a294f3931d682aaa43', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-dwh-database.conf': {'sha256': 'c9ca6fb104a7f278d8f8967305eca046e08aa32925671dd4b000665cc6d5dc21', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-java.conf': {'sha256': '428cf474ba75072c2b43094d28531b8e20de57d5a61804cbe1e73e29b03d4d9a', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/ovirt-provider-ovn-conf.example': {'sha256': 'd103404352547707ef1c5e7554d8b9cfa46565831f7f5dac2b22c860b0676df6', 'groups': ['ovirt-provider-ovn'], 'changed': False}, '/etc/ovirt-engine/isouploader.conf.d/10-engine-setup.conf': {'sha256': '78a4331e420caa644e54eb50d27feabaab74640be84a8bc63d1db8a1ed907782', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/11-setup-sso.conf': {'sha256': 'c9e19cc3a7cfee6b7ba4ab2558173415609f524e920a72a0b24a0f90cc05c1bf', 'groups': ['core'], 'changed': False}, '/etc/yum/pluginconf.d/versionlock.conf': {'sha256': '7704b1e5aec28208978d1d82ea7426741f5a46c603058bfc0c40caaeffabddf4', 'groups': ['unremovable'], 'changed': False}, '/etc/pki/ovirt-engine/certs/apache.cer': {'sha256': '7266f5cf82cf35bf7a56b00a45ae44148cfeca3253b41973acad045f1cca8f06', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/iptables.example': {'sha256': '0bcb04737d92298c4d073c0eb5a341b121861b6840871a87615f67e39c91a03e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/apache.key.nopass': {'sha256': 'eeeebb779eef7f386e9134e173f1522da4568f66c7fa54cda05acdbe75cbf2ad', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/apache-ca.pem': {'sha256': 'acab4732736542e99d9acd3889b7770137ebd9ce3b903058c56fd402ce3bb2b5', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/aaa/internal.properties': {'sha256': '1c543148b3d3a613237a61a7d37929a437d45189f5a59c339e82219bb895acc3', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/vmconsole-proxy-helper.key.nopass': {'sha256': '83ff5b10f2e9e4db76f696330a5a5a6e6ae137a0ff7e88be4143f3c0f157c872', 'groups': ['vmconsole_proxy_helper_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-imageio-proxy.xml': {'sha256': '9fd6c2d442292be1a3e2bb76e01be7fdd48109581f6fcc74ca695f4fe5d70fce', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/websocket-proxy.cer': {'sha256': '20dee3e913e8e1c080f97b76e6a97f755cd6639bd9b2da3630b06ebbebf256ea', 'groups': ['ca_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-websocket-proxy.xml': {'sha256': 'a3e2c90d0f9376eae859c80ec34fdfeddddb14d71d8e4ce7ac5451caaf92c626', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/extensions.d/internal-authn.properties': {'sha256': 'e2cecb90c9c076747d578e225899b4b42a167a94f7df871a630fefded4faaf0b', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine-dwh/examples/10-setup-dwh-database.conf': {'sha256': '88a531652eb7ed1e67ddca7d0079f22bbe79c6977d572d0852f19eb7efe48845', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/pki/ovirt-engine/cert.template': {'sha256': 'f5e5f1f639a3739b1706f70908185225aa54737a03750461ce79be9182959bd3', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-database.conf': {'sha256': '5e9fed213d2d7e67092f4085f0a700b1eff6637e47d2d5ad8eaf894ac1bada87', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-https.xml': {'sha256': '4c9dcba46006fd50fc5b3c2cae4c80b511a0b1cb85d8485564396e792227ed74', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-cinderlib.conf': {'sha256': '91908e56616762d7f15da4e753e4581583d5ffa2d6199ae1b84b47cbf68ca82b', 'groups': ['core'], 'changed': False}, '/etc/ovirt-provider-ovn/conf.d/10-setup-ovirt-provider-ovn.conf': {'sha256': 'd103404352547707ef1c5e7554d8b9cfa46565831f7f5dac2b22c860b0676df6', 'groups': ['ovirt-provider-ovn'], 'changed': False}, '/etc/pki/ovirt-engine/private/ca.pem': {'sha256': '1df8e07c30f8f1fd4418fe808e9e22e94d699b4ce92ff356135d82659352ba81', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/ovn-sdb.key.nopass': {'sha256': '22afb845e5ce0c97857cdec190475805fba9e4e58173a13288d6d7074f0710f2', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/websocket-proxy.key.nopass': {'sha256': '08656d2d49c6ce8d42851b1288ce249052b3d1aac34c82eea7b66185b12cb90a', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-jboss.conf': {'sha256': '42db91c01eaa61ad8bbfe74c4de198be7287a09bd8cc1fc2c95bbc844c381d1f', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf': {'sha256': '1586d0f9f0839f12acd9210b89edb712f301a2b2070cf0ba59ea20c4d8eb8c3f', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_host_rsa-cert.pub': {'sha256': '6f42b0a2b51944325376725c5d296d6a40800e0b3f05ff530862a90aeb98f9fa', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/ovirt-engine/notifier/notifier.conf.d/10-setup-jboss.conf': {'sha256': '42db91c01eaa61ad8bbfe74c4de198be7287a09bd8cc1fc2c95bbc844c381d1f', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/logcollector.conf.d/10-engine-setup.conf': {'sha256': 'b57b6a8a257ba92441a3e2047e26003f5d9d16bc347f751773df6966670b1686', 'groups': ['core'], 'changed': False}, '/etc/httpd/conf.d/z-ovirt-engine-proxy.conf': {'sha256': 'bb2da5e6a7eb055ac75a7d29efaae581f6545eb23997bde2355b6e542eefa9d9', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-provider-ovn.xml': {'sha256': '160675cdc8b9f21799dc0a4e128c92a538c39e0b2a9211db2b1075791e72499e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/engine_id_rsa': {'sha256': '97c8f82a0ab8d5952fbbece09ac62801999ca3eac95fe905c432099adbf80ee4', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/imageio-proxy.cer': {'sha256': '0c50c7e8405172cf578dec8d44351702030e2b69fb466925881d9e2cf2b5e67a', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/ovirt-provider-ovn.key.nopass': {'sha256': 'f3c52037a36d94a84b28a017387aecfb0cfba9becb42539870787d13c02d0439', 'groups': ['ca_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-http.xml': {'sha256': 'dae71c32b5e1f48169289864a4b6aaf0f05ed275411ca0e48f754bee38839c4b', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/ovirt-provider-ovn.cer': {'sha256': 'cd96751d90af0d9530d627c8e018225bd3af6a2e32033e3c3abc5b8c97751827', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovn-central-firewall-service.xml': {'sha256': '5e333ccf96a4ced8db8c7d6fce1103a9176d8ed6dd92aa3c65b4591019610479', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_host_rsa': {'sha256': '98ce9eed1124a50f7863abc4e8c9fe3348459d439d8b83b560c9ae4c9964b2cc', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_user_rsa': {'sha256': 'd6da744a31597c598968586a2293e0cf7865a7a8a0a55a6703bc95086975102d', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/ovirt-vmconsole/ovirt-vmconsole-proxy/conf.d/20-ovirt-vmconsole-proxy-helper.conf': {'sha256': '545cc02604213084f5c397dd5f84d3827dcc8b7a226d07c0be6dbace037dae1b', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-postgres.xml': {'sha256': 'ec1497fa614341e63f87356f45d355725cffd002f88f9c06f4cc4d22b8c6a111', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovirt-fence-kdump-listener.xml': {'sha256': '3935d1dd81240dbd3578c39e32593c31e2441a3939055383b5f8c19ed2581025', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-fence-kdump-listener.xml': {'sha256': '3935d1dd81240dbd3578c39e32593c31e2441a3939055383b5f8c19ed2581025', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/ovirt-vmconsole-proxy-helper.conf.d/10-setup.conf': {'sha256': '910757bc728db6844a1d2ae3c8b5c59b8998c2c6eda1f9368e8703131fa0940f', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/vmconsole-proxy-helper.p12': {'sha256': '2a7222eb6ce9ec43ca1667a77bda949f784a20f829a50c4f651e8bb2d97857f6', 'groups': ['vmconsole_proxy_helper_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/ovn-ndb.key.nopass': {'sha256': '4720b1b2f579ad730346f446b4e6569494b2af48d6d43d518a9b424a2ea1c28c', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/certs/reports.cer': {'sha256': '24b6b068b64a11b3c4e71fca2e4e4a5172a801c879802a8d8af7a6cac59f398e', 'groups': ['ca_pki'], 'changed': False}}' >2019-02-26 17:06:20,708+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallGroupsDescriptions=dict:'{'core': 'Core files', 'ca_pki': 'PKI keys', 'ovirt-provider-ovn': 'ovirt-provider-ovn configuration files', 'ssl': 'Apache SSL configuration', 'ca_config': 'PKI configuration', 'vmconsole_proxy_helper_pki': 'VMConsole Helper PKI keys', 'versionlock_conf': 'Versionlock Plugin Configuration', 'versionlock': 'YUM version locking configuration', 'ovirt_dwh_files': 'DWH files', 'vmconsole_proxy_pki': 'VMConsole PKI Proxy keys'}' >2019-02-26 17:06:20,708+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallLinesInfo=dict:'{'/etc/httpd/conf.d/ssl.conf': [{'added': 'SSLCACertificateFile /etc/pki/ovirt-engine/apache-ca.pem'}, {'removed': 'SSLProtocol all -SSLv2 -SSLv3', 'added': '# SSLProtocol all -SSLv2 -SSLv3'}, {'removed': 'SSLCertificateKeyFile /etc/pki/tls/private/localhost.key', 'added': '# SSLCertificateKeyFile /etc/pki/tls/private/localhost.key'}, {'added': 'SSLCertificateKeyFile /etc/pki/ovirt-engine/keys/apache.key.nopass'}, {'removed': 'SSLCertificateFile /etc/pki/tls/certs/localhost.crt', 'added': '# SSLCertificateFile /etc/pki/tls/certs/localhost.crt'}, {'added': 'SSLCertificateFile /etc/pki/ovirt-engine/certs/apache.cer'}, {'removed': 'SSLProtocol all -SSLv2 -SSLv3', 'added': '# SSLProtocol all -SSLv2 -SSLv3'}, {'added': 'SSLProtocol all -SSLv3 -TLSv1'}, {'added': 'SSLCertificateKeyFile /etc/pki/ovirt-engine/keys/apache.key.nopass'}, {'added': 'SSLProtocol all -SSLv3 -TLSv1'}, {'removed': 'SSLCertificateFile /etc/pki/tls/certs/localhost.crt', 'added': '# SSLCertificateFile /etc/pki/tls/certs/localhost.crt'}, {'added': 'SSLCACertificateFile /etc/pki/ovirt-engine/apache-ca.pem'}, {'removed': 'SSLCertificateKeyFile /etc/pki/tls/private/localhost.key', 'added': '# SSLCertificateKeyFile /etc/pki/tls/private/localhost.key'}, {'added': 'SSLCertificateFile /etc/pki/ovirt-engine/certs/apache.cer'}], '/etc/yum/pluginconf.d/versionlock.list': [{'added': 'ovirt-engine-tools-backup-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-wildfly-15.0.1-1.el7.x86_64'}, {'added': 'ovirt-engine-restapi-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-dbscripts-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-dwh-4.3.1-0.0.master.20190110155219.el7.noarch'}, {'added': 'ovirt-engine-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-webadmin-portal-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-ui-extensions-1.0.3-1.el7.noarch'}, {'added': 'ovirt-engine-backend-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-wildfly-overlay-15.0.1-1.el7.noarch'}, {'added': 'ovirt-engine-extension-aaa-jdbc-1.1.8-1.el7.noarch'}, {'added': 'ovirt-engine-tools-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}], '/etc/yum/pluginconf.d/versionlock.conf': [{'added': 'follow_obsoletes=1'}]}' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallUninstallFiles=list:'['/etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf', '/etc/ovirt-engine/uninstall.d/20190226164849-uninstall.conf', '/etc/ovirt-engine/uninstall.d/20190226170203-uninstall.conf']' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallUnremovableFiles=list:'[]' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/upgradeSupportedVersions=str:'4.1,4.2,4.3' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/ovirt_dwh_files=list:'[]' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_LINES_GROUP/ovirt_dwh_files=dict:'{}' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/connection=NoneType:'None' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/database=str:'engine' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/dumper=str:'pg_custom' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/dwhVacuumFull=bool:'False' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/engineVacuumFull=bool:'False' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/filter=NoneType:'None' >2019-02-26 17:06:20,709+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/fixDbConfiguration=NoneType:'None' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/fixDbViolations=NoneType:'None' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/host=str:'localhost' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/invalidConfigItems=NoneType:'None' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/justRestored=bool:'False' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/needDBMSUpgrade=bool:'False' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/newDatabase=bool:'False' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/password=str:'**FILTERED**' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/pgPassFile=NoneType:'None' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/port=str:'5432' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/restoreJobs=int:'2' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/secured=bool:'False' >2019-02-26 17:06:20,710+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/securedHostValidation=bool:'False' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/statement=NoneType:'None' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/user=str:'engine' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DIALOG/confirmSettings=NoneType:'None' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/dwhDbBackupDir=str:'/var/lib/ovirt-engine-dwh/backups' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/dwhServiceStopNeeded=bool:'True' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/remoteEngineConfigured=bool:'False' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/scale=str:'1' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CORE/enable=bool:'True' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CORE/uuid=str:'bf29a673-1ae8-45e3-b07f-4f56faa3e4a5' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/connection=NoneType:'None' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/database=str:'ovirt_engine_history' >2019-02-26 17:06:20,711+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/disconnectExistingDwh=NoneType:'None' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/dumper=str:'pg_custom' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/filter=NoneType:'None' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/host=str:'localhost' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/needDBMSUpgrade=bool:'False' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/newDatabase=bool:'False' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/password=str:'**FILTERED**' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/performBackup=bool:'True' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/pgPassFile=NoneType:'None' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/port=int:'5432' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/restoreBackupLate=bool:'True' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/restoreJobs=int:'2' >2019-02-26 17:06:20,712+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/secured=bool:'False' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/securedHostValidation=bool:'False' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/statement=NoneType:'None' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/user=str:'ovirt_engine_history' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_PROVISIONING/postgresProvisioningEnabled=bool:'True' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_RPMDISRO_PACKAGES=str:'ovirt-engine-dwh' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_RPMDISRO_PACKAGES_SETUP=str:'ovirt-engine-dwh-setup' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ENGINE_CONFIG/fqdn=str:'gb60kf2.democustomer.televic.com' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ENGINE_CORE/enable=bool:'True' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldServices=list:'[{'absolute_path': '/usr/lib/firewalld/services/ovn-central-firewall-service.xml', 'name': 'ovn-central-firewall-service'}, {'absolute_path': '/usr/lib/firewalld/services/ovirt-provider-ovn.xml', 'name': 'ovirt-provider-ovn'}, {'directory': 'ovirt-common', 'name': 'ovirt-http'}, {'directory': 'ovirt-common', 'name': 'ovirt-https'}, {'directory': 'vmconsole-proxy', 'name': 'ovirt-vmconsole-proxy'}, {'directory': 'ovirt-imageio-proxy', 'name': 'ovirt-imageio-proxy'}, {'directory': 'websocket-proxy', 'name': 'ovirt-websocket-proxy'}, {'directory': 'ovirt-engine', 'name': 'ovirt-fence-kdump-listener'}, {'directory': 'ovirt-common', 'name': 'ovirt-postgres'}, {'directory': 'ovirt-common', 'name': 'ovirt-postgres'}]' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldSubst=dict:'{'@WEBSOCKET_PROXY_PORT@': 6100, '@HTTPS_PORT@': 443, '@VMCONSOLE_PROXY_PORT@': 2222, '@HTTP_PORT@': 80, '@IMAGEIO_PROXY_PORT@': 54323, '@JBOSS_HTTPS_PORT@': None, '@JBOSS_HTTP_PORT@': None}' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/firewalldServices=str:'ovn-central-firewall-service,ovirt-provider-ovn' >2019-02-26 17:06:20,713+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/firewalldServicesDir=str:'/usr/lib/firewalld/services' >2019-02-26 17:06:20,714+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvn=bool:'True' >2019-02-26 17:06:20,714+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvnId=str:'92e45e35-9ffe-4ded-b153-d69ee53e5bd6' >2019-02-26 17:06:20,714+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvnPassword=str:'**FILTERED**' >2019-02-26 17:06:20,714+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvnUser=str:'admin@internal' >2019-02-26 17:06:20,714+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/country=str:'US' >2019-02-26 17:06:20,714+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/entities=list:'[{'keepKey': True, 'extract': False, 'name': 'engine', 'user': 'OVESETUP_SYSTEM/userEngine'}, {'keepKey': False, 'extract': False, 'name': 'jboss', 'user': 'OVESETUP_SYSTEM/userEngine'}, {'keepKey': False, 'extract': True, 'name': 'websocket-proxy', 'user': 'OVESETUP_SYSTEM/userEngine'}, {'keepKey': False, 'extract': True, 'name': 'apache', 'user': 'OVESETUP_SYSTEM/userRoot'}, {'keepKey': False, 'extract': True, 'name': 'reports', 'user': 'OVESETUP_SYSTEM/userRoot'}, {'keepKey': False, 'extract': True, 'name': 'imageio-proxy', 'user': 'OVESETUP_SYSTEM/userRoot'}]' >2019-02-26 17:06:20,714+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/organization=str:'demospace.televic.com' >2019-02-26 17:06:20,714+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/renew=NoneType:'None' >2019-02-26 17:06:20,714+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/storePassword=str:'**FILTERED**' >2019-02-26 17:06:20,714+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/oldPostgresService=str:'rh-postgresql95-postgresql' >2019-02-26 17:06:20,714+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumAnalyzeScaleFactor=float:'0.075' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumMaintenanceWorkMem=int:'65536' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumMaxWorkers=int:'6' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumVacuumScaleFactor=float:'0.01' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresConf=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresExtraConfigItems=tuple:'({'ok': <function <lambda> at 0x7f1fdf599578>, 'check_on_use': True, 'needed_on_create': True, 'key': 'autovacuum_vacuum_scale_factor', 'expected': 0.01, 'error_msg': "It is required to be at most '{expected}'"}, {'ok': <function <lambda> at 0x7f1fdf550f50>, 'check_on_use': True, 'needed_on_create': True, 'key': 'autovacuum_analyze_scale_factor', 'expected': 0.075, 'error_msg': "It is required to be at most '{expected}'"}, {'ok': <function <lambda> at 0x7f1fdf2e0140>, 'check_on_use': True, 'needed_on_create': True, 'key': 'autovacuum_max_workers', 'expected': 6, 'error_msg': "It is required to be at least '{expected}'"}, {'ok': <function <lambda> at 0x7f1fdf2e02a8>, 'check_on_use': True, 'needed_on_create': True, 'key': 'maintenance_work_mem', 'expected': 65536, 'error_msg': "It is required to be at least '{expected}'", 'useQueryForValue': True}, {'ok': <function <lambda> at 0x7f1fdf2e0230>, 'check_on_use': True, 'needed_on_create': True, 'key': 'work_mem', 'expected': 8192, 'error_msg': "It is required to be at least '{expected}'", 'useQueryForValue': True})' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresLCMessages=str:''en_US.UTF-8'' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresListenAddress=str:''*'' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresMaxConn=int:'150' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresPgHba=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresPgVersion=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresProvisioningEnabled=NoneType:'None' >2019-02-26 17:06:20,715+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresService=str:'rh-postgresql10-postgresql' >2019-02-26 17:06:20,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresUpgradeCleanold=bool:'False' >2019-02-26 17:06:20,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresUpgradeInplace=bool:'False' >2019-02-26 17:06:20,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresWorkMemKb=int:'8192' >2019-02-26 17:06:20,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/aaaJdbcPackage=str:'ovirt-engine-extension-aaa-jdbc' >2019-02-26 17:06:20,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/additionalPackages=str:'ovirt-host-deploy,ovirt-iso-uploader,ovirt-engine-ui-extensions,ovirt-web-ui' >2019-02-26 17:06:20,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/enginePackages=str:'ovirt-engine' >2019-02-26 17:06:20,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/engineSetupPackages=str:'ovirt-engine-setup' >2019-02-26 17:06:20,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/jbossPackages=str:'ovirt-engine-wildfly,ovirt-engine-wildfly-overlay' >2019-02-26 17:06:20,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesSetup=list:'['ovirt-engine-setup', 'ovirt-engine-setup-plugin-websocket-proxy', 'ovirt-engine-dwh-setup']' >2019-02-26 17:06:20,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesUpgradeList=list:'[{'packages': ['ovirt-engine-extension-aaa-jdbc']}, {'packages': ['ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay']}, {'packages': ['ovirt-engine', 'ovirt-host-deploy', 'ovirt-iso-uploader', 'ovirt-engine-ui-extensions', 'ovirt-web-ui']}, {'packages': ['ovirt-engine-websocket-proxy']}, {'packages': ['ovirt-engine-dwh']}]' >2019-02-26 17:06:20,716+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/groupEngine=str:'ovirt' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/groupKvm=str:'kvm' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/groupVmConsole=str:'ovirt-vmconsole' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/hostileServices=str:'ovirt-engine-dwhd,ovirt-engine-notifier' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckEnabled=bool:'False' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckMinimumMB=int:'4096' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckRecommendedMB=int:'16384' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckThreshold=int:'90' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/nfsConfigEnabled=bool:'False' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/nfsConfigEnabled_legacyInPostInstall=bool:'False' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/nfsServiceName=str:'nfs-server' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/selinuxBooleans=list:'[]' >2019-02-26 17:06:20,717+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/selinuxContexts=list:'[]' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/selinuxRestorePaths=list:'[]' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/shmmax=int:'68719476736' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userApache=str:'apache' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userEngine=str:'ovirt' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userPostgres=str:'postgres' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userRoot=str:'root' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userVdsm=str:'vdsm' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userVmConsole=str:'ovirt-vmconsole' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyConfig=bool:'True' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyPort=int:'2222' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_WSP_RPMDISTRO_PACKAGES=str:'ovirt-engine-websocket-proxy' >2019-02-26 17:06:20,718+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_WSP_RPMDISTRO_PACKAGES_SETUP=str:'ovirt-engine-setup-plugin-websocket-proxy' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfDisabledPlugins=list:'[]' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfExpireCache=bool:'True' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfRollback=bool:'True' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfpackagerEnabled=bool:'True' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/keepAliveInterval=int:'30' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumDisabledPlugins=list:'[]' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumEnabledPlugins=list:'[]' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumExpireCache=bool:'True' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumRollback=bool:'True' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumpackagerEnabled=bool:'True' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV QUESTION/1/OVESETUP_DWH_PERFORM_BACKUP=str:'yes' >2019-02-26 17:06:20,719+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/clockMaxGap=int:'5' >2019-02-26 17:06:20,720+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/clockSet=bool:'False' >2019-02-26 17:06:20,720+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/commandPath=str:'/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin' >2019-02-26 17:06:20,720+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/reboot=bool:'False' >2019-02-26 17:06:20,720+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/rebootAllow=bool:'True' >2019-02-26 17:06:20,720+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/rebootDeferTime=int:'10' >2019-02-26 17:06:20,720+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,722+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._validation_enable >2019-02-26 17:06:20,722+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,724+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._validateEnv >2019-02-26 17:06:20,726+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._validate_enable >2019-02-26 17:06:20,726+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,728+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.otopi.core.log.Plugin._validation >2019-02-26 17:06:20,728+0100 DEBUG otopi.plugins.otopi.core.log log._validation:384 _filtered_keys_at_setup: ['OVESETUP_DWH_DB/password', 'OVESETUP_DB/password', 'OVESETUP_CONFIG/remoteEngineHostRootPassword', 'OVESETUP_DB/password', 'OVESETUP_PKI/storePassword', 'OVESETUP_CONFIG/adminPassword', 'OVESETUP_OVN/ovirtProviderOvnSecret', 'OVESETUP_OVN/ovirtProviderOvnPassword', 'OVESETUP_CL_DB/password'] >2019-02-26 17:06:20,728+0100 DEBUG otopi.plugins.otopi.core.log log._validation:388 LOG_FILTER_KEYS: ['OVESETUP_DWH_DB/password', 'OVESETUP_DB/password', 'OVESETUP_CONFIG/remoteEngineHostRootPassword', 'OVESETUP_DB/password', 'OVESETUP_PKI/storePassword', 'OVESETUP_CONFIG/adminPassword', 'OVESETUP_OVN/ovirtProviderOvnSecret', 'OVESETUP_OVN/ovirtProviderOvnPassword', 'OVESETUP_CL_DB/password'] >2019-02-26 17:06:20,730+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.otopi.network.hostname.Plugin._validation >2019-02-26 17:06:20,730+0100 DEBUG otopi.plugins.otopi.network.hostname hostname._validation:55 my name: gb60kf2.democustomer.televic.com >2019-02-26 17:06:20,732+0100 DEBUG otopi.plugins.otopi.network.hostname plugin.executeRaw:813 execute: ('/usr/sbin/ip', 'addr', 'show'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,737+0100 DEBUG otopi.plugins.otopi.network.hostname plugin.executeRaw:863 execute-result: ('/usr/sbin/ip', 'addr', 'show'), rc=0 >2019-02-26 17:06:20,737+0100 DEBUG otopi.plugins.otopi.network.hostname plugin.execute:921 execute-output: ('/usr/sbin/ip', 'addr', 'show') stdout: >1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > inet 127.0.0.1/8 scope host lo > valid_lft forever preferred_lft forever > inet6 ::1/128 scope host > valid_lft forever preferred_lft forever >2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 > link/ether 10:98:36:a3:d6:13 brd ff:ff:ff:ff:ff:ff > inet 10.99.100.3/16 brd 10.99.255.255 scope global noprefixroute dynamic em1 > valid_lft 41451sec preferred_lft 41451sec > inet6 fd00::1:1298:36ff:fea3:d613/64 scope global noprefixroute > valid_lft forever preferred_lft forever > inet6 fe80::1298:36ff:fea3:d613/64 scope link noprefixroute > valid_lft forever preferred_lft forever >3: em2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 > link/ether 10:98:36:a3:d6:14 brd ff:ff:ff:ff:ff:ff > inet6 fe80::1298:36ff:fea3:d614/64 scope link > valid_lft forever preferred_lft forever > >2019-02-26 17:06:20,737+0100 DEBUG otopi.plugins.otopi.network.hostname plugin.execute:926 execute-output: ('/usr/sbin/ip', 'addr', 'show') stderr: > > >2019-02-26 17:06:20,737+0100 DEBUG otopi.plugins.otopi.network.hostname hostname._validation:100 my addresses: ['fd00::1:1298:36ff:fea3:d613', 'fd00::1:1298:36ff:fea3:d613', 'fd00::1:1298:36ff:fea3:d613', '10.99.100.3', '10.99.100.3', '10.99.100.3'] >2019-02-26 17:06:20,737+0100 DEBUG otopi.plugins.otopi.network.hostname hostname._validation:101 local addresses: [u'10.99.100.3', u'fd00::1:1298:36ff:fea3:d613', u'fe80::1298:36ff:fea3:d613', u'fe80::1298:36ff:fea3:d614'] >2019-02-26 17:06:20,740+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.otopi.network.ssh.Plugin._validation >2019-02-26 17:06:20,740+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,742+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._validation_changed_files >2019-02-26 17:06:20,744+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._validation >2019-02-26 17:06:20,744+0100 DEBUG otopi.plugins.ovirt_engine_common.base.system.selinux plugin.executeRaw:813 execute: ('/usr/sbin/selinuxenabled',), executable='None', cwd='None', env=None >2019-02-26 17:06:20,749+0100 DEBUG otopi.plugins.ovirt_engine_common.base.system.selinux plugin.executeRaw:863 execute-result: ('/usr/sbin/selinuxenabled',), rc=0 >2019-02-26 17:06:20,749+0100 DEBUG otopi.plugins.ovirt_engine_common.base.system.selinux plugin.execute:921 execute-output: ('/usr/sbin/selinuxenabled',) stdout: > > >2019-02-26 17:06:20,749+0100 DEBUG otopi.plugins.ovirt_engine_common.base.system.selinux plugin.execute:926 execute-output: ('/usr/sbin/selinuxenabled',) stderr: > > >2019-02-26 17:06:20,752+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.pgpass.Plugin._validation >2019-02-26 17:06:20,752+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,754+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.engine.Plugin._validation >2019-02-26 17:06:20,754+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service ovirt-engine exists >2019-02-26 17:06:20,754+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,761+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine.service'), rc=0 >2019-02-26 17:06:20,762+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine.service') stdout: >LoadState=loaded > >2019-02-26 17:06:20,762+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine.service') stderr: > > >2019-02-26 17:06:20,762+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.status:90 check service ovirt-engine status >2019-02-26 17:06:20,762+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'status', 'ovirt-engine.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,770+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'status', 'ovirt-engine.service'), rc=0 >2019-02-26 17:06:20,771+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'status', 'ovirt-engine.service') stdout: >â ovirt-engine.service - oVirt Engine > Loaded: loaded (/usr/lib/systemd/system/ovirt-engine.service; enabled; vendor preset: disabled) > Active: active (running) since Tue 2019-02-26 17:02:01 CET; 4min 19s ago > Main PID: 23225 (ovirt-engine.py) > CGroup: /system.slice/ovirt-engine.service > ââ23225 /usr/bin/python /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.py --redirect-output --systemd=notify start > ââ23300 ovirt-engine -server -XX:+TieredCompilation -Xms3928M -Xmx3928M -Xss1M -Djava.awt.headless=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djsse.enableSNIExtension=false -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/ovirt-engine/dump -Djava.util.logging.manager=org.jboss.logmanager -Dlogging.configuration=file:///var/lib/ovirt-engine/jboss_runtime/config/ovirt-engine-logging.properties -Dorg.jboss.resolver.warning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.config=ovirt-engine -Djboss.home.dir=/usr/share/ovirt-engine-wildfly -Djboss.server.base.dir=/usr/share/ovirt-engine -Djboss.server.data.dir=/var/lib/ovirt-engine -Djboss.server.log.dir=/var/log/ovirt-engine -Djboss.server.config.dir=/var/lib/ovirt-engine/jboss_runtime/config -Djboss.server.temp.dir=/var/lib/ovirt-engine/jboss_runtime/tmp -Djboss.controller.temp.dir=/var/lib/ovirt-engine/jboss_runtime/tmp -jar /usr/share/ovirt-engine-wildfly/jboss-modules.jar -mp /usr/share/ovirt-engine-wildfly-overlay/modules:/usr/share/ovirt-engine/modules/common:/usr/share/ovirt-engine-extension-aaa-jdbc/modules:/usr/share/ovirt-engine-wildfly/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -c ovirt-engine.xml > >Feb 26 17:02:00 gb60kf2.democustomer.televic.com systemd[1]: Starting oVirt Engine... >Feb 26 17:02:00 gb60kf2.democustomer.televic.com ovirt-engine.py[23225]: 2019-02-26 17:02:00,603+0100 ovirt-engine: INFO _detectJBossVersion:195 Detecting JBoss version. Running: /usr/lib/jvm/jre/bin/java ['ovirt-engine-version', '-server', '-XX:+TieredCompilation', '-Xms3928M', '-Xmx3928M', '-Xss1M', '-Djava.awt.headless=true', '-Dsun.rmi.dgc.client.gcInterval=3600000', '-Dsun.rmi.dgc.server.gcInterval=3600000', '-Djsse.enableSNIExtension=false', '-XX:+HeapDumpOnOutOfMemoryError', '-XX:HeapDumpPath=/var/log/ovirt-engine/dump', '-Djava.util.logging.manager=org.jboss.logmanager', '-Dlogging.configuration=file:///var/lib/ovirt-engine/jboss_runtime/config/ovirt-engine-logging.properties', '-Dorg.jboss.resolver.warning=true', '-Djboss.modules.system.pkgs=org.jboss.byteman', '-Djboss.server.default.config=ovirt-engine', '-Djboss.home.dir=/usr/share/ovirt-engine-wildfly', '-Djboss.server.base.dir=/usr/share/ovirt-engine', '-Djboss.server.data.dir=/var/lib/ovirt-engine', '-Djboss.server.log.dir=/var/log/ovirt-engine', '-Djboss.server.config.dir=/var/lib/ovirt-engine/jboss_runtime/config', '-Djboss.server.temp.dir=/var/lib/ovirt-engine/jboss_runtime/tmp', '-Djboss.controller.temp.dir=/var/lib/ovirt-engine/jboss_runtime/tmp', '-jar', '/usr/share/ovirt-engine-wildfly/jboss-modules.jar', '-mp', '/usr/share/ovirt-engine-wildfly-overlay/modules:/usr/share/ovirt-engine/modules/common:/usr/share/ovirt-engine-extension-aaa-jdbc/modules:/usr/share/ovirt-engine-wildfly/modules', '-jaxpmodule', 'javax.xml.jaxp-provider', 'org.jboss.as.standalone', '-v'] >Feb 26 17:02:01 gb60kf2.democustomer.televic.com ovirt-engine.py[23225]: 2019-02-26 17:02:01,160+0100 ovirt-engine: INFO _detectJBossVersion:215 Return code: 0, | stdout: '[u'WildFly Full 15.0.1.Final (WildFly Core 7.0.0.Final)'], | stderr: '[]' >Feb 26 17:02:01 gb60kf2.democustomer.televic.com systemd[1]: Started oVirt Engine. > >2019-02-26 17:06:20,771+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'status', 'ovirt-engine.service') stderr: > > >2019-02-26 17:06:20,771+0100 DEBUG otopi.plugins.otopi.dialog.human human.queryString:159 query OVESETUP_CORE_ENGINE_STOP >2019-02-26 17:06:20,772+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND During execution engine service will be stopped (OK, Cancel) [OK]: >2019-02-26 17:06:20,772+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,773+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/engineStop=bool:'True' >2019-02-26 17:06:20,773+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV QUESTION/1/OVESETUP_CORE_ENGINE_STOP=str:'ok' >2019-02-26 17:06:20,774+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,775+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.config.Plugin._validation >2019-02-26 17:06:20,777+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass.Plugin._validation >2019-02-26 17:06:20,777+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass plugin.executeRaw:813 execute: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,784+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass plugin.executeRaw:863 execute-result: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V'), rc=0 >2019-02-26 17:06:20,784+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass plugin.execute:921 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V') stdout: >psql (PostgreSQL) 10.6 > >2019-02-26 17:06:20,784+0100 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass plugin.execute:926 execute-output: ('/opt/rh/rh-postgresql10/root/usr/bin/psql', '-V') stderr: > > >2019-02-26 17:06:20,786+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,786+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/pgPassFile=str:'/tmp/tmpvBMjd0' >2019-02-26 17:06:20,787+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,788+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.system.he.Plugin._validate >2019-02-26 17:06:20,788+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select version, option_value > from vdc_options > where option_name = %(name)s > ', args: {'name': 'HostedEngineVmName'} >2019-02-26 17:06:20,788+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,792+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'version': 'general', 'option_value': 'HostedEngine'}] >2019-02-26 17:06:20,793+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > SELECT vm_guid, run_on_vds > FROM vms > WHERE vm_name = %(HostedEngineVmName)s; > ', args: {'HostedEngineVmName': 'HostedEngine'} >2019-02-26 17:06:20,793+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,805+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:20,807+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.config.java.Plugin._validation >2019-02-26 17:06:20,862+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,863+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/javaHome=unicode:'/usr/lib/jvm/jre' >2019-02-26 17:06:20,864+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,865+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.config.Plugin._validation >2019-02-26 17:06:20,867+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._validation >2019-02-26 17:06:20,868+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:20,868+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/firewalldEnable=bool:'True' >2019-02-26 17:06:20,868+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-fence-kdump-listener=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-fence-kdump-listener</short> > <description>oVirt configured fence_kdump listener service</description> > <port protocol="udp" port="7410"/> ></service> >' >2019-02-26 17:06:20,868+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-http=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-http</short> > <description>oVirt configured http service</description> > <port protocol="tcp" port="80"/> ></service> >' >2019-02-26 17:06:20,868+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-https=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-https</short> > <description>oVirt configured https service</description> > <port protocol="tcp" port="443"/> ></service> >' >2019-02-26 17:06:20,868+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-imageio-proxy=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-imageio-proxy</short> > <description>oVirt ImageIO Proxy service</description> > <port protocol="tcp" port="54323"/> ></service> >' >2019-02-26 17:06:20,869+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-postgres=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-postgres</short> > <description>oVirt configured postgres service</description> > <port protocol="tcp" port="5432"/> ></service> >' >2019-02-26 17:06:20,869+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-provider-ovn=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-provider-ovn</short> > <description>oVirt provider ovn</description> > <port protocol="tcp" port="9696"/> > <port protocol="tcp" port="35357"/> ></service> >' >2019-02-26 17:06:20,869+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-vmconsole-proxy=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-vmconsole-proxy</short> > <description>oVirt configured VM Console Proxy service</description> > <port protocol="tcp" port="2222"/> ></service> >' >2019-02-26 17:06:20,869+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-websocket-proxy=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-websocket-proxy</short> > <description>oVirt configured WebSocket Proxy service</description> > <port protocol="tcp" port="6100"/> ></service> >' >2019-02-26 17:06:20,869+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovn-central-firewall-service=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovn-central-firewall-service</short> > <description>Firewall service for ovn central</description> > <port protocol="tcp" port="6641"/> > <port protocol="tcp" port="6642"/> ></service> >' >2019-02-26 17:06:20,870+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:20,871+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._validation >2019-02-26 17:06:20,871+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,873+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.notifier.Plugin._validation >2019-02-26 17:06:20,873+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.notifier notifier._validation:69 filterStr: None >2019-02-26 17:06:20,876+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin.checkUuidOsspExtensionForRemoteDbOrDevEnv >2019-02-26 17:06:20,876+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,878+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._validation >2019-02-26 17:06:20,878+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,880+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._validation >2019-02-26 17:06:20,880+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs exportfs._validation:165 move=False, generate=False >2019-02-26 17:06:20,882+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._validation >2019-02-26 17:06:20,882+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,884+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._validate_ssl >2019-02-26 17:06:20,884+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,886+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._validation >2019-02-26 17:06:20,886+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl plugin.executeRaw:813 execute: ('/usr/sbin/sysctl', '-n', 'kernel.shmmax'), executable='None', cwd='None', env=None >2019-02-26 17:06:20,892+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl plugin.executeRaw:863 execute-result: ('/usr/sbin/sysctl', '-n', 'kernel.shmmax'), rc=0 >2019-02-26 17:06:20,892+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl plugin.execute:921 execute-output: ('/usr/sbin/sysctl', '-n', 'kernel.shmmax') stdout: >18446744073692774399 > >2019-02-26 17:06:20,893+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl plugin.execute:926 execute-output: ('/usr/sbin/sysctl', '-n', 'kernel.shmmax') stderr: > > >2019-02-26 17:06:20,895+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.check_etl.Plugin._validation >2019-02-26 17:06:20,895+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,897+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._validation >2019-02-26 17:06:20,898+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select * from GetDwhHistoryTimekeepingByVarName( > %(name)s > ) > ', args: {'name': 'dwhHostname'} >2019-02-26 17:06:20,898+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,903+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'var_value': 'gb60kf2.democustomer.televic.com', 'var_datetime': None, 'var_name': 'dwhHostname'}] >2019-02-26 17:06:20,903+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select * from GetDwhHistoryTimekeepingByVarName( > %(name)s > ) > ', args: {'name': 'dwhUuid'} >2019-02-26 17:06:20,903+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,908+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'var_value': 'bf29a673-1ae8-45e3-b07f-4f56faa3e4a5', 'var_datetime': None, 'var_name': 'dwhUuid'}] >2019-02-26 17:06:20,910+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._validation >2019-02-26 17:06:20,910+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select > nsp.nspname as object_schema, > cls.relname as object_name, > rol.rolname as owner, > case cls.relkind > when 'r' then 'TABLE' > when 'i' then 'INDEX' > when 'S' then 'SEQUENCE' > when 'v' then 'VIEW' > when 'c' then 'TYPE' > else > cls.relkind::text > end as object_type > from > pg_class cls join > pg_roles rol on rol.oid = cls.relowner join > pg_namespace nsp on nsp.oid = cls.relnamespace > where > nsp.nspname not in ('information_schema', 'pg_catalog') and > nsp.nspname not like 'pg_%%' and > rol.rolname != %(user)s > order by > nsp.nspname, > cls.relname > ', args: {'user': 'ovirt_engine_history'} >2019-02-26 17:06:20,911+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,915+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:20,918+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._validation >2019-02-26 17:06:20,918+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,920+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.otopi.network.firewalld.Plugin._validation >2019-02-26 17:06:20,922+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.otopi.network.iptables.Plugin._validate >2019-02-26 17:06:20,922+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,924+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_checks.ovirt_engine.db.versions.Plugin._validation >2019-02-26 17:06:20,924+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > SELECT name, compatibility_version FROM storage_pool; > ', args: {} >2019-02-26 17:06:20,924+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,928+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'compatibility_version': '4.2', 'name': 'default'}] >2019-02-26 17:06:20,928+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > SELECT table_name FROM information_schema.tables > WHERE table_name IN ('vds_groups', 'cluster'); > ', args: {} >2019-02-26 17:06:20,928+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,933+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'table_name': 'cluster'}] >2019-02-26 17:06:20,933+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'SELECT name, compatibility_version FROM cluster;', args: {} >2019-02-26 17:06:20,933+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,937+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'compatibility_version': '4.2', 'name': 'default'}] >2019-02-26 17:06:20,937+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select > vm_name, > custom_compatibility_version > from > vms > where > custom_compatibility_version is not null > and > custom_compatibility_version <> ''; > ', args: {} >2019-02-26 17:06:20,937+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,949+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:20,952+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema.Plugin._validation >2019-02-26 17:06:20,952+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select > nsp.nspname as object_schema, > cls.relname as object_name, > rol.rolname as owner, > case cls.relkind > when 'r' then 'TABLE' > when 'i' then 'INDEX' > when 'S' then 'SEQUENCE' > when 'v' then 'VIEW' > when 'c' then 'TYPE' > else > cls.relkind::text > end as object_type > from > pg_class cls join > pg_roles rol on rol.oid = cls.relowner join > pg_namespace nsp on nsp.oid = cls.relnamespace > where > nsp.nspname not in ('information_schema', 'pg_catalog') and > nsp.nspname not like 'pg_%%' and > cls.relname not like 'pg_%%' and > rol.rolname != %(user)s > order by > nsp.nspname, > cls.relname > ', args: {'user': 'engine'} >2019-02-26 17:06:20,952+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,957+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:20,957+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > SELECT name, compatibility_version FROM storage_pool; > ', args: {} >2019-02-26 17:06:20,957+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,960+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'compatibility_version': '4.2', 'name': 'default'}] >2019-02-26 17:06:20,961+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > SELECT table_name FROM information_schema.tables > WHERE table_name IN ('vds_groups', 'cluster'); > ', args: {} >2019-02-26 17:06:20,961+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,966+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'table_name': 'cluster'}] >2019-02-26 17:06:20,966+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: 'SELECT name, compatibility_version FROM cluster;', args: {} >2019-02-26 17:06:20,966+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,970+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'compatibility_version': '4.2', 'name': 'default'}] >2019-02-26 17:06:20,970+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select > vm_name, > custom_compatibility_version > from > vms > where > custom_compatibility_version is not null > and > custom_compatibility_version <> ''; > ', args: {} >2019-02-26 17:06:20,970+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,982+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:20,982+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > SELECT > disk_alias, > image_guid, > vm_name > FROM > images > INNER JOIN vm_device ON > images.image_group_id = vm_device.device_id > INNER JOIN vm_static ON vm_device.vm_id = vm_static.vm_guid > INNER JOIN base_disks ON > images.image_group_id = base_disks.disk_id > AND vm_static.entity_type = 'VM' > AND vm_device.type = 'disk' > AND vm_device.device = 'disk' > AND images.vm_snapshot_id = > '00000000-0000-0000-0000-000000000000'; > ', args: {} >2019-02-26 17:06:20,982+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:20,988+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:20,990+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._validate_provider_uniqueness >2019-02-26 17:06:20,990+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:20,992+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._validateMemory >2019-02-26 17:06:20,994+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._validateZombies >2019-02-26 17:06:20,994+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks asynctasks._validateZombies:461 Cleaning stale zombie tasks and commands >2019-02-26 17:06:20,995+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.executeRaw:813 execute: ('/usr/share/ovirt-engine/setup/dbutils/taskcleaner.sh', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-q', '-r', '-Z'), executable='None', cwd='None', env={'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'DBFUNC_DB_PGPASSFILE': '/tmp/tmpvBMjd0', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'} >********* QUERY ********** >select exists (select * from information_schema.tables where table_schema = 'public' and table_name = 'command_entities'); >************************** > > t > >********* QUERY ********** >/************************************************************************************************ > The following are helper SP for taskcleaner utility and are not exposed to the application DAOs > >If you add a function here, drop it in taskcleaner_sp_drop.sql >************************************************************************************************/ >CREATE OR REPLACE FUNCTION GetAsyncTasksZombies() RETURNS SETOF async_tasks > AS $procedure$ >DECLARE > zombie_task_life varchar; > zombie_timestamptz timestamp with time zone; >BEGIN > zombie_task_life = option_value FROM vdc_options WHERE option_name = 'AsyncTaskZombieTaskLifeInMinutes'; > EXECUTE 'SELECT now() - interval ''' || zombie_task_life || ' minute''' INTO zombie_timestamptz; > > RETURN QUERY SELECT * > FROM async_tasks > WHERE started_at < zombie_timestamptz > ORDER BY command_id; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAsyncTaskZombiesByTaskId(v_task_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > IF EXISTS (SELECT 1 FROM GetAsyncTasksZombies() WHERE task_id = v_task_id) THEN > PERFORM Deleteasync_tasks(v_task_id); > END IF; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAsyncTaskZombiesByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >DECLARE >deleted_rows int; >root_command_id_of_deleted_cmds UUID; >BEGIN > IF (fn_db_is_table_exists ('command_entities')) THEN > DELETE FROM command_entities c WHERE > c.command_id IN ( > SELECT command_id FROM GetAsyncTasksZombies() t WHERE t.command_id = v_command_id > ); > > DELETE FROM command_entities c WHERE > c.command_id IN ( > SELECT root_command_id FROM GetAsyncTasksZombies() t WHERE t.root_command_id = v_command_id > ); > END IF; > > DELETE FROM async_tasks WHERE > root_command_id IN ( > SELECT root_command_id FROM GetAsyncTasksZombies() t WHERE t.root_command_id = v_command_id > ); > > DELETE FROM async_tasks WHERE > root_command_id IN ( > SELECT root_command_id FROM GetAsyncTasksZombies() t WHERE t.command_id = v_command_id > ); > > PERFORM DeleteEntitySnapshotByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAsyncTaskByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >DECLARE >deleted_rows int; >root_command_id_of_deleted_cmds UUID; >BEGIN > DELETE FROM async_tasks WHERE command_id = v_command_id; > IF (fn_db_is_table_exists ('command_entities')) THEN > SELECT root_command_id into root_command_id_of_deleted_cmds FROM COMMAND_entities WHERE command_id = v_command_id; > DELETE FROM command_entities where command_id = v_command_id; > GET DIAGNOSTICS deleted_rows = ROW_COUNT; > IF deleted_rows > 0 THEN > DELETE FROM command_entities C WHERE command_id = root_command_id_of_deleted_cmds AND NOT EXISTS (SELECT * from COMMAND_ENTITIES WHERE root_command_id = C.command_id); > END IF; > END IF; > PERFORM DeleteEntitySnapshotByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAsyncTasksZombies() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM async_tasks WHERE task_id in (SELECT task_id FROM GetAsyncTasksZombies()); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteJobStepsByTaskId(v_task_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM step WHERE external_id = v_task_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteEntitySnapshotByZombieTaskId(v_task_id UUID) RETURNS VOID > AS $procedure$ >DECLARE > v_command_id UUID; >BEGIN > v_command_id:=command_id FROM GetAsyncTasksZombies() WHERE task_id = v_task_id; > DELETE FROM business_entity_snapshot WHERE command_id = v_command_id; > PERFORM DeleteCommandEntitiesByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteEntitySnapshotByTaskId(v_task_id UUID) RETURNS VOID > AS $procedure$ >DECLARE > v_command_id UUID; >BEGIN > v_command_id:=command_id FROM async_tasks WHERE task_id = v_task_id; > DELETE FROM business_entity_snapshot WHERE command_id = v_command_id; > PERFORM DeleteCommandEntitiesByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteEntitySnapshotZombies() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM business_entity_snapshot WHERE command_id IN (SELECT command_id FROM GetAsyncTasksZombies()); > PERFORM DeleteAllCommandEntitiesByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteOrphanJobs() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM job WHERE NOT EXISTS (SELECT 1 from step where step.job_id = job.job_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteJobStepsByZombieCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM step WHERE step_id IN (SELECT step_id from GetAsyncTasksZombies() WHERE command_id = v_command_id); > PERFORM DeleteOrphanJobs(); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteJobStepsByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM step WHERE step_id IN (SELECT step_id from async_tasks WHERE command_id = v_command_id); > PERFORM DeleteOrphanJobs(); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteJobStepsZombies() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM step WHERE step_id IN (SELECT step_id FROM GetAsyncTasksZombies()); > PERFORM DeleteOrphanJobs(); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllJobs() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM job; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllEntitySnapshot() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM business_entity_snapshot; > PERFORM DeleteAllCommandEntities(); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteEntitySnapshotByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM business_entity_snapshot where command_id = v_command_id; > PERFORM DeleteCommandEntitiesByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllCommandEntities() RETURNS VOID > AS $procedure$ >BEGIN > IF (fn_db_is_table_exists ('command_entities')) THEN > DELETE FROM command_entities; > END IF; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteCommandEntitiesByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > IF (fn_db_is_table_exists ('command_entities')) THEN > DELETE FROM command_entities where command_id = v_command_id; > END IF; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllCommandEntitiesByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > IF (fn_db_is_table_exists ('command_entities')) THEN > DELETE FROM command_entities where command_id IN (SELECT command_id FROM GetAsyncTasksZombies()); > END IF; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/************************************************************************************************ > The following are helper SP for taskcleaner utility and are not exposed to the application DAOs >/This script deals with command_entities related SP >************************************************************************************************/ >Create or replace FUNCTION GetAllCommandsWithRunningTasks() RETURNS SETOF COMMAND_ENTITIES STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM COMMAND_ENTITIES C > WHERE EXISTS (SELECT * FROM ASYNC_TASKS A WHERE A.COMMAND_ID = C.COMMAND_ID); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllCommands() >RETURNS SETOF COMMAND_ENTITIES STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM COMMAND_ENTITIES; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllCommandsWithZombieTasks() >RETURNS SETOF COMMAND_ENTITIES STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM COMMAND_ENTITIES C > WHERE C.COMMAND_ID in (SELECT COMMAND_ID from GetAsyncTasksZombies()); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION DeleteAllCommands() >RETURNS integer > AS $procedure$ >DECLARE >deleted_rows int; >BEGIN > DELETE FROM COMMAND_ENTITIES; > GET DIAGNOSTICS deleted_rows = ROW_COUNT; > RETURN deleted_rows; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION DeleteAllCommandsWithZombieTasks() >RETURNS integer > AS $procedure$ >DECLARE >deleted_rows int; >BEGIN > DELETE FROM COMMAND_ENTITIES C > WHERE C.COMMAND_ID in (SELECT COMMAND_ID from GetAsyncTasksZombies()); > GET DIAGNOSTICS deleted_rows = ROW_COUNT; > RETURN deleted_rows; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION DeleteAllCommandsWithRunningTasks() >RETURNS integer > AS $procedure$ >DECLARE >deleted_rows int; >BEGIN > DELETE FROM COMMAND_ENTITIES C WHERE C.COMMAND_ID in (SELECT * FROM ASYNC_TASKS A WHERE A.COMMAND_ID = C.COMMAND_ID); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >SELECT DeleteAllCommandsWithZombieTasks(); >************************** > > 0 > >********* QUERY ********** >/************************************************************************************************ >Drop stuff created by taskcleaner_sp.sql >************************************************************************************************/ >DROP FUNCTION IF EXISTS DeleteAllCommands(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAllCommandsWithRunningTasks(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAllCommandsWithZombieTasks(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAllEntitySnapshot(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAllJobs(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAsyncTaskByCommandId(v_command_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAsyncTasksZombies(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAsyncTaskZombiesByCommandId(v_command_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAsyncTaskZombiesByTaskId(v_task_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteEntitySnapshotByTaskId(v_task_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteEntitySnapshotByZombieTaskId(v_task_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteEntitySnapshotZombies(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteJobStepsByCommandId(v_command_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteJobStepsByTaskId(v_task_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteJobStepsByZombieCommandId(v_command_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteJobStepsZombies(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS GetAllCommands(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS GetAllCommandsWithRunningTasks(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS GetAllCommandsWithZombieTasks(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS GetAsyncTasksZombies(); >************************** > >DROP FUNCTION >2019-02-26 17:06:21,152+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.executeRaw:863 execute-result: ('/usr/share/ovirt-engine/setup/dbutils/taskcleaner.sh', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-q', '-r', '-Z'), rc=0 >2019-02-26 17:06:21,153+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.execute:921 execute-output: ('/usr/share/ovirt-engine/setup/dbutils/taskcleaner.sh', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-q', '-r', '-Z') stdout: > t > 0 > > >2019-02-26 17:06:21,153+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.execute:926 execute-output: ('/usr/share/ovirt-engine/setup/dbutils/taskcleaner.sh', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-q', '-r', '-Z') stderr: > > >2019-02-26 17:06:21,154+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.executeRaw:813 execute: ('/usr/share/ovirt-engine/setup/dbutils/taskcleaner.sh', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-q', '-R', '-z', '-A'), executable='None', cwd='None', env={'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'DBFUNC_DB_PGPASSFILE': '/tmp/tmpvBMjd0', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'} >********* QUERY ********** >select exists (select * from information_schema.tables where table_schema = 'public' and table_name = 'command_entities'); >************************** > > t > >********* QUERY ********** >/************************************************************************************************ > The following are helper SP for taskcleaner utility and are not exposed to the application DAOs > >If you add a function here, drop it in taskcleaner_sp_drop.sql >************************************************************************************************/ >CREATE OR REPLACE FUNCTION GetAsyncTasksZombies() RETURNS SETOF async_tasks > AS $procedure$ >DECLARE > zombie_task_life varchar; > zombie_timestamptz timestamp with time zone; >BEGIN > zombie_task_life = option_value FROM vdc_options WHERE option_name = 'AsyncTaskZombieTaskLifeInMinutes'; > EXECUTE 'SELECT now() - interval ''' || zombie_task_life || ' minute''' INTO zombie_timestamptz; > > RETURN QUERY SELECT * > FROM async_tasks > WHERE started_at < zombie_timestamptz > ORDER BY command_id; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAsyncTaskZombiesByTaskId(v_task_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > IF EXISTS (SELECT 1 FROM GetAsyncTasksZombies() WHERE task_id = v_task_id) THEN > PERFORM Deleteasync_tasks(v_task_id); > END IF; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAsyncTaskZombiesByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >DECLARE >deleted_rows int; >root_command_id_of_deleted_cmds UUID; >BEGIN > IF (fn_db_is_table_exists ('command_entities')) THEN > DELETE FROM command_entities c WHERE > c.command_id IN ( > SELECT command_id FROM GetAsyncTasksZombies() t WHERE t.command_id = v_command_id > ); > > DELETE FROM command_entities c WHERE > c.command_id IN ( > SELECT root_command_id FROM GetAsyncTasksZombies() t WHERE t.root_command_id = v_command_id > ); > END IF; > > DELETE FROM async_tasks WHERE > root_command_id IN ( > SELECT root_command_id FROM GetAsyncTasksZombies() t WHERE t.root_command_id = v_command_id > ); > > DELETE FROM async_tasks WHERE > root_command_id IN ( > SELECT root_command_id FROM GetAsyncTasksZombies() t WHERE t.command_id = v_command_id > ); > > PERFORM DeleteEntitySnapshotByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAsyncTaskByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >DECLARE >deleted_rows int; >root_command_id_of_deleted_cmds UUID; >BEGIN > DELETE FROM async_tasks WHERE command_id = v_command_id; > IF (fn_db_is_table_exists ('command_entities')) THEN > SELECT root_command_id into root_command_id_of_deleted_cmds FROM COMMAND_entities WHERE command_id = v_command_id; > DELETE FROM command_entities where command_id = v_command_id; > GET DIAGNOSTICS deleted_rows = ROW_COUNT; > IF deleted_rows > 0 THEN > DELETE FROM command_entities C WHERE command_id = root_command_id_of_deleted_cmds AND NOT EXISTS (SELECT * from COMMAND_ENTITIES WHERE root_command_id = C.command_id); > END IF; > END IF; > PERFORM DeleteEntitySnapshotByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAsyncTasksZombies() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM async_tasks WHERE task_id in (SELECT task_id FROM GetAsyncTasksZombies()); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteJobStepsByTaskId(v_task_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM step WHERE external_id = v_task_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteEntitySnapshotByZombieTaskId(v_task_id UUID) RETURNS VOID > AS $procedure$ >DECLARE > v_command_id UUID; >BEGIN > v_command_id:=command_id FROM GetAsyncTasksZombies() WHERE task_id = v_task_id; > DELETE FROM business_entity_snapshot WHERE command_id = v_command_id; > PERFORM DeleteCommandEntitiesByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteEntitySnapshotByTaskId(v_task_id UUID) RETURNS VOID > AS $procedure$ >DECLARE > v_command_id UUID; >BEGIN > v_command_id:=command_id FROM async_tasks WHERE task_id = v_task_id; > DELETE FROM business_entity_snapshot WHERE command_id = v_command_id; > PERFORM DeleteCommandEntitiesByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteEntitySnapshotZombies() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM business_entity_snapshot WHERE command_id IN (SELECT command_id FROM GetAsyncTasksZombies()); > PERFORM DeleteAllCommandEntitiesByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteOrphanJobs() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM job WHERE NOT EXISTS (SELECT 1 from step where step.job_id = job.job_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteJobStepsByZombieCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM step WHERE step_id IN (SELECT step_id from GetAsyncTasksZombies() WHERE command_id = v_command_id); > PERFORM DeleteOrphanJobs(); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteJobStepsByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM step WHERE step_id IN (SELECT step_id from async_tasks WHERE command_id = v_command_id); > PERFORM DeleteOrphanJobs(); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteJobStepsZombies() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM step WHERE step_id IN (SELECT step_id FROM GetAsyncTasksZombies()); > PERFORM DeleteOrphanJobs(); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllJobs() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM job; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllEntitySnapshot() RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM business_entity_snapshot; > PERFORM DeleteAllCommandEntities(); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteEntitySnapshotByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM business_entity_snapshot where command_id = v_command_id; > PERFORM DeleteCommandEntitiesByCommandId(v_command_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllCommandEntities() RETURNS VOID > AS $procedure$ >BEGIN > IF (fn_db_is_table_exists ('command_entities')) THEN > DELETE FROM command_entities; > END IF; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteCommandEntitiesByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > IF (fn_db_is_table_exists ('command_entities')) THEN > DELETE FROM command_entities where command_id = v_command_id; > END IF; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllCommandEntitiesByCommandId(v_command_id UUID) RETURNS VOID > AS $procedure$ >BEGIN > IF (fn_db_is_table_exists ('command_entities')) THEN > DELETE FROM command_entities where command_id IN (SELECT command_id FROM GetAsyncTasksZombies()); > END IF; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/************************************************************************************************ > The following are helper SP for taskcleaner utility and are not exposed to the application DAOs >/This script deals with command_entities related SP >************************************************************************************************/ >Create or replace FUNCTION GetAllCommandsWithRunningTasks() RETURNS SETOF COMMAND_ENTITIES STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM COMMAND_ENTITIES C > WHERE EXISTS (SELECT * FROM ASYNC_TASKS A WHERE A.COMMAND_ID = C.COMMAND_ID); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllCommands() >RETURNS SETOF COMMAND_ENTITIES STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM COMMAND_ENTITIES; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllCommandsWithZombieTasks() >RETURNS SETOF COMMAND_ENTITIES STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM COMMAND_ENTITIES C > WHERE C.COMMAND_ID in (SELECT COMMAND_ID from GetAsyncTasksZombies()); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION DeleteAllCommands() >RETURNS integer > AS $procedure$ >DECLARE >deleted_rows int; >BEGIN > DELETE FROM COMMAND_ENTITIES; > GET DIAGNOSTICS deleted_rows = ROW_COUNT; > RETURN deleted_rows; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION DeleteAllCommandsWithZombieTasks() >RETURNS integer > AS $procedure$ >DECLARE >deleted_rows int; >BEGIN > DELETE FROM COMMAND_ENTITIES C > WHERE C.COMMAND_ID in (SELECT COMMAND_ID from GetAsyncTasksZombies()); > GET DIAGNOSTICS deleted_rows = ROW_COUNT; > RETURN deleted_rows; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION DeleteAllCommandsWithRunningTasks() >RETURNS integer > AS $procedure$ >DECLARE >deleted_rows int; >BEGIN > DELETE FROM COMMAND_ENTITIES C WHERE C.COMMAND_ID in (SELECT * FROM ASYNC_TASKS A WHERE A.COMMAND_ID = C.COMMAND_ID); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >SELECT DeleteAllJobs(); SELECT DeleteAllEntitySnapshot();SELECT DeleteAsyncTasksZombies(); >************************** > > > >********* QUERY ********** >/************************************************************************************************ >Drop stuff created by taskcleaner_sp.sql >************************************************************************************************/ >DROP FUNCTION IF EXISTS DeleteAllCommands(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAllCommandsWithRunningTasks(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAllCommandsWithZombieTasks(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAllEntitySnapshot(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAllJobs(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAsyncTaskByCommandId(v_command_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAsyncTasksZombies(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAsyncTaskZombiesByCommandId(v_command_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteAsyncTaskZombiesByTaskId(v_task_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteEntitySnapshotByTaskId(v_task_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteEntitySnapshotByZombieTaskId(v_task_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteEntitySnapshotZombies(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteJobStepsByCommandId(v_command_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteJobStepsByTaskId(v_task_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteJobStepsByZombieCommandId(v_command_id UUID); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS DeleteJobStepsZombies(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS GetAllCommands(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS GetAllCommandsWithRunningTasks(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS GetAllCommandsWithZombieTasks(); >************************** > >DROP FUNCTION >********* QUERY ********** >DROP FUNCTION IF EXISTS GetAsyncTasksZombies(); >************************** > >DROP FUNCTION >2019-02-26 17:06:21,337+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.executeRaw:863 execute-result: ('/usr/share/ovirt-engine/setup/dbutils/taskcleaner.sh', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-q', '-R', '-z', '-A'), rc=0 >2019-02-26 17:06:21,338+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.execute:921 execute-output: ('/usr/share/ovirt-engine/setup/dbutils/taskcleaner.sh', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-q', '-R', '-z', '-A') stdout: > t > > > >2019-02-26 17:06:21,338+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.execute:926 execute-output: ('/usr/share/ovirt-engine/setup/dbutils/taskcleaner.sh', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-q', '-R', '-z', '-A') stderr: > > >2019-02-26 17:06:21,341+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._review_config >2019-02-26 17:06:21,343+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._validateContinueLowMemory >2019-02-26 17:06:21,343+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:21,345+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.base.dialog.preview.Plugin._customization >2019-02-26 17:06:21,345+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:21,346+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== CONFIGURATION PREVIEW ==-- >2019-02-26 17:06:21,346+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:21,346+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Default SAN wipe after delete : False >2019-02-26 17:06:21,346+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Firewall manager : firewalld >2019-02-26 17:06:21,346+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Update Firewall : True >2019-02-26 17:06:21,347+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Host FQDN : gb60kf2.democustomer.televic.com >2019-02-26 17:06:21,347+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Engine database secured connection : False >2019-02-26 17:06:21,347+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Engine database user name : engine >2019-02-26 17:06:21,347+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Engine database name : engine >2019-02-26 17:06:21,347+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Engine database host : localhost >2019-02-26 17:06:21,348+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Engine database port : 5432 >2019-02-26 17:06:21,348+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Engine database host name validation : False >2019-02-26 17:06:21,348+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Engine installation : True >2019-02-26 17:06:21,348+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND PKI organization : demospace.televic.com >2019-02-26 17:06:21,348+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Set up ovirt-provider-ovn : True >2019-02-26 17:06:21,349+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Set up Cinderlib integration : False >2019-02-26 17:06:21,349+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Configure WebSocket Proxy : True >2019-02-26 17:06:21,349+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND DWH installation : True >2019-02-26 17:06:21,349+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND DWH database secured connection : False >2019-02-26 17:06:21,349+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND DWH database host : localhost >2019-02-26 17:06:21,350+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND DWH database user name : ovirt_engine_history >2019-02-26 17:06:21,350+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND DWH database name : ovirt_engine_history >2019-02-26 17:06:21,350+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Backup DWH database : True >2019-02-26 17:06:21,350+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND DWH database port : 5432 >2019-02-26 17:06:21,350+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND DWH database host name validation : False >2019-02-26 17:06:21,350+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Configure local DWH database : True >2019-02-26 17:06:21,351+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Configure Image I/O Proxy : True >2019-02-26 17:06:21,351+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Configure VMConsole Proxy : True >2019-02-26 17:06:21,351+0100 DEBUG otopi.plugins.otopi.dialog.human human.queryString:159 query OVESETUP_DIALOG_CONFIRM_SETTINGS >2019-02-26 17:06:21,351+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:21,351+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Please confirm installation settings (OK, Cancel) [OK]: >2019-02-26 17:06:21,352+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:21,352+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DIALOG/confirmSettings=bool:'True' >2019-02-26 17:06:21,353+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV QUESTION/1/OVESETUP_DIALOG_CONFIRM_SETTINGS=str:'ok' >2019-02-26 17:06:21,353+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:21,354+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._validation_late >2019-02-26 17:06:21,354+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select version, option_value > from vdc_options > where option_name = %(name)s > ', args: {'name': 'AdminPassword'} >2019-02-26 17:06:21,354+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:21,358+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:21,360+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaakerbldap.Plugin._validation_late >2019-02-26 17:06:21,361+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select version, option_value > from vdc_options > where option_name = %(name)s > ', args: {'name': 'DomainName'} >2019-02-26 17:06:21,361+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:21,365+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:21,367+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks.Plugin._validateAsyncTasks >2019-02-26 17:06:21,367+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks asynctasks._validateAsyncTasks:472 Cleaning async tasks and compensations >2019-02-26 17:06:21,367+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select > async_tasks.action_type, > async_tasks.task_id, > async_tasks.started_at, > storage_pool.name > from async_tasks, storage_pool > where async_tasks.storage_pool_id = storage_pool.id > ', args: {} >2019-02-26 17:06:21,368+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:21,371+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:21,371+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select relname > from pg_class > where relname = 'command_entities' > ', args: {} >2019-02-26 17:06:21,372+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:21,375+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'relname': 'command_entities'}] >2019-02-26 17:06:21,375+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select > command_entities.command_type, > command_entities.command_id, > command_entities.created_at, > command_entities.status > from command_entities > where command_entities.callback_enabled = 'true' > and command_entities.callback_notified = 'false' > ', args: {} >2019-02-26 17:06:21,375+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:21,379+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:21,379+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select command_type, entity_type > from business_entity_snapshot > ', args: {} >2019-02-26 17:06:21,379+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:21,382+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [] >2019-02-26 17:06:21,382+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks asynctasks._setEngineMode:67 Setting engine into MAINTENANCE mode >2019-02-26 17:06:21,382+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select count(*) as count > from vdc_options > where > option_name=%(name)s and > version=%(version)s > ', args: {'version': 'general', 'name': 'EngineMode'} >2019-02-26 17:06:21,382+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:21,386+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'count': 1L}] >2019-02-26 17:06:21,387+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select fn_db_update_config_value ( > %(name)s, > %(value)s, > %(version)s > ) > ', args: {'version': 'general', 'name': 'EngineMode', 'value': 'MAINTENANCE'} >2019-02-26 17:06:21,387+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:21,393+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'fn_db_update_config_value': ''}] >2019-02-26 17:06:21,393+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks asynctasks._validateAsyncTasks:510 Unlocking existing entities >2019-02-26 17:06:21,393+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.executeRaw:813 execute: ('/usr/share/ovirt-engine/setup/dbutils/unlock_entity.sh', '-t', 'all', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-i', '-f'), executable='None', cwd='None', env={'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'DBFUNC_DB_PGPASSFILE': '/tmp/tmpvBMjd0', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'} >********* QUERY ********** >/************************************************************************************************ > The following are helper SP for unlock_entity.sh utility and are not exposed to the application DAOs > >If you add a function here, drop it in unlock_entity_drop.sql >************************************************************************************************/ > >create or replace FUNCTION fn_db_unlock_all() >returns void >AS $procedure$ >declare > DOWN integer; > OK integer; > LOCKED integer; > TEMPLATE_OK integer; > TEMPLATE_LOCKED integer; > IMAGE_LOCKED integer; > SNAPSHOT_OK varchar; > SNAPSHOT_LOCKED varchar; > ILLEGAL integer; >BEGIN > DOWN:=0; > OK:=1; > LOCKED:=2; > TEMPLATE_OK:=0; > TEMPLATE_LOCKED:=1; > IMAGE_LOCKED:=15; > SNAPSHOT_OK:='OK'; > SNAPSHOT_LOCKED:='LOCKED'; > ILLEGAL:=4; > update vm_static set template_status = TEMPLATE_OK where template_status = TEMPLATE_LOCKED; > update vm_dynamic set status = DOWN where status = IMAGE_LOCKED; > update images set imagestatus = OK where imagestatus = LOCKED; > update snapshots set status = SNAPSHOT_OK where status ilike SNAPSHOT_LOCKED; > UPDATE images SET imagestatus = OK WHERE imagestatus = ILLEGAL; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >select fn_db_unlock_all(); >************************** > > > >********* QUERY ********** >/************************************************************************************************ >Drop the SPs created by unlock_entity.sql >************************************************************************************************/ >DROP FUNCTION IF EXISTS fn_db_unlock_all(); >************************** > >DROP FUNCTION >2019-02-26 17:06:21,509+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.executeRaw:863 execute-result: ('/usr/share/ovirt-engine/setup/dbutils/unlock_entity.sh', '-t', 'all', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-i', '-f'), rc=0 >2019-02-26 17:06:21,510+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.execute:921 execute-output: ('/usr/share/ovirt-engine/setup/dbutils/unlock_entity.sh', '-t', 'all', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-i', '-f') stdout: > >########################################## >CAUTION, this operation may lead to data corruption and should be used with care. Please contact support prior to running this command >########################################## > >Are you sure you want to proceed? [y/n] >select fn_db_unlock_all(); > > >unlock all completed successfully. > >2019-02-26 17:06:21,510+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks plugin.execute:926 execute-output: ('/usr/share/ovirt-engine/setup/dbutils/unlock_entity.sh', '-t', 'all', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-i', '-f') stderr: > > >2019-02-26 17:06:21,510+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.asynctasks asynctasks._setEngineMode:67 Setting engine into ACTIVE mode >2019-02-26 17:06:21,510+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select count(*) as count > from vdc_options > where > option_name=%(name)s and > version=%(version)s > ', args: {'version': 'general', 'name': 'EngineMode'} >2019-02-26 17:06:21,510+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:21,515+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'count': 1L}] >2019-02-26 17:06:21,515+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select fn_db_update_config_value ( > %(name)s, > %(value)s, > %(version)s > ) > ', args: {'version': 'general', 'name': 'EngineMode', 'value': 'ACTIVE'} >2019-02-26 17:06:21,515+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:21,521+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'fn_db_update_config_value': ''}] >2019-02-26 17:06:21,524+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations.Plugin._validation >2019-02-26 17:06:21,524+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations dbvalidations._validation:147 Checking the Engine database consistency >2019-02-26 17:06:21,525+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations plugin.executeRaw:813 execute: ['/usr/share/ovirt-engine/setup/dbutils/validatedb.sh', '--user=engine', '--host=localhost', '--port=5432', '--database=engine', '--log=/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log'], executable='None', cwd='None', env={'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'DBFUNC_DB_PGPASSFILE': '/tmp/tmpvBMjd0', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'} >********* QUERY ********** >SET client_min_messages=ERROR; >************************** > >SET >********* QUERY ********** >DROP TYPE IF EXISTS fk_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >DROP FUNCTION IF EXISTS fn_db_validate_fks(boolean,boolean); >************************** > >DROP FUNCTION >********* QUERY ********** >CREATE TYPE fk_info_rs AS > (schema_name varchar, table_name varchar, table_col varchar, fk_table_name varchar, fk_col varchar, fk_violation varchar, fk_status integer); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_validate_fks(v_fix_it boolean, v_verbose boolean) >returns SETOF fk_info_rs >AS $procedure$ >DECLARE > v_sql text; > v_msg text; > v_output text; > v_rowcount integer; > v_record fk_info_rs%ROWTYPE; > v_cur CURSOR FOR > SELECT > n.nspname as schema_name, > c.relname as table_name, > substring(substring ((select pg_get_constraintdef(r.oid)) from '[a-zA-Z0-9_, \-][(][a-zA-Z0-9_, \-]+[)]') from 2) as table_col, > c2.relname AS fk_table_name, > substring ((select pg_get_constraintdef(r.oid)) from ' [(][a-zA-Z0-9_, \-]+[)] ') as fk_col > FROM pg_class c, pg_class c2, pg_constraint r, pg_catalog.pg_namespace n > WHERE c.relname in (select table_name from information_schema.tables > where table_schema not in ('pg_catalog','information_schema') and table_type = 'BASE TABLE') AND > r.confrelid = c.oid AND > r.contype = 'f' AND > c2.oid = r.conrelid AND > n.oid = c.relnamespace AND > pg_get_constraintdef(r.oid) not ilike '%ON DELETE SET %' > ORDER BY table_name; > >BEGIN > OPEN v_cur; > LOOP > FETCH v_cur INTO v_record; > EXIT WHEN NOT FOUND; > v_record.fk_violation := ''; > v_record.fk_status := 0; > IF (v_fix_it) THEN > v_sql := 'delete from ' || v_record.schema_name || '.' || v_record.fk_table_name || > ' where ' || v_record.fk_col || 'IS NOT NULL and ' || v_record.fk_col || ' not in (select ' || > trim(both '()' from v_record.table_col) || ' from ' || v_record.schema_name || '.' || v_record.table_name || ');'; > v_msg := 'Fixing violation/s found in ' || v_record.fk_table_name ; > ELSE > v_sql := 'select ' || v_record.fk_col || ' from ' || v_record.schema_name || '.' || v_record.fk_table_name || > ' where ' || v_record.fk_col || 'IS NOT NULL and ' || v_record.fk_col || ' not in (select ' || > trim(both '()' from v_record.table_col) || ' from ' || v_record.schema_name || '.' || v_record.table_name || ');'; > v_msg := 'Constraint violation found in ' || v_record.fk_table_name || v_record.fk_col; > END IF; > EXECUTE v_sql; > GET DIAGNOSTICS v_rowcount = ROW_COUNT; > IF (v_rowcount > 0) THEN > IF (v_verbose and not v_fix_it) THEN > v_record.fk_violation := v_msg || E'\nPlease run the following SQL to get the ' || v_rowcount || E' violated record/s: \n' || v_sql || E'\n'; > ELSE > v_record.fk_violation := v_msg; > END IF; > v_record.fk_status := 1; > END IF; > RETURN NEXT v_record; > > END LOOP; > CLOSE v_cur; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >copy ( > select fk_violation, fk_status > from fn_db_validate_fks(false, 0 != 0) > where fk_status=1 > ) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >DROP TYPE IF EXISTS fk_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >DROP FUNCTION IF EXISTS fn_db_validate_fks(boolean,boolean); >************************** > >DROP FUNCTION >2019-02-26 17:06:21,773+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations plugin.executeRaw:863 execute-result: ['/usr/share/ovirt-engine/setup/dbutils/validatedb.sh', '--user=engine', '--host=localhost', '--port=5432', '--database=engine', '--log=/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log'], rc=0 >2019-02-26 17:06:21,774+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations plugin.execute:921 execute-output: ['/usr/share/ovirt-engine/setup/dbutils/validatedb.sh', '--user=engine', '--host=localhost', '--port=5432', '--database=engine', '--log=/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log'] stdout: > > >2019-02-26 17:06:21,774+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations plugin.execute:926 execute-output: ['/usr/share/ovirt-engine/setup/dbutils/validatedb.sh', '--user=engine', '--host=localhost', '--port=5432', '--database=engine', '--log=/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log'] stderr: > > >2019-02-26 17:06:21,777+0100 DEBUG otopi.context context._executeMethod:127 Stage validation METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaainternal.Plugin._validation >2019-02-26 17:06:21,777+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:21,778+0100 INFO otopi.context context.runSequence:610 Stage: Transaction setup >2019-02-26 17:06:21,778+0100 DEBUG otopi.context context.runSequence:614 STAGE transaction-prepare >2019-02-26 17:06:21,779+0100 DEBUG otopi.context context._executeMethod:127 Stage transaction-prepare METHOD otopi.plugins.otopi.core.transaction.Plugin._main_prepare >2019-02-26 17:06:21,780+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'Yum Transaction' >Loaded plugins: fastestmirror, versionlock >2019-02-26 17:06:21,824+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Repository ovirt-4.3-epel is listed more than once in the configuration >2019-02-26 17:06:21,824+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Repository ovirt-4.3-centos-gluster5 is listed more than once in the configuration >2019-02-26 17:06:21,825+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Repository ovirt-4.3-virtio-win-latest is listed more than once in the configuration >2019-02-26 17:06:21,825+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Repository ovirt-4.3-centos-qemu-ev is listed more than once in the configuration >2019-02-26 17:06:21,826+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Repository ovirt-4.3-centos-ovirt43 is listed more than once in the configuration >2019-02-26 17:06:21,826+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Repository ovirt-4.3-centos-opstools is listed more than once in the configuration >2019-02-26 17:06:21,827+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Repository centos-sclo-rh-release is listed more than once in the configuration >2019-02-26 17:06:21,828+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:21,835+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Repository centos-sclo-rh-release is listed more than once in the configuration >2019-02-26 17:06:21,837+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages packages.verbose:203 Yum Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:21,839+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'DWH Engine database Transaction' >2019-02-26 17:06:21,839+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'CinderLib Database Transaction' >2019-02-26 17:06:21,839+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'Database Transaction' >2019-02-26 17:06:21,840+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'Version Lock Transaction' >2019-02-26 17:06:21,840+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'DWH database Transaction' >2019-02-26 17:06:21,842+0100 DEBUG otopi.context context._executeMethod:127 Stage transaction-prepare METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.engine.Plugin._transactionBegin >2019-02-26 17:06:21,842+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service ovirt-engine exists >2019-02-26 17:06:21,842+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:21,850+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine.service'), rc=0 >2019-02-26 17:06:21,850+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine.service') stdout: >LoadState=loaded > >2019-02-26 17:06:21,850+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine.service') stderr: > > >2019-02-26 17:06:21,850+0100 INFO otopi.plugins.ovirt_engine_common.ovirt_engine.core.engine engine._transactionBegin:124 Stopping engine service >2019-02-26 17:06:21,851+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service ovirt-engine >2019-02-26 17:06:21,851+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'ovirt-engine.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:22,875+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'ovirt-engine.service'), rc=0 >2019-02-26 17:06:22,876+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-engine.service') stdout: > > >2019-02-26 17:06:22,876+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-engine.service') stderr: > > >2019-02-26 17:06:22,879+0100 DEBUG otopi.context context._executeMethod:127 Stage transaction-prepare METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.core.fence_kdump_listener.Plugin._transactionBegin >2019-02-26 17:06:22,879+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service ovirt-fence-kdump-listener exists >2019-02-26 17:06:22,879+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-fence-kdump-listener.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:22,888+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-fence-kdump-listener.service'), rc=0 >2019-02-26 17:06:22,888+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-fence-kdump-listener.service') stdout: >LoadState=loaded > >2019-02-26 17:06:22,888+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-fence-kdump-listener.service') stderr: > > >2019-02-26 17:06:22,888+0100 INFO otopi.plugins.ovirt_engine_common.ovirt_engine.core.fence_kdump_listener fence_kdump_listener._transactionBegin:64 Stopping ovirt-fence-kdump-listener service >2019-02-26 17:06:22,889+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service ovirt-fence-kdump-listener >2019-02-26 17:06:22,889+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'ovirt-fence-kdump-listener.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:22,902+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'ovirt-fence-kdump-listener.service'), rc=0 >2019-02-26 17:06:22,903+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-fence-kdump-listener.service') stdout: > > >2019-02-26 17:06:22,903+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-fence-kdump-listener.service') stderr: > > >2019-02-26 17:06:22,907+0100 DEBUG otopi.context context._executeMethod:127 Stage transaction-prepare METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.service.Plugin._transactionBegin >2019-02-26 17:06:22,908+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service ovirt-engine-dwhd exists >2019-02-26 17:06:22,908+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-dwhd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:22,919+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-dwhd.service'), rc=0 >2019-02-26 17:06:22,920+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-dwhd.service') stdout: >LoadState=loaded > >2019-02-26 17:06:22,920+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-dwhd.service') stderr: > > >2019-02-26 17:06:22,921+0100 INFO otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.core.service service._transactionBegin:62 Stopping dwh service >2019-02-26 17:06:22,921+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service ovirt-engine-dwhd >2019-02-26 17:06:22,921+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'ovirt-engine-dwhd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:25,946+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'ovirt-engine-dwhd.service'), rc=0 >2019-02-26 17:06:25,947+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-engine-dwhd.service') stdout: > > >2019-02-26 17:06:25,947+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-engine-dwhd.service') stderr: > > >2019-02-26 17:06:25,952+0100 DEBUG otopi.context context._executeMethod:127 Stage transaction-prepare METHOD otopi.plugins.ovirt_engine_common.ovirt_imageio_proxy.core.Plugin._transactionBegin >2019-02-26 17:06:25,953+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service ovirt-imageio-proxy exists >2019-02-26 17:06:25,953+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-imageio-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:25,967+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-imageio-proxy.service'), rc=0 >2019-02-26 17:06:25,967+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-imageio-proxy.service') stdout: >LoadState=loaded > >2019-02-26 17:06:25,968+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-imageio-proxy.service') stderr: > > >2019-02-26 17:06:25,968+0100 INFO otopi.plugins.ovirt_engine_common.ovirt_imageio_proxy.core core._transactionBegin:71 Stopping Image I/O Proxy service >2019-02-26 17:06:25,969+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service ovirt-imageio-proxy >2019-02-26 17:06:25,969+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'ovirt-imageio-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:26,969+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'ovirt-imageio-proxy.service'), rc=0 >2019-02-26 17:06:26,969+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-imageio-proxy.service') stdout: > > >2019-02-26 17:06:26,969+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-imageio-proxy.service') stderr: > > >2019-02-26 17:06:26,972+0100 DEBUG otopi.context context._executeMethod:127 Stage transaction-prepare METHOD otopi.plugins.ovirt_engine_common.vmconsole_proxy_helper.core.Plugin._transactionBegin >2019-02-26 17:06:26,972+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service ovirt-vmconsole-proxy-sshd exists >2019-02-26 17:06:26,972+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-vmconsole-proxy-sshd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:26,980+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-vmconsole-proxy-sshd.service'), rc=0 >2019-02-26 17:06:26,980+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-vmconsole-proxy-sshd.service') stdout: >LoadState=loaded > >2019-02-26 17:06:26,980+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-vmconsole-proxy-sshd.service') stderr: > > >2019-02-26 17:06:26,980+0100 INFO otopi.plugins.ovirt_engine_common.vmconsole_proxy_helper.core core._transactionBegin:71 Stopping vmconsole-proxy service >2019-02-26 17:06:26,981+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service ovirt-vmconsole-proxy-sshd >2019-02-26 17:06:26,981+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'ovirt-vmconsole-proxy-sshd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:26,993+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'ovirt-vmconsole-proxy-sshd.service'), rc=0 >2019-02-26 17:06:26,994+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-vmconsole-proxy-sshd.service') stdout: > > >2019-02-26 17:06:26,994+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-vmconsole-proxy-sshd.service') stderr: > > >2019-02-26 17:06:26,997+0100 DEBUG otopi.context context._executeMethod:127 Stage transaction-prepare METHOD otopi.plugins.ovirt_engine_common.websocket_proxy.core.Plugin._transactionBegin >2019-02-26 17:06:26,997+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service ovirt-websocket-proxy exists >2019-02-26 17:06:26,997+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-websocket-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:27,005+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-websocket-proxy.service'), rc=0 >2019-02-26 17:06:27,005+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-websocket-proxy.service') stdout: >LoadState=loaded > >2019-02-26 17:06:27,005+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-websocket-proxy.service') stderr: > > >2019-02-26 17:06:27,006+0100 INFO otopi.plugins.ovirt_engine_common.websocket_proxy.core core._transactionBegin:74 Stopping websocket-proxy service >2019-02-26 17:06:27,006+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service ovirt-websocket-proxy >2019-02-26 17:06:27,006+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'ovirt-websocket-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:27,024+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'ovirt-websocket-proxy.service'), rc=0 >2019-02-26 17:06:27,024+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-websocket-proxy.service') stdout: > > >2019-02-26 17:06:27,025+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-websocket-proxy.service') stderr: > > >2019-02-26 17:06:27,027+0100 DEBUG otopi.context context._executeMethod:127 Stage transaction-prepare METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.external_truststore.Plugin.remove_external_truststore >2019-02-26 17:06:27,027+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:27,030+0100 DEBUG otopi.context context._executeMethod:127 Stage transaction-prepare METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._transaction_begin >2019-02-26 17:06:27,030+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service ovirt-engine-dwhd exists >2019-02-26 17:06:27,030+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-dwhd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:27,037+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-dwhd.service'), rc=0 >2019-02-26 17:06:27,037+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-dwhd.service') stdout: >LoadState=loaded > >2019-02-26 17:06:27,037+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-dwhd.service') stderr: > > >2019-02-26 17:06:27,037+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.status:90 check service ovirt-engine-dwhd status >2019-02-26 17:06:27,038+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'status', 'ovirt-engine-dwhd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:27,045+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'status', 'ovirt-engine-dwhd.service'), rc=3 >2019-02-26 17:06:27,045+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'status', 'ovirt-engine-dwhd.service') stdout: >â ovirt-engine-dwhd.service - oVirt Engine Data Warehouse > Loaded: loaded (/usr/lib/systemd/system/ovirt-engine-dwhd.service; enabled; vendor preset: disabled) > Active: inactive (dead) since Tue 2019-02-26 17:06:25 CET; 1s ago > Process: 23283 ExecStart=/usr/share/ovirt-engine-dwh/services/ovirt-engine-dwhd/ovirt-engine-dwhd.py --redirect-output --systemd=notify $EXTRA_ARGS start (code=exited, status=0/SUCCESS) > Main PID: 23283 (code=exited, status=0/SUCCESS) > >Feb 26 17:02:01 gb60kf2.democustomer.televic.com systemd[1]: Starting oVirt Engine Data Warehouse... >Feb 26 17:02:01 gb60kf2.democustomer.televic.com systemd[1]: Started oVirt Engine Data Warehouse. >Feb 26 17:06:22 gb60kf2.democustomer.televic.com systemd[1]: Stopping oVirt Engine Data Warehouse... >Feb 26 17:06:25 gb60kf2.democustomer.televic.com systemd[1]: Stopped oVirt Engine Data Warehouse. > >2019-02-26 17:06:27,045+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'status', 'ovirt-engine-dwhd.service') stderr: > > >2019-02-26 17:06:27,045+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service ovirt-engine-notifier exists >2019-02-26 17:06:27,046+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-notifier.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:27,053+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-notifier.service'), rc=0 >2019-02-26 17:06:27,054+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-notifier.service') stdout: >LoadState=loaded > >2019-02-26 17:06:27,054+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'ovirt-engine-notifier.service') stderr: > > >2019-02-26 17:06:27,054+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.status:90 check service ovirt-engine-notifier status >2019-02-26 17:06:27,054+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'status', 'ovirt-engine-notifier.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:27,062+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'status', 'ovirt-engine-notifier.service'), rc=3 >2019-02-26 17:06:27,062+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'status', 'ovirt-engine-notifier.service') stdout: >â ovirt-engine-notifier.service - oVirt Engine Notifier > Loaded: loaded (/usr/lib/systemd/system/ovirt-engine-notifier.service; disabled; vendor preset: disabled) > Active: inactive (dead) > >2019-02-26 17:06:27,063+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'status', 'ovirt-engine-notifier.service') stderr: > > >2019-02-26 17:06:27,066+0100 DEBUG otopi.context context._executeMethod:127 Stage transaction-prepare METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._transactionBegin >2019-02-26 17:06:27,066+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select * from GetDwhHistoryTimekeepingByVarName( > %(name)s > ) > ', args: {'name': 'DwhCurrentlyRunning'} >2019-02-26 17:06:27,066+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:27,072+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'var_value': '0', 'var_datetime': None, 'var_name': 'DwhCurrentlyRunning'}] >2019-02-26 17:06:27,073+0100 INFO otopi.context context.runSequence:610 Stage: Misc configuration (early) >2019-02-26 17:06:27,073+0100 DEBUG otopi.context context.runSequence:614 STAGE early_misc >2019-02-26 17:06:27,075+0100 DEBUG otopi.context context._executeMethod:127 Stage early_misc METHOD otopi.plugins.otopi.network.firewalld.Plugin._early_misc >2019-02-26 17:06:27,075+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'Firewalld Transaction' >2019-02-26 17:06:27,075+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.exists:73 check if service iptables exists >2019-02-26 17:06:27,075+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'iptables.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:27,083+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'iptables.service'), rc=0 >2019-02-26 17:06:27,084+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'iptables.service') stdout: >LoadState=not-found > >2019-02-26 17:06:27,084+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'LoadState', 'iptables.service') stderr: > > >2019-02-26 17:06:27,084+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 starting service firewalld >2019-02-26 17:06:27,084+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'start', 'firewalld.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:27,091+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'start', 'firewalld.service'), rc=0 >2019-02-26 17:06:27,092+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'start', 'firewalld.service') stdout: > > >2019-02-26 17:06:27,092+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'start', 'firewalld.service') stderr: > > >2019-02-26 17:06:27,092+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.startup:99 set service firewalld startup to True >2019-02-26 17:06:27,092+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'firewalld.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:27,099+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'firewalld.service'), rc=0 >2019-02-26 17:06:27,100+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'firewalld.service') stdout: >Id=firewalld.service > >2019-02-26 17:06:27,100+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'firewalld.service') stderr: > > >2019-02-26 17:06:27,100+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'enable', u'firewalld.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:27,154+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'enable', u'firewalld.service'), rc=0 >2019-02-26 17:06:27,155+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'enable', u'firewalld.service') stdout: > > >2019-02-26 17:06:27,155+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'enable', u'firewalld.service') stderr: > > >2019-02-26 17:06:27,155+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--list-all-zones'), executable='None', cwd='None', env=None >2019-02-26 17:06:27,406+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--list-all-zones'), rc=0 >2019-02-26 17:06:27,407+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--list-all-zones') stdout: >block > target: %%REJECT%% > icmp-block-inversion: no > interfaces: > sources: > services: > ports: > protocols: > masquerade: no > forward-ports: > source-ports: > icmp-blocks: > rich rules: > > >dmz > target: default > icmp-block-inversion: no > interfaces: > sources: > services: ssh > ports: > protocols: > masquerade: no > forward-ports: > source-ports: > icmp-blocks: > rich rules: > > >drop > target: DROP > icmp-block-inversion: no > interfaces: > sources: > services: > ports: > protocols: > masquerade: no > forward-ports: > source-ports: > icmp-blocks: > rich rules: > > >external > target: default > icmp-block-inversion: no > interfaces: > sources: > services: ssh > ports: > protocols: > masquerade: yes > forward-ports: > source-ports: > icmp-blocks: > rich rules: > > >home > target: default > icmp-block-inversion: no > interfaces: > sources: > services: ssh mdns samba-client dhcpv6-client > ports: > protocols: > masquerade: no > forward-ports: > source-ports: > icmp-blocks: > rich rules: > > >internal > target: default > icmp-block-inversion: no > interfaces: > sources: > services: ssh mdns samba-client dhcpv6-client > ports: > protocols: > masquerade: no > forward-ports: > source-ports: > icmp-blocks: > rich rules: > > >public (active) > target: default > icmp-block-inversion: no > interfaces: em1 em2 > sources: > services: ssh dhcpv6-client ovirt-postgres ovirt-https ovn-central-firewall-service ovirt-fence-kdump-listener ovirt-imageio-proxy ovirt-websocket-proxy ovirt-http ovirt-vmconsole-proxy ovirt-provider-ovn > ports: 24007/tcp 24008/tcp 2222/tcp 49152-49251/tcp 9986/tcp > protocols: > masquerade: no > forward-ports: > source-ports: > icmp-blocks: > rich rules: > > >trusted > target: ACCEPT > icmp-block-inversion: no > interfaces: > sources: > services: > ports: > protocols: > masquerade: no > forward-ports: > source-ports: > icmp-blocks: > rich rules: > > >work > target: default > icmp-block-inversion: no > interfaces: > sources: > services: ssh dhcpv6-client > ports: > protocols: > masquerade: no > forward-ports: > source-ports: > icmp-blocks: > rich rules: > > > >2019-02-26 17:06:27,407+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--list-all-zones') stderr: > > >2019-02-26 17:06:27,407+0100 DEBUG otopi.plugins.otopi.network.firewalld firewalld._early_misc:273 zones_services = {u'work': [u'ssh', u'dhcpv6-client'], u'internal': [u'ssh', u'mdns', u'samba-client', u'dhcpv6-client'], u'external': [u'ssh'], u'home': [u'ssh', u'mdns', u'samba-client', u'dhcpv6-client'], u'dmz': [u'ssh'], u'public': [u'ssh', u'dhcpv6-client', u'ovirt-postgres', u'ovirt-https', u'ovn-central-firewall-service', u'ovirt-fence-kdump-listener', u'ovirt-imageio-proxy', u'ovirt-websocket-proxy', u'ovirt-http', u'ovirt-vmconsole-proxy', u'ovirt-provider-ovn']} >2019-02-26 17:06:27,410+0100 DEBUG otopi.context context._executeMethod:127 Stage early_misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade.Plugin._updateDBMS >2019-02-26 17:06:27,410+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:27,412+0100 DEBUG otopi.context context._executeMethod:127 Stage early_misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations.Plugin._misc >2019-02-26 17:06:27,412+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:27,414+0100 DEBUG otopi.context context._executeMethod:127 Stage early_misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.dbmsupgrade.Plugin._updateDBMS >2019-02-26 17:06:27,414+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:27,416+0100 DEBUG otopi.context context._executeMethod:127 Stage early_misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin._updatePGConf >2019-02-26 17:06:27,416+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:27,418+0100 INFO otopi.context context.runSequence:610 Stage: Package installation >2019-02-26 17:06:27,418+0100 DEBUG otopi.context context.runSequence:614 STAGE packages >2019-02-26 17:06:27,419+0100 DEBUG otopi.context context._executeMethod:127 Stage packages METHOD otopi.plugins.otopi.network.iptables.Plugin._packages >2019-02-26 17:06:27,419+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:27,421+0100 DEBUG otopi.context context._executeMethod:127 Stage packages METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages.Plugin.packages >2019-02-26 17:06:27,421+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:27,423+0100 DEBUG otopi.context context._executeMethod:127 Stage packages METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._packages >2019-02-26 17:06:27,423+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum queue package ovirt-vmconsole-proxy for install/update >Loading mirror speeds from cached hostfile > * base: mirror.unix-solutions.be > * centos-gluster5: mirror.unix-solutions.be > * extras: mirror.unix-solutions.be > * ovirt-4.3: ftp.nluug.nl > * ovirt-4.3-epel: mirror.i3d.net > * ovirt-4.3-snapshot: ftp.nluug.nl > * ovirt-4.3-snapshot-static: ftp.nluug.nl > * ovirt-master-epel: mirror.i3d.net > * ovirt-master-snapshot: ftp.nluug.nl > * ovirt-master-snapshot-static: ftp.nluug.nl > * updates: mirror.unix-solutions.be >2019-02-26 17:06:32,185+0100 DEBUG otopi.context context._executeMethod:127 Stage packages METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._packages >2019-02-26 17:06:32,186+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,188+0100 DEBUG otopi.context context._executeMethod:127 Stage packages METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._packages >2019-02-26 17:06:32,188+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Building transaction >2019-02-26 17:06:32,209+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Empty transaction >2019-02-26 17:06:32,210+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Transaction Summary: >2019-02-26 17:06:32,211+0100 INFO otopi.context context.runSequence:610 Stage: Misc configuration >2019-02-26 17:06:32,211+0100 DEBUG otopi.context context.runSequence:614 STAGE misc >2019-02-26 17:06:32,212+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.config.jboss.Plugin._jboss >2019-02-26 17:06:32,214+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.otopi.system.command.Plugin._misc >2019-02-26 17:06:32,215+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:32,215+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ssh-keygen=str:'/usr/bin/ssh-keygen' >2019-02-26 17:06:32,216+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:32,217+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl.Plugin._misc >2019-02-26 17:06:32,217+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl plugin.executeRaw:813 execute: ('/usr/sbin/sysctl', '-n', 'kernel.shmmax'), executable='None', cwd='None', env=None >2019-02-26 17:06:32,224+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl plugin.executeRaw:863 execute-result: ('/usr/sbin/sysctl', '-n', 'kernel.shmmax'), rc=0 >2019-02-26 17:06:32,224+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl plugin.execute:921 execute-output: ('/usr/sbin/sysctl', '-n', 'kernel.shmmax') stdout: >18446744073692774399 > >2019-02-26 17:06:32,225+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.system.sysctl plugin.execute:926 execute-output: ('/usr/sbin/sysctl', '-n', 'kernel.shmmax') stderr: > > >2019-02-26 17:06:32,227+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.otopi.network.firewalld.Plugin._misc >2019-02-26 17:06:32,228+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/firewalld/services/ovirt-postgres.xml'' >2019-02-26 17:06:32,228+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/firewalld/services/ovirt-postgres.xml' exists >2019-02-26 17:06:32,228+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/firewalld/services/ovirt-postgres.xml' already has content >2019-02-26 17:06:32,228+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/firewalld/services/ovirt-https.xml'' >2019-02-26 17:06:32,228+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/firewalld/services/ovirt-https.xml' exists >2019-02-26 17:06:32,229+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/firewalld/services/ovirt-https.xml' already has content >2019-02-26 17:06:32,229+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/firewalld/services/ovn-central-firewall-service.xml'' >2019-02-26 17:06:32,229+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/firewalld/services/ovn-central-firewall-service.xml' exists >2019-02-26 17:06:32,229+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/firewalld/services/ovn-central-firewall-service.xml' already has content >2019-02-26 17:06:32,229+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/firewalld/services/ovirt-fence-kdump-listener.xml'' >2019-02-26 17:06:32,229+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/firewalld/services/ovirt-fence-kdump-listener.xml' exists >2019-02-26 17:06:32,229+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/firewalld/services/ovirt-fence-kdump-listener.xml' already has content >2019-02-26 17:06:32,229+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/firewalld/services/ovirt-imageio-proxy.xml'' >2019-02-26 17:06:32,230+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/firewalld/services/ovirt-imageio-proxy.xml' exists >2019-02-26 17:06:32,230+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/firewalld/services/ovirt-imageio-proxy.xml' already has content >2019-02-26 17:06:32,230+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/firewalld/services/ovirt-websocket-proxy.xml'' >2019-02-26 17:06:32,230+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/firewalld/services/ovirt-websocket-proxy.xml' exists >2019-02-26 17:06:32,230+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/firewalld/services/ovirt-websocket-proxy.xml' already has content >2019-02-26 17:06:32,230+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/firewalld/services/ovirt-http.xml'' >2019-02-26 17:06:32,230+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/firewalld/services/ovirt-http.xml' exists >2019-02-26 17:06:32,231+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/firewalld/services/ovirt-http.xml' already has content >2019-02-26 17:06:32,231+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/firewalld/services/ovirt-vmconsole-proxy.xml'' >2019-02-26 17:06:32,231+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/firewalld/services/ovirt-vmconsole-proxy.xml' exists >2019-02-26 17:06:32,231+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/firewalld/services/ovirt-vmconsole-proxy.xml' already has content >2019-02-26 17:06:32,231+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/firewalld/services/ovirt-provider-ovn.xml'' >2019-02-26 17:06:32,231+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/firewalld/services/ovirt-provider-ovn.xml' exists >2019-02-26 17:06:32,231+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/firewalld/services/ovirt-provider-ovn.xml' already has content >2019-02-26 17:06:32,233+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.otopi.network.iptables.Plugin._store_iptables >2019-02-26 17:06:32,233+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,235+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.otopi.network.ssh.Plugin._append_key >2019-02-26 17:06:32,236+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,238+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.otopi.system.clock.Plugin._set_clock >2019-02-26 17:06:32,238+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,240+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._prepare_examples >2019-02-26 17:06:32,240+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/firewalld/ovn-central-firewall-service.xml'' >2019-02-26 17:06:32,240+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/firewalld/ovn-central-firewall-service.xml' exists >2019-02-26 17:06:32,240+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/firewalld/ovn-central-firewall-service.xml' already has content >2019-02-26 17:06:32,240+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-provider-ovn.xml'' >2019-02-26 17:06:32,240+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/firewalld/ovirt-provider-ovn.xml' exists >2019-02-26 17:06:32,240+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/firewalld/ovirt-provider-ovn.xml' already has content >2019-02-26 17:06:32,241+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-http.xml'' >2019-02-26 17:06:32,241+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/firewalld/ovirt-http.xml' exists >2019-02-26 17:06:32,241+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/firewalld/ovirt-http.xml' already has content >2019-02-26 17:06:32,241+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-https.xml'' >2019-02-26 17:06:32,241+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/firewalld/ovirt-https.xml' exists >2019-02-26 17:06:32,241+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/firewalld/ovirt-https.xml' already has content >2019-02-26 17:06:32,241+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-vmconsole-proxy.xml'' >2019-02-26 17:06:32,242+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/firewalld/ovirt-vmconsole-proxy.xml' exists >2019-02-26 17:06:32,242+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/firewalld/ovirt-vmconsole-proxy.xml' already has content >2019-02-26 17:06:32,242+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-imageio-proxy.xml'' >2019-02-26 17:06:32,242+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/firewalld/ovirt-imageio-proxy.xml' exists >2019-02-26 17:06:32,242+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/firewalld/ovirt-imageio-proxy.xml' already has content >2019-02-26 17:06:32,242+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-websocket-proxy.xml'' >2019-02-26 17:06:32,242+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/firewalld/ovirt-websocket-proxy.xml' exists >2019-02-26 17:06:32,242+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/firewalld/ovirt-websocket-proxy.xml' already has content >2019-02-26 17:06:32,243+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-fence-kdump-listener.xml'' >2019-02-26 17:06:32,243+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/firewalld/ovirt-fence-kdump-listener.xml' exists >2019-02-26 17:06:32,243+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/firewalld/ovirt-fence-kdump-listener.xml' already has content >2019-02-26 17:06:32,243+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-postgres.xml'' >2019-02-26 17:06:32,243+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/firewalld/ovirt-postgres.xml' exists >2019-02-26 17:06:32,243+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/firewalld/ovirt-postgres.xml' already has content >2019-02-26 17:06:32,243+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-postgres.xml'' >2019-02-26 17:06:32,243+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/firewalld/ovirt-postgres.xml' exists >2019-02-26 17:06:32,244+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/firewalld/ovirt-postgres.xml' already has content >2019-02-26 17:06:32,245+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/iptables.example'' >2019-02-26 17:06:32,245+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/iptables.example' exists >2019-02-26 17:06:32,245+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/iptables.example' already has content >2019-02-26 17:06:32,247+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._misc >2019-02-26 17:06:32,247+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,249+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.engine.Plugin._misc >2019-02-26 17:06:32,250+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/httpd/conf.d/z-ovirt-engine-proxy.conf'' >2019-02-26 17:06:32,250+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/httpd/conf.d/z-ovirt-engine-proxy.conf' exists >2019-02-26 17:06:32,250+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/httpd/conf.d/z-ovirt-engine-proxy.conf' already has content >2019-02-26 17:06:32,250+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:32,251+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/needRestart=bool:'True' >2019-02-26 17:06:32,251+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:32,252+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.apache.root.Plugin._misc >2019-02-26 17:06:32,253+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,254+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaainternal.Plugin._misc >2019-02-26 17:06:32,255+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,257+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.java.Plugin._misc >2019-02-26 17:06:32,257+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,259+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.jboss.Plugin._misc >2019-02-26 17:06:32,259+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-jboss.conf'' >2019-02-26 17:06:32,259+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/engine.conf.d/10-setup-jboss.conf' exists >2019-02-26 17:06:32,259+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/engine.conf.d/10-setup-jboss.conf' already has content >2019-02-26 17:06:32,259+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/notifier/notifier.conf.d/10-setup-jboss.conf'' >2019-02-26 17:06:32,259+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/notifier/notifier.conf.d/10-setup-jboss.conf' exists >2019-02-26 17:06:32,259+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/notifier/notifier.conf.d/10-setup-jboss.conf' already has content >2019-02-26 17:06:32,261+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.protocols.Plugin._misc >2019-02-26 17:06:32,262+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf'' >2019-02-26 17:06:32,262+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf' exists >2019-02-26 17:06:32,262+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf' already has content >2019-02-26 17:06:32,264+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.tools.Plugin._misc >2019-02-26 17:06:32,264+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/isouploader.conf.d/10-engine-setup.conf'' >2019-02-26 17:06:32,264+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/isouploader.conf.d/10-engine-setup.conf' exists >2019-02-26 17:06:32,264+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/isouploader.conf.d/10-engine-setup.conf' already has content >2019-02-26 17:06:32,264+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/logcollector.conf.d/10-engine-setup.conf'' >2019-02-26 17:06:32,265+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/logcollector.conf.d/10-engine-setup.conf' exists >2019-02-26 17:06:32,265+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/logcollector.conf.d/10-engine-setup.conf' already has content >2019-02-26 17:06:32,267+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.core.advertise_dwh.Plugin._get_dwh_host >2019-02-26 17:06:32,267+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select * from GetDwhHistoryTimekeepingByVarName( > %(name)s > ) > ', args: {'name': 'dwhHostname'} >2019-02-26 17:06:32,267+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:32,272+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'var_value': 'gb60kf2.democustomer.televic.com', 'var_datetime': None, 'var_name': 'dwhHostname'}] >2019-02-26 17:06:32,273+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.core.advertise_dwh advertise_dwh._get_dwh_host:71 DWH host is gb60kf2.democustomer.televic.com. >2019-02-26 17:06:32,275+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.vacuum.Plugin._vacuum >2019-02-26 17:06:32,275+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,277+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_pki >2019-02-26 17:06:32,277+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,279+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._restart_ovn_services >2019-02-26 17:06:32,279+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,281+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._miscUpgrade >2019-02-26 17:06:32,282+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._miscUpgrade:589 Upgrading CA >2019-02-26 17:06:32,282+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/pki/ovirt-engine/cacert.template'' >2019-02-26 17:06:32,282+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/pki/ovirt-engine/cacert.template' exists >2019-02-26 17:06:32,282+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/pki/ovirt-engine/cacert.template' already has content >2019-02-26 17:06:32,283+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/pki/ovirt-engine/cacert.conf'' >2019-02-26 17:06:32,283+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/pki/ovirt-engine/cacert.conf' exists >2019-02-26 17:06:32,283+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/pki/ovirt-engine/cacert.conf' already has content >2019-02-26 17:06:32,283+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/pki/ovirt-engine/cert.template'' >2019-02-26 17:06:32,283+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/pki/ovirt-engine/cert.template' exists >2019-02-26 17:06:32,283+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/pki/ovirt-engine/cert.template' already has content >2019-02-26 17:06:32,283+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/pki/ovirt-engine/cert.conf'' >2019-02-26 17:06:32,284+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/pki/ovirt-engine/cert.conf' exists >2019-02-26 17:06:32,284+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/pki/ovirt-engine/cert.conf' already has content >2019-02-26 17:06:32,284+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/pki/ovirt-engine/cert.conf'' >2019-02-26 17:06:32,284+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/pki/ovirt-engine/cert.template'' >2019-02-26 17:06:32,284+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/pki/ovirt-engine/cacert.conf'' >2019-02-26 17:06:32,284+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/pki/ovirt-engine/cacert.template'' >2019-02-26 17:06:32,284+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._enrollCertificates:349 processing: 'engine'[renew=False] >2019-02-26 17:06:32,284+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._enrollCertificates:349 processing: 'jboss'[renew=False] >2019-02-26 17:06:32,285+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._enrollCertificates:349 processing: 'websocket-proxy'[renew=False] >2019-02-26 17:06:32,285+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._enrollCertificates:349 processing: 'apache'[renew=False] >2019-02-26 17:06:32,285+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._enrollCertificates:349 processing: 'reports'[renew=False] >2019-02-26 17:06:32,285+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca ca._enrollCertificates:349 processing: 'imageio-proxy'[renew=False] >2019-02-26 17:06:32,286+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:32,286+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/ca_pki=list:'[[]]' >2019-02-26 17:06:32,286+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_LINES_GROUP/ca_pki=dict:'{}' >2019-02-26 17:06:32,286+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:32,287+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._misc >2019-02-26 17:06:32,287+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,289+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._misc >2019-02-26 17:06:32,290+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,292+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.answerfile_fixup.Plugin._misc >2019-02-26 17:06:32,294+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.selinux.Plugin._misc >2019-02-26 17:06:32,295+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:32,295+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/selinuxBooleans=list:'[{'state': 'on', 'boolean': 'httpd_can_network_connect'}]' >2019-02-26 17:06:32,295+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:32,296+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.ssl.Plugin._misc >2019-02-26 17:06:32,296+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,298+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.versionlock_config.Plugin._misc >2019-02-26 17:06:32,299+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/yum/pluginconf.d/versionlock.conf'' >2019-02-26 17:06:32,299+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/yum/pluginconf.d/versionlock.conf' exists >2019-02-26 17:06:32,299+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/yum/pluginconf.d/versionlock.conf' already has content >2019-02-26 17:06:32,300+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:32,300+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallUnremovableFiles=list:'['/etc/yum/pluginconf.d/versionlock.conf']' >2019-02-26 17:06:32,301+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/versionlock_conf=list:'[]' >2019-02-26 17:06:32,301+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_LINES_GROUP/versionlock_conf=dict:'{'/etc/yum/pluginconf.d/versionlock.conf': []}' >2019-02-26 17:06:32,301+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:32,302+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh.Plugin._misc_stop_remote_dwh >2019-02-26 17:06:32,302+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select * from GetDwhHistoryTimekeepingByVarName( > %(name)s > ) > ', args: {'name': 'dwhHostname'} >2019-02-26 17:06:32,302+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:32,307+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'var_value': 'gb60kf2.democustomer.televic.com', 'var_datetime': None, 'var_name': 'dwhHostname'}] >2019-02-26 17:06:32,307+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select * from GetDwhHistoryTimekeepingByVarName( > %(name)s > ) > ', args: {'name': 'DwhCurrentlyRunning'} >2019-02-26 17:06:32,307+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:32,312+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'var_value': '0', 'var_datetime': None, 'var_name': 'DwhCurrentlyRunning'}] >2019-02-26 17:06:32,314+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.scale.Plugin._misc >2019-02-26 17:06:32,314+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf'' >2019-02-26 17:06:32,314+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf' exists >2019-02-26 17:06:32,314+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf' already has content >2019-02-26 17:06:32,315+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:32,315+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/ovirt_dwh_files=list:'[[]]' >2019-02-26 17:06:32,316+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:32,317+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._misc >2019-02-26 17:06:32,317+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,319+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._misc_config >2019-02-26 17:06:32,319+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-imageio-proxy/ovirt-imageio-proxy.conf'' >2019-02-26 17:06:32,320+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-imageio-proxy/ovirt-imageio-proxy.conf' exists >2019-02-26 17:06:32,320+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-imageio-proxy/ovirt-imageio-proxy.conf' already has content >2019-02-26 17:06:32,322+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._miscConfigVMConsoleHelper >2019-02-26 17:06:32,322+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/ovirt-vmconsole-proxy-helper.conf.d/10-setup.conf'' >2019-02-26 17:06:32,322+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/ovirt-vmconsole-proxy-helper.conf.d/10-setup.conf' exists >2019-02-26 17:06:32,322+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/ovirt-vmconsole-proxy-helper.conf.d/10-setup.conf' already has content >2019-02-26 17:06:32,325+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.config.Plugin._miscConfigVMConsoleProxy >2019-02-26 17:06:32,325+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-vmconsole/ovirt-vmconsole-proxy/conf.d/20-ovirt-vmconsole-proxy-helper.conf'' >2019-02-26 17:06:32,325+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-vmconsole/ovirt-vmconsole-proxy/conf.d/20-ovirt-vmconsole-proxy-helper.conf' exists >2019-02-26 17:06:32,325+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-vmconsole/ovirt-vmconsole-proxy/conf.d/20-ovirt-vmconsole-proxy-helper.conf' already has content >2019-02-26 17:06:32,327+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._misc_config >2019-02-26 17:06:32,327+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf'' >2019-02-26 17:06:32,327+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf' exists >2019-02-26 17:06:32,328+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf' already has content >2019-02-26 17:06:32,330+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_common.cinderlib.db.pgpass.Plugin._misc >2019-02-26 17:06:32,330+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,332+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_common.ovirt_engine.db.pgpass.Plugin._misc >2019-02-26 17:06:32,333+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:32,333+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/pgPassFile=str:'/tmp/tmphKUzTK' >2019-02-26 17:06:32,333+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:32,334+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.pgpass.Plugin._misc >2019-02-26 17:06:32,336+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:32,336+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/pgPassFile=str:'/tmp/tmpGEZX1y' >2019-02-26 17:06:32,336+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:32,337+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._misc >2019-02-26 17:06:32,337+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,339+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._misc_cinderlib_schema >2019-02-26 17:06:32,341+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.configuration.Plugin.installUuidOsspExtensionForLocalDb >2019-02-26 17:06:32,341+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select count(*) as count > from pg_available_extensions > where name = 'uuid-ossp' > and installed_version IS NOT NULL > ', args: None >2019-02-26 17:06:32,342+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:32,347+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'count': 1L}] >2019-02-26 17:06:32,349+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_configure_ovn_pki >2019-02-26 17:06:32,349+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,351+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_configure_provider >2019-02-26 17:06:32,351+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:32,353+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh.Plugin._misc >2019-02-26 17:06:32,354+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.executeRaw:813 execute: ('/usr/share/ovirt-engine/bin/pki-pkcs12-extract.sh', '--name=engine', '--passin=**FILTERED**', '--key=-'), executable='None', cwd='None', env=None >2019-02-26 17:06:32,368+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.executeRaw:863 execute-result: ('/usr/share/ovirt-engine/bin/pki-pkcs12-extract.sh', '--name=engine', '--passin=**FILTERED**', '--key=-'), rc=0 >2019-02-26 17:06:32,368+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/pki/ovirt-engine/keys/engine_id_rsa'' >2019-02-26 17:06:32,369+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/pki/ovirt-engine/keys/engine_id_rsa' exists >2019-02-26 17:06:32,369+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/pki/ovirt-engine/keys/engine_id_rsa' already has content >2019-02-26 17:06:32,369+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.executeRaw:813 execute: ('/usr/share/ovirt-engine/bin/pki-pkcs12-extract.sh', '--name=engine', '--passin=**FILTERED**', '--cert=-'), executable='None', cwd='None', env=None >2019-02-26 17:06:32,382+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.executeRaw:863 execute-result: ('/usr/share/ovirt-engine/bin/pki-pkcs12-extract.sh', '--name=engine', '--passin=**FILTERED**', '--cert=-'), rc=0 >2019-02-26 17:06:32,383+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.execute:921 execute-output: ('/usr/share/ovirt-engine/bin/pki-pkcs12-extract.sh', '--name=engine', '--passin=**FILTERED**', '--cert=-') stdout: >Bag Attributes > localKeyID: 4E D1 ED 65 E3 BB C3 88 18 A3 C8 84 A0 CF 4F 21 DC 16 D4 CE >subject=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com >issuer=/C=US/O=demospace.televic.com/CN=gb60kf2.democustomer.televic.com.80269 >-----BEGIN CERTIFICATE----- >MIIE5jCCA86gAwIBAgICEAEwDQYJKoZIhvcNAQELBQAwXjELMAkGA1UEBhMCVVMx >HjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxldmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtm >Mi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb20uODAyNjkwHhcNMTkwMjI1MTU0MzQ2 >WhcNMjQwMTMxMTU0MzQ2WjBYMQswCQYDVQQGEwJVUzEeMBwGA1UECgwVZGVtb3Nw >YWNlLnRlbGV2aWMuY29tMSkwJwYDVQQDDCBnYjYwa2YyLmRlbW9jdXN0b21lci50 >ZWxldmljLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMIscfo+ >smYK8wVC3ghU8TmKXBwonLqm+R1FahvaYIz0lCUiIFkdaWIKjDmlhWkDq/eYQNdt >Ta7OQP3YNCQH0XookGusYaJJRpxqwNnj4VJUms9BebmLCu3gbm+9k6YD0m2LBz+N >r81tXOs7JUdiT1U/TeOyeX/f+o2rXII0ecSnHup4T7dg93NCErhItScHwdo2uNMb >ufD+k5H9PrL+PprIiLIqbIxMPyFFQzUtIYDscRk1dIF3B+VGg5y2/l3kWj0uIEKt >c9NCZkRrZ+FbMBOR79kpiYAwf4Mnzoy13ozv7b2KVUj8Te5T7QyruWZp9yd0F6tD >K8MwM+S1XKRvxsECAwEAAaOCAbIwggGuMB0GA1UdDgQWBBT9rZZL7uOuZfyjrSHg >LEXSxOIWTzCBlwYIKwYBBQUHAQEEgYowgYcwgYQGCCsGAQUFBzAChnhodHRwOi8v >Z2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5jb206ODAvb3ZpcnQtZW5naW5l >L3NlcnZpY2VzL3BraS1yZXNvdXJjZT9yZXNvdXJjZT1jYS1jZXJ0aWZpY2F0ZSZm >b3JtYXQ9WDUwOS1QRU0tQ0EwgYgGA1UdIwSBgDB+gBSci9HQj9/0YKiGbLZ6LGKu >EqwcZqFipGAwXjELMAkGA1UEBhMCVVMxHjAcBgNVBAoMFWRlbW9zcGFjZS50ZWxl >dmljLmNvbTEvMC0GA1UEAwwmZ2I2MGtmMi5kZW1vY3VzdG9tZXIudGVsZXZpYy5j >b20uODAyNjmCAhAAMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgWgMCAGA1UdJQEB >/wQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjArBgNVHREEJDAigiBnYjYwa2YyLmRl >bW9jdXN0b21lci50ZWxldmljLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAPGYHXTqV >1qFQLGfDh12VlAWHk4U159LGQV2cX2YgaWZxfDwWkOqLjUCQ9JTZoE8cuo+Ql6Bj >dKJBlSNlLE8t2d52luh2wcdR1Auph9EI5iLPD/tKuLug1tVJcuvaTaADNHEIOR6m >b6Qv1+nbHsDGgwyAunWP3oUgZLMcH2MaCEblix/3Sa2Q7eANjnzJny4UHH90k52y >opczG/P2rOB0IIAhGImvjcCotN9b7DstSNzXHEJ+xm5KGh19ThgMhK80G+mRw+dW >6ezgC77vxOlIrPLIW6EPmF08YgVljO0aecpbqKBPk+SR22FVEOGaii+Yyxf2R98s >FIxZoK6WPVzifg== >-----END CERTIFICATE----- > >2019-02-26 17:06:32,383+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.execute:926 execute-output: ('/usr/share/ovirt-engine/bin/pki-pkcs12-extract.sh', '--name=engine', '--passin=**FILTERED**', '--cert=-') stderr: >MAC verified OK > >2019-02-26 17:06:32,383+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.execute:903 execute-input: ('/usr/bin/ssh-keygen', '-i', '-m', 'PKCS8', '-f', '/proc/self/fd/0') stdin: >-----BEGIN PUBLIC KEY----- >MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwixx+j6yZgrzBULeCFTx >OYpcHCicuqb5HUVqG9pgjPSUJSIgWR1pYgqMOaWFaQOr95hA121Nrs5A/dg0JAfR >eiiQa6xhoklGnGrA2ePhUlSaz0F5uYsK7eBub72TpgPSbYsHP42vzW1c6zslR2JP >VT9N47J5f9/6jatcgjR5xKce6nhPt2D3c0ISuEi1JwfB2ja40xu58P6Tkf0+sv4+ >msiIsipsjEw/IUVDNS0hgOxxGTV0gXcH5UaDnLb+XeRaPS4gQq1z00JmRGtn4Vsw >E5Hv2SmJgDB/gyfOjLXejO/tvYpVSPxN7lPtDKu5Zmn3J3QXq0MrwzAz5LVcpG/G >wQIDAQAB >-----END PUBLIC KEY----- > > >2019-02-26 17:06:32,383+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.executeRaw:813 execute: ('/usr/bin/ssh-keygen', '-i', '-m', 'PKCS8', '-f', '/proc/self/fd/0'), executable='None', cwd='None', env=None >2019-02-26 17:06:32,392+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.executeRaw:863 execute-result: ('/usr/bin/ssh-keygen', '-i', '-m', 'PKCS8', '-f', '/proc/self/fd/0'), rc=0 >2019-02-26 17:06:32,392+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.execute:921 execute-output: ('/usr/bin/ssh-keygen', '-i', '-m', 'PKCS8', '-f', '/proc/self/fd/0') stdout: >ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCLHH6PrJmCvMFQt4IVPE5ilwcKJy6pvkdRWob2mCM9JQlIiBZHWliCow5pYVpA6v3mEDXbU2uzkD92DQkB9F6KJBrrGGiSUacasDZ4+FSVJrPQXm5iwrt4G5vvZOmA9Jtiwc/ja/NbVzrOyVHYk9VP03jsnl/3/qNq1yCNHnEpx7qeE+3YPdzQhK4SLUnB8HaNrjTG7nw/pOR/T6y/j6ayIiyKmyMTD8hRUM1LSGA7HEZNXSBdwflRoOctv5d5Fo9LiBCrXPTQmZEa2fhWzATke/ZKYmAMH+DJ86Mtd6M7+29ilVI/E3uU+0Mq7lmafcndBerQyvDMDPktVykb8bB > >2019-02-26 17:06:32,392+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.execute:926 execute-output: ('/usr/bin/ssh-keygen', '-i', '-m', 'PKCS8', '-f', '/proc/self/fd/0') stderr: > > >2019-02-26 17:06:32,394+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:32,394+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/sshPublicKey=unicode:'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCLHH6PrJmCvMFQt4IVPE5ilwcKJy6pvkdRWob2mCM9JQlIiBZHWliCow5pYVpA6v3mEDXbU2uzkD92DQkB9F6KJBrrGGiSUacasDZ4+FSVJrPQXm5iwrt4G5vvZOmA9Jtiwc/ja/NbVzrOyVHYk9VP03jsnl/3/qNq1yCNHnEpx7qeE+3YPdzQhK4SLUnB8HaNrjTG7nw/pOR/T6y/j6ayIiyKmyMTD8hRUM1LSGA7HEZNXSBdwflRoOctv5d5Fo9LiBCrXPTQmZEa2fhWzATke/ZKYmAMH+DJ86Mtd6M7+29ilVI/E3uU+0Mq7lmafcndBerQyvDMDPktVykb8bB' >2019-02-26 17:06:32,394+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:32,395+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._misc >2019-02-26 17:06:32,396+0100 INFO otopi.ovirt_engine_setup.engine_common.database database.backup:750 Backing up database localhost:ovirt_engine_history to '/var/lib/ovirt-engine-dwh/backups/dwh-20190226170632.bDYpzp.dump'. >2019-02-26 17:06:32,396+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema plugin.executePipeRaw:481 executePipeRaw: [0] popen kw={'stdin': None, 'stdout': -1, 'preexec_fn': <function _enableSignals at 0x7f1fdf2e0b18>, 'env': {'PGPASSWORD': '', 'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'PGPASSFILE': '/tmp/tmpGEZX1y', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'}, 'close_fds': True, 'args': ['/opt/rh/rh-postgresql10/root/usr/bin/pg_dump', '-E', 'UTF8', '--disable-dollar-quoting', '--disable-triggers', '-U', 'ovirt_engine_history', '-h', 'localhost', '-p', '5432', '--format=custom', '--file=/var/lib/ovirt-engine-dwh/backups/dwh-20190226170632.bDYpzp.dump', 'ovirt_engine_history'], 'stderr': -1} >2019-02-26 17:06:32,401+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema plugin.executePipeRaw:486 executePipeRaw: [0] pid pid=26767 >2019-02-26 17:06:32,952+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema plugin.executePipeRaw:603 executePipe-result: [0] ['/opt/rh/rh-postgresql10/root/usr/bin/pg_dump', '-E', 'UTF8', '--disable-dollar-quoting', '--disable-triggers', '-U', 'ovirt_engine_history', '-h', 'localhost', '-p', '5432', '--format=custom', '--file=/var/lib/ovirt-engine-dwh/backups/dwh-20190226170632.bDYpzp.dump', 'ovirt_engine_history'], rc=0 >2019-02-26 17:06:32,952+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.backup:798 db backup res {'result': [{'stderr': '', 'rc': 0}], 'stdout': ''} >2019-02-26 17:06:32,953+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'DWH schema Transaction' >2019-02-26 17:06:32,953+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema schema._misc:339 Creating/refreshing DWH database schema >2019-02-26 17:06:32,953+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema plugin.executeRaw:813 execute: ['/usr/share/ovirt-engine-dwh/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'ovirt_engine_history', '-d', 'ovirt_engine_history', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'], executable='None', cwd='None', env={'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'DBFUNC_DB_PGPASSFILE': '/tmp/tmpGEZX1y', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'} >********* QUERY ********** >select 1; >************************** > > 1 > >********* QUERY ********** >copy ( > select count(*) as count > from pg_catalog.pg_tables > where > tablename = 'schema_version' and > schemaname = 'public' > ) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >select 3020000; >************************** > > 3020000 > >********* QUERY ********** >Create or replace FUNCTION fn_db_add_column(v_table varchar(128), v_column varchar(128), v_column_def text) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (not exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_drop_column(v_table varchar(128), v_column varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > EXECUTE v_sql; > end; > end if; >end;$procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_change_column_type(v_table varchar(128), v_column varchar(128), > v_type varchar(128), v_new_type varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column and (udt_name ilike v_type or data_type ilike v_type))) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_rename_column(v_table varchar(128), v_column varchar(128), v_new_name varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_config_value(v_option_name varchar(100), v_option_value varchar(4000), > v_version varchar(40)) >returns void >AS $procedure$ >begin > if (not exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_option_value, v_version); > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_value_all_versions(v_option_name varchar(100)) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name)) then > begin > delete from vdc_options where option_name ilike v_option_name; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_value(v_option_name varchar(100), v_version text) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version in (select ID from fnSplitter(v_version)))) then > begin > delete from vdc_options where option_name ilike v_option_name and version in (select ID from fnSplitter(v_version)); > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_for_version(v_version text) >returns void >AS $procedure$ >BEGIN > delete from vdc_options where version in (select ID from fnSplitter(v_version)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_update_config_value(v_option_name varchar(100), v_option_value varchar(4000), > v_version varchar(40)) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and version = v_version; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_update_default_config_value(v_option_name varchar(100),v_default_option_value varchar(4000),v_option_value varchar(4000),v_version varchar(40),v_ignore_default_value_case boolean) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > if (v_ignore_default_value_case) > then > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and option_value ilike v_default_option_value and version = v_version; > else > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and option_value = v_default_option_value and version = v_version; > end if; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_rename_config_key(v_old_option_name varchar(100),v_new_option_name varchar(100),v_version varchar(40)) >returns void >AS $procedure$ >DECLARE > v_current_option_value varchar(4000); >begin > if (exists (select 1 from vdc_options where option_name ilike v_old_option_name and version = v_version)) then > v_current_option_value:=option_value from vdc_options where option_name ilike v_old_option_name and version = v_version; > update vdc_options set option_name = v_new_option_name, option_value = v_current_option_value > where option_name ilike v_old_option_name and version = v_version; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_create_constraint ( > v_table varchar(128), v_constraint varchar(128), v_constraint_sql text) >returns void >AS $procedure$ >begin > if NOT EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_drop_constraint ( > v_table varchar(128), v_constraint varchar(128)) >returns void >AS $procedure$ >begin > if EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION attach_user_to_su_role(v_permission_id uuid) > RETURNS void AS >$procedure$ > DECLARE > v_user_entry VARCHAR(255); > v_user_id UUID; > v_name VARCHAR(255); > v_domain VARCHAR(255); > v_user_name VARCHAR(255); > > v_document VARCHAR(64); > v_index INTEGER; >BEGIN > > select option_value INTO v_user_entry from vdc_options where option_name = 'AdUserId'; > select option_value INTO v_name from vdc_options where option_name = 'AdUserName'; > select option_value INTO v_domain from vdc_options where option_name = 'DomainName'; > > v_index := POSITION(':' IN v_user_entry); > if ( v_index <> 0 ) then > v_user_entry := substring( v_user_entry from v_index + 1 ); > v_user_id := CAST( v_user_entry AS uuid ); > end if; > > v_index := POSITION(':' IN v_name); > if ( v_index <> 0 ) then > v_name := substring( v_name from v_index + 1 ); > end if; > >-- find if name already includes domain (@) > v_index := POSITION('@' IN v_name); > > if (v_index = 0) then > v_user_name := coalesce(v_name,'') || '@' || coalesce(v_domain,''); > else > v_user_name := v_name; > end if; > > >insert into users(user_id,name,domain,username,groups,status) select v_user_id, v_name, v_domain, v_user_name,'',1 where not exists (select user_id,name,domain,username,groups,status from users where user_id = v_user_id and name = v_name and domain = v_domain and username = v_user_name and groups = '' and status = 1); > >insert into permissions(id,role_id,ad_element_id,object_id,object_type_id) select v_permission_id, '00000000-0000-0000-0000-000000000001', v_user_id, getGlobalIds('system'), 1 where not exists(select role_id,ad_element_id,object_id,object_type_id from permissions where role_id = '00000000-0000-0000-0000-000000000001' and ad_element_id = v_user_id and object_id= getGlobalIds('system') and object_type_id = 1); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION CheckDBConnection() RETURNS SETOF integer IMMUTABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_functions_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' from pg_proc inner join pg_namespace ns on (pg_proc.pronamespace=ns.oid) where ns.nspname = 'public' and proname not ilike 'uuid%' order by proname; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_views_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP VIEW if exists ' || table_name || ' CASCADE;' from information_schema.views where table_schema = 'public' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_tables_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP TABLE if exists ' || table_name || ' CASCADE;' from information_schema.tables where table_schema = 'public' and table_type = 'BASE TABLE' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_seq_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP SEQUENCE if exists ' || sequence_name || ' CASCADE;' from information_schema.sequences where sequence_schema = 'public' order by sequence_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_user_types_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, pg_class c, pg_type t > WHERE n.oid = c.relnamespace and t.typrelid = c.oid and c.relkind = 'c'::"char" and > n.nspname = 'public' > ORDER BY c.relname::information_schema.sql_identifier; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_get_column_size( v_table varchar(64), v_column varchar(64)) returns integer STABLE > AS $procedure$ > declare > retvalue integer; >BEGIN > retvalue := character_maximum_length from information_schema.columns > where > table_name ilike v_table and column_name ilike v_column and > table_schema = 'public' and udt_name in ('char','varchar'); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION attach_user_to_su_role(v_permission_id uuid, v_user_id VARCHAR(255), v_name VARCHAR(255), v_domain VARCHAR(255)) > RETURNS void AS >$BODY$ > DECLARE > v_user_name VARCHAR(255); > v_document VARCHAR(64); > v_index INTEGER; > input_uuid uuid; >BEGIN > input_uuid = CAST( v_user_id AS uuid ); >-- find if name already includes domain (@) > v_index := POSITION('@' IN v_name); > > if (v_index = 0) then > v_user_name := coalesce(v_name,'') || '@' || coalesce(v_domain,''); > else > v_user_name := v_name; > end if; > > >insert into users(user_id,name,domain,username,groups,status) select input_uuid, v_name, v_domain, v_user_name,'',1 where not exists (select user_id,name,domain,username,groups,status from users where user_id = input_uuid); > >insert into permissions(id,role_id,ad_element_id,object_id,object_type_id) select v_permission_id, '00000000-0000-0000-0000-000000000001', input_uuid, getGlobalIds('system'), 1 where not exists(select role_id,ad_element_id,object_id,object_type_id from permissions where role_id = '00000000-0000-0000-0000-000000000001' and ad_element_id = input_uuid and object_id= getGlobalIds('system') and object_type_id = 1); >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_action_group_to_role(v_role_id UUID, v_action_group_id INTEGER) >RETURNS VOID >AS $procedure$ >BEGIN > INSERT INTO roles_groups(role_id,action_group_id) > SELECT v_role_id, v_action_group_id > WHERE NOT EXISTS (SELECT 1 > FROM roles_groups > WHERE role_id = v_role_id > AND action_group_id = v_action_group_id); >RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_split_config_value(v_option_name character varying, v_old_option_value character varying, v_new_option_value character varying, v_update_from_version character varying) > RETURNS void AS >$BODY$ >declare >v_old_value varchar(4000); >v_cur cursor for select distinct version from vdc_options where version <> 'general' order by version; >v_version varchar(40); >v_index integer; >v_count integer; >v_total_count integer; >v_version_count integer; >begin > v_total_count := count(version) from vdc_options where option_name = v_option_name; > v_old_value := option_value from vdc_options where option_name = v_option_name and version = 'general'; > v_version_count := count(distinct version) from vdc_options where version <> 'general'; > if (v_total_count <= v_version_count) then > begin > if (v_old_value IS NULL) then > v_old_value := v_old_option_value; > end if; > v_count := count(distinct version) from vdc_options where version <> 'general'; > v_index := 1; > open v_cur; > loop > fetch v_cur into v_version; > exit when not found; > -- We shouldn't update if already exists > if (not exists (select 1 from vdc_options where option_name = v_option_name and version = v_version)) then > -- Might not work well for versions such as 3.10, but we currently don't have any > if (v_version >= v_update_from_version) then > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_new_option_value, v_version); > else > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_old_value, v_version); > end if; > end if; > v_index := v_index +1; > end loop; > close v_cur; > delete from vdc_options where option_name = v_option_name and version = 'general'; > end; > end if; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_grant_action_group_to_all_roles_filter(v_action_group_id integer, uuid[]) > RETURNS void AS >$BODY$ >declare >v_role_id_to_filter alias for $2; >begin > insert into roles_groups (role_id, action_group_id) > select distinct role_id, v_action_group_id > from roles_groups rg > where not ARRAY [role_id] <@ v_role_id_to_filter and not exists (select 1 from roles_groups where role_id = rg.role_id and action_group_id = v_action_group_id); >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object(v_object regclass) RETURNS setof record as >$BODY$ >DECLARE > v_sql TEXT; > v_table record; > v_table_name TEXT; > temprec record; >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > select c.relname, n.nspname INTO v_table > FROM pg_class c join pg_namespace n on c.relnamespace = n.oid WHERE c.oid = v_object; > -- try to get filtered query syntax from previous execution > if exists (select 1 from object_column_white_list_sql where object_name = v_table.relname) then > select sql into v_sql from object_column_white_list_sql where object_name = v_table.relname; > else > v_table_name := quote_ident( v_table.nspname ) || '.' || quote_ident( v_table.relname ); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > for temprec in select a.attname, t.typname > FROM pg_attribute a join pg_type t on a.atttypid = t.oid > WHERE a.attrelid = v_object AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum > loop > v_sql := coalesce( v_sql || ', ', 'SELECT ' ); > if exists(select 1 from object_column_white_list > where object_name = v_table.relname and column_name = temprec.attname) then > v_sql := v_sql || quote_ident( temprec.attname ); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident( temprec.typname ) || ' as ' || quote_ident( temprec.attname ); > END IF; > END LOOP; > v_sql := v_sql || ' FROM ' || v_table_name; > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > -- save generated query for further use > insert into object_column_white_list_sql(object_name,sql) values (v_table.relname, v_sql); > end if; > RETURN QUERY EXECUTE v_sql; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_column_to_object_white_list(v_object_name varchar(128), v_column_name varchar(128)) >returns void >AS $procedure$ >begin > if (not exists (select 1 from object_column_white_list > where object_name = v_object_name and column_name = v_column_name)) then > begin > -- verify that there is such object in db > if exists (select 1 from information_schema.columns > where table_name = v_object_name and column_name = v_column_name) then > insert into object_column_white_list (object_name, column_name) values (v_object_name, v_column_name); > end if; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_disk(v_id UUID) >returns void >AS $procedure$ >declare > OK integer; > LOCKED integer; >begin > OK:=1; > LOCKED:=2; > update images set imagestatus = OK where imagestatus = LOCKED and > image_group_id in (select device_id from vm_device where device_id = v_id and is_plugged); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_snapshot(v_id UUID) >returns void >AS $procedure$ >declare > OK varchar; > LOCKED varchar; >begin > OK:='OK'; > LOCKED:='LOCKED'; > update snapshots set status = OK where status = LOCKED and snapshot_id = v_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_entity(v_object_type varchar(10), v_name varchar(255), v_recursive boolean) >returns void >AS $procedure$ >declare > DOWN integer; > OK integer; > LOCKED integer; > TEMPLATE_OK integer; > TEMPLATE_LOCKED integer; > IMAGE_LOCKED integer; > SNAPSHOT_OK varchar; > SNAPSHOT_LOCKED varchar; > v_id UUID; >begin > DOWN:=0; > OK:=1; > LOCKED:=2; > TEMPLATE_OK:=0; > TEMPLATE_LOCKED:=1; > IMAGE_LOCKED:=15; > SNAPSHOT_OK:='OK'; > SNAPSHOT_LOCKED:='LOCKED'; > v_id := vm_guid from vm_static where vm_name = v_name and entity_type ilike v_object_type; > -- set VM status to DOWN > if (v_object_type = 'vm') then > update vm_dynamic set status = DOWN where status = IMAGE_LOCKED and vm_guid = v_id; > -- set Template status to OK > else > if (v_object_type = 'template') then > update vm_static set template_status = TEMPLATE_OK where template_status = TEMPLATE_LOCKED and vm_guid = v_id; > end if; > end if; > --unlock images and snapshots if recursive flag is set > if (v_recursive) then > update images set imagestatus = OK where imagestatus = LOCKED and > image_group_id in (select device_id from vm_device where vm_id = v_id and is_plugged); > > update snapshots set status = SNAPSHOT_OK where status ilike SNAPSHOT_LOCKED and vm_id = v_id; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/* Displays DC id , DC name, SPM Host id , SPM Host name and number of async tasks awaiting. > >1) create a record type with DC name, DC id, SPM host id, SPM host name, count > >2) get all distinct DC ids from async_tasks table > >3) Run a cursor for each result in 2) > > a) get DC name > b) get SPM Host id & name if available > c) get count of tasks > > return current record > >4) return set of generated records >*/ >DROP TYPE IF EXISTS async_tasks_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE async_tasks_info_rs AS ( > dc_id UUID, dc_name CHARACTER VARYING, spm_host_id UUID, spm_host_name CHARACTER VARYING, task_count integer); >************************** > >CREATE TYPE >********* QUERY ********** >create or replace FUNCTION fn_db_get_async_tasks() >returns SETOF async_tasks_info_rs STABLE >AS $procedure$ >DECLARE > v_record async_tasks_info_rs; > > -- selects storage_pool_id uuid found in async_tasks > v_tasks_cursor cursor for select distinct storage_pool_id from async_tasks; >begin > > OPEN v_tasks_cursor; > FETCH v_tasks_cursor into v_record.dc_id; > WHILE FOUND LOOP > -- get dc_name and SPM Host id > v_record.dc_name := name from storage_pool where id = v_record.dc_id; > v_record.spm_host_id := > spm_vds_id from storage_pool where id = v_record.dc_id; > -- get Host name if we have non NULL SPM Host > if (v_record.spm_host_id IS NOT NULL) then > v_record.spm_host_name := > vds_name from vds_static where vds_id = v_record.spm_host_id; > else > v_record.spm_host_name:=''; > end if; > -- get tasks count for this DC > v_record.task_count := count(*) from async_tasks > where position (cast(v_record.dc_id as varchar) in action_parameters) > 0; > -- return the record > RETURN NEXT v_record; > FETCH v_tasks_cursor into v_record.dc_id; > END LOOP; > CLOSE v_tasks_cursor; > -- return full set of generated records > RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >select * from generate_drop_all_views_syntax(); >************************** > > DROP VIEW if exists v3_6_configuration_history_clusters CASCADE; > DROP VIEW if exists v3_6_configuration_history_datacenters CASCADE; > DROP VIEW if exists v3_6_configuration_history_hosts CASCADE; > DROP VIEW if exists v3_6_configuration_history_hosts_interfaces CASCADE; > DROP VIEW if exists v3_6_configuration_history_storage_domains CASCADE; > DROP VIEW if exists v3_6_configuration_history_vms CASCADE; > DROP VIEW if exists v3_6_configuration_history_vms_devices CASCADE; > DROP VIEW if exists v3_6_configuration_history_vms_disks CASCADE; > DROP VIEW if exists v3_6_configuration_history_vms_interfaces CASCADE; > DROP VIEW if exists v3_6_enum_translator CASCADE; > DROP VIEW if exists v3_6_latest_configuration_clusters CASCADE; > DROP VIEW if exists v3_6_latest_configuration_datacenters CASCADE; > DROP VIEW if exists v3_6_latest_configuration_hosts CASCADE; > DROP VIEW if exists v3_6_latest_configuration_hosts_interfaces CASCADE; > DROP VIEW if exists v3_6_latest_configuration_storage_domains CASCADE; > DROP VIEW if exists v3_6_latest_configuration_vms CASCADE; > DROP VIEW if exists v3_6_latest_configuration_vms_devices CASCADE; > DROP VIEW if exists v3_6_latest_configuration_vms_disks CASCADE; > DROP VIEW if exists v3_6_latest_configuration_vms_interfaces CASCADE; > DROP VIEW if exists v3_6_latest_map_datacenters_storage_domains CASCADE; > DROP VIEW if exists v3_6_latest_tags_details CASCADE; > DROP VIEW if exists v3_6_latest_tags_relations CASCADE; > DROP VIEW if exists v3_6_latest_users_details CASCADE; > DROP VIEW if exists v3_6_map_history_datacenters_storage_domains CASCADE; > DROP VIEW if exists v3_6_statistics_datacenters_resources_usage_daily CASCADE; > DROP VIEW if exists v3_6_statistics_datacenters_resources_usage_hourly CASCADE; > DROP VIEW if exists v3_6_statistics_datacenters_resources_usage_samples CASCADE; > DROP VIEW if exists v3_6_statistics_hosts_interfaces_resources_usage_daily CASCADE; > DROP VIEW if exists v3_6_statistics_hosts_interfaces_resources_usage_hourly CASCADE; > DROP VIEW if exists v3_6_statistics_hosts_interfaces_resources_usage_samples CASCADE; > DROP VIEW if exists v3_6_statistics_hosts_resources_usage_daily CASCADE; > DROP VIEW if exists v3_6_statistics_hosts_resources_usage_hourly CASCADE; > DROP VIEW if exists v3_6_statistics_hosts_resources_usage_samples CASCADE; > DROP VIEW if exists v3_6_statistics_storage_domains_resources_usage_daily CASCADE; > DROP VIEW if exists v3_6_statistics_storage_domains_resources_usage_hourly CASCADE; > DROP VIEW if exists v3_6_statistics_storage_domains_resources_usage_samples CASCADE; > DROP VIEW if exists v3_6_statistics_vms_disks_resources_usage_daily CASCADE; > DROP VIEW if exists v3_6_statistics_vms_disks_resources_usage_hourly CASCADE; > DROP VIEW if exists v3_6_statistics_vms_disks_resources_usage_samples CASCADE; > DROP VIEW if exists v3_6_statistics_vms_interfaces_resources_usage_daily CASCADE; > DROP VIEW if exists v3_6_statistics_vms_interfaces_resources_usage_hourly CASCADE; > DROP VIEW if exists v3_6_statistics_vms_interfaces_resources_usage_samples CASCADE; > DROP VIEW if exists v3_6_statistics_vms_resources_usage_daily CASCADE; > DROP VIEW if exists v3_6_statistics_vms_resources_usage_hourly CASCADE; > DROP VIEW if exists v3_6_statistics_vms_resources_usage_samples CASCADE; > DROP VIEW if exists v3_6_statistics_vms_users_usage_daily CASCADE; > DROP VIEW if exists v3_6_statistics_vms_users_usage_hourly CASCADE; > DROP VIEW if exists v3_6_tags_details_history CASCADE; > DROP VIEW if exists v3_6_tags_relations_history CASCADE; > DROP VIEW if exists v3_6_users_details_history CASCADE; > DROP VIEW if exists v4_0_configuration_history_clusters CASCADE; > DROP VIEW if exists v4_0_configuration_history_datacenters CASCADE; > DROP VIEW if exists v4_0_configuration_history_hosts CASCADE; > DROP VIEW if exists v4_0_configuration_history_hosts_interfaces CASCADE; > DROP VIEW if exists v4_0_configuration_history_storage_domains CASCADE; > DROP VIEW if exists v4_0_configuration_history_vms CASCADE; > DROP VIEW if exists v4_0_configuration_history_vms_devices CASCADE; > DROP VIEW if exists v4_0_configuration_history_vms_disks CASCADE; > DROP VIEW if exists v4_0_configuration_history_vms_interfaces CASCADE; > DROP VIEW if exists v4_0_enum_translator CASCADE; > DROP VIEW if exists v4_0_fully_joined_statistics_hosts_resources_usage_daily CASCADE; > DROP VIEW if exists v4_0_fully_joined_statistics_hosts_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_0_fully_joined_statistics_hosts_resources_usage_samples CASCADE; > DROP VIEW if exists v4_0_fully_joined_statistics_vms_resources_usage_daily CASCADE; > DROP VIEW if exists v4_0_fully_joined_statistics_vms_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_0_fully_joined_statistics_vms_resources_usage_samples CASCADE; > DROP VIEW if exists v4_0_latest_configuration_clusters CASCADE; > DROP VIEW if exists v4_0_latest_configuration_datacenters CASCADE; > DROP VIEW if exists v4_0_latest_configuration_hosts CASCADE; > DROP VIEW if exists v4_0_latest_configuration_hosts_interfaces CASCADE; > DROP VIEW if exists v4_0_latest_configuration_storage_domains CASCADE; > DROP VIEW if exists v4_0_latest_configuration_vms CASCADE; > DROP VIEW if exists v4_0_latest_configuration_vms_devices CASCADE; > DROP VIEW if exists v4_0_latest_configuration_vms_disks CASCADE; > DROP VIEW if exists v4_0_latest_configuration_vms_interfaces CASCADE; > DROP VIEW if exists v4_0_latest_map_datacenters_storage_domains CASCADE; > DROP VIEW if exists v4_0_latest_tags_details CASCADE; > DROP VIEW if exists v4_0_latest_tags_relations CASCADE; > DROP VIEW if exists v4_0_latest_users_details CASCADE; > DROP VIEW if exists v4_0_map_history_datacenters_storage_domains CASCADE; > DROP VIEW if exists v4_0_statistics_hosts_interfaces_resources_usage_daily CASCADE; > DROP VIEW if exists v4_0_statistics_hosts_interfaces_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_0_statistics_hosts_interfaces_resources_usage_samples CASCADE; > DROP VIEW if exists v4_0_statistics_hosts_resources_usage_daily CASCADE; > DROP VIEW if exists v4_0_statistics_hosts_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_0_statistics_hosts_resources_usage_samples CASCADE; > DROP VIEW if exists v4_0_statistics_storage_domains_resources_usage_daily CASCADE; > DROP VIEW if exists v4_0_statistics_storage_domains_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_0_statistics_storage_domains_resources_usage_samples CASCADE; > DROP VIEW if exists v4_0_statistics_vms_disks_resources_usage_daily CASCADE; > DROP VIEW if exists v4_0_statistics_vms_disks_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_0_statistics_vms_disks_resources_usage_samples CASCADE; > DROP VIEW if exists v4_0_statistics_vms_interfaces_resources_usage_daily CASCADE; > DROP VIEW if exists v4_0_statistics_vms_interfaces_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_0_statistics_vms_interfaces_resources_usage_samples CASCADE; > DROP VIEW if exists v4_0_statistics_vms_resources_usage_daily CASCADE; > DROP VIEW if exists v4_0_statistics_vms_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_0_statistics_vms_resources_usage_samples CASCADE; > DROP VIEW if exists v4_0_statistics_vms_users_usage_daily CASCADE; > DROP VIEW if exists v4_0_statistics_vms_users_usage_hourly CASCADE; > DROP VIEW if exists v4_0_tags_details_history CASCADE; > DROP VIEW if exists v4_0_tags_relations_history CASCADE; > DROP VIEW if exists v4_0_users_details_history CASCADE; > DROP VIEW if exists v4_1_configuration_history_clusters CASCADE; > DROP VIEW if exists v4_1_configuration_history_datacenters CASCADE; > DROP VIEW if exists v4_1_configuration_history_hosts CASCADE; > DROP VIEW if exists v4_1_configuration_history_hosts_interfaces CASCADE; > DROP VIEW if exists v4_1_configuration_history_storage_domains CASCADE; > DROP VIEW if exists v4_1_configuration_history_vms CASCADE; > DROP VIEW if exists v4_1_configuration_history_vms_devices CASCADE; > DROP VIEW if exists v4_1_configuration_history_vms_disks CASCADE; > DROP VIEW if exists v4_1_configuration_history_vms_interfaces CASCADE; > DROP VIEW if exists v4_1_enum_translator CASCADE; > DROP VIEW if exists v4_1_fully_joined_statistics_hosts_resources_usage_daily CASCADE; > DROP VIEW if exists v4_1_fully_joined_statistics_hosts_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_1_fully_joined_statistics_hosts_resources_usage_samples CASCADE; > DROP VIEW if exists v4_1_fully_joined_statistics_vms_resources_usage_daily CASCADE; > DROP VIEW if exists v4_1_fully_joined_statistics_vms_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_1_fully_joined_statistics_vms_resources_usage_samples CASCADE; > DROP VIEW if exists v4_1_latest_configuration_clusters CASCADE; > DROP VIEW if exists v4_1_latest_configuration_datacenters CASCADE; > DROP VIEW if exists v4_1_latest_configuration_hosts CASCADE; > DROP VIEW if exists v4_1_latest_configuration_hosts_interfaces CASCADE; > DROP VIEW if exists v4_1_latest_configuration_storage_domains CASCADE; > DROP VIEW if exists v4_1_latest_configuration_vms CASCADE; > DROP VIEW if exists v4_1_latest_configuration_vms_devices CASCADE; > DROP VIEW if exists v4_1_latest_configuration_vms_disks CASCADE; > DROP VIEW if exists v4_1_latest_configuration_vms_interfaces CASCADE; > DROP VIEW if exists v4_1_latest_map_datacenters_storage_domains CASCADE; > DROP VIEW if exists v4_1_latest_tags_details CASCADE; > DROP VIEW if exists v4_1_latest_tags_relations CASCADE; > DROP VIEW if exists v4_1_latest_users_details CASCADE; > DROP VIEW if exists v4_1_map_history_datacenters_storage_domains CASCADE; > DROP VIEW if exists v4_1_statistics_hosts_interfaces_resources_usage_daily CASCADE; > DROP VIEW if exists v4_1_statistics_hosts_interfaces_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_1_statistics_hosts_interfaces_resources_usage_samples CASCADE; > DROP VIEW if exists v4_1_statistics_hosts_resources_usage_daily CASCADE; > DROP VIEW if exists v4_1_statistics_hosts_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_1_statistics_hosts_resources_usage_samples CASCADE; > DROP VIEW if exists v4_1_statistics_storage_domains_resources_usage_daily CASCADE; > DROP VIEW if exists v4_1_statistics_storage_domains_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_1_statistics_storage_domains_resources_usage_samples CASCADE; > DROP VIEW if exists v4_1_statistics_vms_disks_resources_usage_daily CASCADE; > DROP VIEW if exists v4_1_statistics_vms_disks_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_1_statistics_vms_disks_resources_usage_samples CASCADE; > DROP VIEW if exists v4_1_statistics_vms_interfaces_resources_usage_daily CASCADE; > DROP VIEW if exists v4_1_statistics_vms_interfaces_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_1_statistics_vms_interfaces_resources_usage_samples CASCADE; > DROP VIEW if exists v4_1_statistics_vms_resources_usage_daily CASCADE; > DROP VIEW if exists v4_1_statistics_vms_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_1_statistics_vms_resources_usage_samples CASCADE; > DROP VIEW if exists v4_1_statistics_vms_users_usage_daily CASCADE; > DROP VIEW if exists v4_1_statistics_vms_users_usage_hourly CASCADE; > DROP VIEW if exists v4_1_tags_details_history CASCADE; > DROP VIEW if exists v4_1_tags_relations_history CASCADE; > DROP VIEW if exists v4_1_users_details_history CASCADE; > DROP VIEW if exists v4_2_configuration_history_clusters CASCADE; > DROP VIEW if exists v4_2_configuration_history_datacenters CASCADE; > DROP VIEW if exists v4_2_configuration_history_hosts CASCADE; > DROP VIEW if exists v4_2_configuration_history_hosts_interfaces CASCADE; > DROP VIEW if exists v4_2_configuration_history_storage_domains CASCADE; > DROP VIEW if exists v4_2_configuration_history_vms CASCADE; > DROP VIEW if exists v4_2_configuration_history_vms_devices CASCADE; > DROP VIEW if exists v4_2_configuration_history_vms_disks CASCADE; > DROP VIEW if exists v4_2_configuration_history_vms_interfaces CASCADE; > DROP VIEW if exists v4_2_enum_translator CASCADE; > DROP VIEW if exists v4_2_fully_joined_statistics_hosts_resources_usage_daily CASCADE; > DROP VIEW if exists v4_2_fully_joined_statistics_hosts_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_2_fully_joined_statistics_hosts_resources_usage_samples CASCADE; > DROP VIEW if exists v4_2_fully_joined_statistics_vms_resources_usage_daily CASCADE; > DROP VIEW if exists v4_2_fully_joined_statistics_vms_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_2_fully_joined_statistics_vms_resources_usage_samples CASCADE; > DROP VIEW if exists v4_2_latest_configuration_clusters CASCADE; > DROP VIEW if exists v4_2_latest_configuration_datacenters CASCADE; > DROP VIEW if exists v4_2_latest_configuration_hosts CASCADE; > DROP VIEW if exists v4_2_latest_configuration_hosts_interfaces CASCADE; > DROP VIEW if exists v4_2_latest_configuration_storage_domains CASCADE; > DROP VIEW if exists v4_2_latest_configuration_vms CASCADE; > DROP VIEW if exists v4_2_latest_configuration_vms_devices CASCADE; > DROP VIEW if exists v4_2_latest_configuration_vms_disks CASCADE; > DROP VIEW if exists v4_2_latest_configuration_vms_interfaces CASCADE; > DROP VIEW if exists v4_2_latest_map_datacenters_storage_domains CASCADE; > DROP VIEW if exists v4_2_latest_tags_details CASCADE; > DROP VIEW if exists v4_2_latest_tags_relations CASCADE; > DROP VIEW if exists v4_2_latest_users_details CASCADE; > DROP VIEW if exists v4_2_map_history_datacenters_storage_domains CASCADE; > DROP VIEW if exists v4_2_statistics_hosts_interfaces_resources_usage_daily CASCADE; > DROP VIEW if exists v4_2_statistics_hosts_interfaces_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_2_statistics_hosts_interfaces_resources_usage_samples CASCADE; > DROP VIEW if exists v4_2_statistics_hosts_resources_usage_daily CASCADE; > DROP VIEW if exists v4_2_statistics_hosts_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_2_statistics_hosts_resources_usage_samples CASCADE; > DROP VIEW if exists v4_2_statistics_storage_domains_resources_usage_daily CASCADE; > DROP VIEW if exists v4_2_statistics_storage_domains_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_2_statistics_storage_domains_resources_usage_samples CASCADE; > DROP VIEW if exists v4_2_statistics_vms_disks_resources_usage_daily CASCADE; > DROP VIEW if exists v4_2_statistics_vms_disks_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_2_statistics_vms_disks_resources_usage_samples CASCADE; > DROP VIEW if exists v4_2_statistics_vms_interfaces_resources_usage_daily CASCADE; > DROP VIEW if exists v4_2_statistics_vms_interfaces_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_2_statistics_vms_interfaces_resources_usage_samples CASCADE; > DROP VIEW if exists v4_2_statistics_vms_resources_usage_daily CASCADE; > DROP VIEW if exists v4_2_statistics_vms_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_2_statistics_vms_resources_usage_samples CASCADE; > DROP VIEW if exists v4_2_statistics_vms_users_usage_daily CASCADE; > DROP VIEW if exists v4_2_statistics_vms_users_usage_hourly CASCADE; > DROP VIEW if exists v4_2_tags_details_history CASCADE; > DROP VIEW if exists v4_2_tags_relations_history CASCADE; > DROP VIEW if exists v4_2_users_details_history CASCADE; > DROP VIEW if exists v4_3_configuration_history_clusters CASCADE; > DROP VIEW if exists v4_3_configuration_history_datacenters CASCADE; > DROP VIEW if exists v4_3_configuration_history_hosts CASCADE; > DROP VIEW if exists v4_3_configuration_history_hosts_interfaces CASCADE; > DROP VIEW if exists v4_3_configuration_history_storage_domains CASCADE; > DROP VIEW if exists v4_3_configuration_history_vms CASCADE; > DROP VIEW if exists v4_3_configuration_history_vms_devices CASCADE; > DROP VIEW if exists v4_3_configuration_history_vms_disks CASCADE; > DROP VIEW if exists v4_3_configuration_history_vms_interfaces CASCADE; > DROP VIEW if exists v4_3_enum_translator CASCADE; > DROP VIEW if exists v4_3_fully_joined_statistics_hosts_resources_usage_daily CASCADE; > DROP VIEW if exists v4_3_fully_joined_statistics_hosts_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_3_fully_joined_statistics_hosts_resources_usage_samples CASCADE; > DROP VIEW if exists v4_3_fully_joined_statistics_vms_resources_usage_daily CASCADE; > DROP VIEW if exists v4_3_fully_joined_statistics_vms_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_3_fully_joined_statistics_vms_resources_usage_samples CASCADE; > DROP VIEW if exists v4_********* QUERY ********** >DROP VIEW if exists v3_6_configuration_history_clusters CASCADE; >************************** > >3_latest_configuration_clusters CASCADE; > DROP VIEW if exists v4_3_latest_configuration_datacenters CASCADE; > DROP VIEW if exists v4_3_latest_configuration_hosts CASCADE; > DROP VIEW if exists v4_3_latest_configuration_hosts_interfaces CASCADE; > DROP VIEW if exists v4_3_latest_configuration_storage_domains CASCADE; > DROP VIEW if exists v4_3_latest_configuration_vms CASCADE; > DROP VIEW if exists v4_3_latest_configuration_vms_devices CASCADE; > DROP VIEW if exists v4_3_latest_configuration_vms_disks CASCADE; > DROP VIEW if exists v4_3_latest_configuration_vms_interfaces CASCADE; > DROP VIEW if exists v4_3_latest_map_datacenters_storage_domains CASCADE; > DROP VIEW if exists v4_3_latest_tags_details CASCADE; > DROP VIEW if exists v4_3_latest_tags_relations CASCADE; > DROP VIEW if exists v4_3_latest_users_details CASCADE; > DROP VIEW if exists v4_3_map_history_datacenters_storage_domains CASCADE; > DROP VIEW if exists v4_3_statistics_hosts_interfaces_resources_usage_daily CASCADE; > DROP VIEW if exists v4_3_statistics_hosts_interfaces_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_3_statistics_hosts_interfaces_resources_usage_samples CASCADE; > DROP VIEW if exists v4_3_statistics_hosts_resources_usage_daily CASCADE; > DROP VIEW if exists v4_3_statistics_hosts_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_3_statistics_hosts_resources_usage_samples CASCADE; > DROP VIEW if exists v4_3_statistics_storage_domains_resources_usage_daily CASCADE; > DROP VIEW if exists v4_3_statistics_storage_domains_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_3_statistics_storage_domains_resources_usage_samples CASCADE; > DROP VIEW if exists v4_3_statistics_vms_disks_resources_usage_daily CASCADE; > DROP VIEW if exists v4_3_statistics_vms_disks_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_3_statistics_vms_disks_resources_usage_samples CASCADE; > DROP VIEW if exists v4_3_statistics_vms_interfaces_resources_usage_daily CASCADE; > DROP VIEW if exists v4_3_statistics_vms_interfaces_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_3_statistics_vms_interfaces_resources_usage_samples CASCADE; > DROP VIEW if exists v4_3_statistics_vms_resources_usage_daily CASCADE; > DROP VIEW if exists v4_3_statistics_vms_resources_usage_hourly CASCADE; > DROP VIEW if exists v4_3_statistics_vms_resources_usage_samples CASCADE; > DROP VIEW if exists v4_3_statistics_vms_users_usage_daily CASCADE; > DROP VIEW if exists v4_3_statistics_vms_users_usage_hourly CASCADE; > DROP VIEW if exists v4_3_tags_details_history CASCADE; > DROP VIEW if exists v4_3_tags_relations_history CASCADE; > DROP VIEW if exists v4_3_users_details_history CASCADE; > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_configuration_history_datacenters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_configuration_history_hosts CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_configuration_history_hosts_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_configuration_history_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_configuration_history_vms CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_configuration_history_vms_devices CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_configuration_history_vms_disks CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_configuration_history_vms_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_enum_translator CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_configuration_clusters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_configuration_datacenters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_configuration_hosts CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_configuration_hosts_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_configuration_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_configuration_vms CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_configuration_vms_devices CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_configuration_vms_disks CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_configuration_vms_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_map_datacenters_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_tags_details CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_tags_relations CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_latest_users_details CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_map_history_datacenters_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_datacenters_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_datacenters_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_datacenters_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_hosts_interfaces_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_hosts_interfaces_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_hosts_interfaces_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_hosts_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_hosts_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_hosts_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_storage_domains_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_storage_domains_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_storage_domains_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_vms_disks_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_vms_disks_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_vms_disks_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_vms_interfaces_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_vms_interfaces_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_vms_interfaces_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_vms_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_vms_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_vms_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_vms_users_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_statistics_vms_users_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_tags_details_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_tags_relations_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v3_6_users_details_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_configuration_history_clusters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_configuration_history_datacenters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_configuration_history_hosts CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_configuration_history_hosts_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_configuration_history_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_configuration_history_vms CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_configuration_history_vms_devices CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_configuration_history_vms_disks CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_configuration_history_vms_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_enum_translator CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_fully_joined_statistics_hosts_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_fully_joined_statistics_hosts_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_fully_joined_statistics_hosts_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_fully_joined_statistics_vms_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_fully_joined_statistics_vms_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_fully_joined_statistics_vms_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_configuration_clusters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_configuration_datacenters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_configuration_hosts CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_configuration_hosts_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_configuration_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_configuration_vms CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_configuration_vms_devices CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_configuration_vms_disks CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_configuration_vms_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_map_datacenters_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_tags_details CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_tags_relations CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_latest_users_details CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_map_history_datacenters_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_hosts_interfaces_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_hosts_interfaces_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_hosts_interfaces_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_hosts_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_hosts_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_hosts_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_storage_domains_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_storage_domains_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_storage_domains_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_vms_disks_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_vms_disks_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_vms_disks_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_vms_interfaces_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_vms_interfaces_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_vms_interfaces_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_vms_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_vms_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_vms_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_vms_users_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_statistics_vms_users_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_tags_details_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_tags_relations_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_0_users_details_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_configuration_history_clusters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_configuration_history_datacenters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_configuration_history_hosts CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_configuration_history_hosts_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_configuration_history_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_configuration_history_vms CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_configuration_history_vms_devices CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_configuration_history_vms_disks CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_configuration_history_vms_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_enum_translator CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_fully_joined_statistics_hosts_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_fully_joined_statistics_hosts_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_fully_joined_statistics_hosts_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_fully_joined_statistics_vms_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_fully_joined_statistics_vms_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_fully_joined_statistics_vms_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_configuration_clusters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_configuration_datacenters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_configuration_hosts CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_configuration_hosts_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_configuration_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_configuration_vms CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_configuration_vms_devices CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_configuration_vms_disks CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_configuration_vms_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_map_datacenters_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_tags_details CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_tags_relations CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_latest_users_details CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_map_history_datacenters_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_hosts_interfaces_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_hosts_interfaces_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_hosts_interfaces_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_hosts_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_hosts_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_hosts_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_storage_domains_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_storage_domains_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_storage_domains_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_vms_disks_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_vms_disks_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_vms_disks_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_vms_interfaces_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_vms_interfaces_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_vms_interfaces_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_vms_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_vms_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_vms_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_vms_users_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_statistics_vms_users_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_tags_details_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_tags_relations_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_1_users_details_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_configuration_history_clusters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_configuration_history_datacenters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_configuration_history_hosts CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_configuration_history_hosts_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_configuration_history_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_configuration_history_vms CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_configuration_history_vms_devices CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_configuration_history_vms_disks CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_configuration_history_vms_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_enum_translator CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_fully_joined_statistics_hosts_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_fully_joined_statistics_hosts_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_fully_joined_statistics_hosts_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_fully_joined_statistics_vms_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_fully_joined_statistics_vms_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_fully_joined_statistics_vms_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_configuration_clusters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_configuration_datacenters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_configuration_hosts CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_configuration_hosts_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_configuration_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_configuration_vms CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_configuration_vms_devices CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_configuration_vms_disks CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_configuration_vms_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_map_datacenters_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_tags_details CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_tags_relations CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_latest_users_details CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_map_history_datacenters_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_hosts_interfaces_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_hosts_interfaces_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_hosts_interfaces_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_hosts_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_hosts_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_hosts_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_storage_domains_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_storage_domains_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_storage_domains_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_vms_disks_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_vms_disks_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_vms_disks_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_vms_interfaces_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_vms_interfaces_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_vms_interfaces_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_vms_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_vms_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_vms_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_vms_users_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_statistics_vms_users_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_tags_details_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_tags_relations_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_2_users_details_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_configuration_history_clusters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_configuration_history_datacenters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_configuration_history_hosts CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_configuration_history_hosts_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_configuration_history_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_configuration_history_vms CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_configuration_history_vms_devices CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_configuration_history_vms_disks CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_configuration_history_vms_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_enum_translator CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_fully_joined_statistics_hosts_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_fully_joined_statistics_hosts_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_fully_joined_statistics_hosts_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_fully_joined_statistics_vms_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_fully_joined_statistics_vms_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_fully_joined_statistics_vms_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_configuration_clusters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_configuration_datacenters CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_configuration_hosts CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_configuration_hosts_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_configuration_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_configuration_vms CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_configuration_vms_devices CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_configuration_vms_disks CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_configuration_vms_interfaces CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_map_datacenters_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_tags_details CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_tags_relations CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_latest_users_details CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_map_history_datacenters_storage_domains CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_hosts_interfaces_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_hosts_interfaces_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_hosts_interfaces_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_hosts_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_hosts_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_hosts_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_storage_domains_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_storage_domains_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_storage_domains_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_vms_disks_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_vms_disks_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_vms_disks_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_vms_interfaces_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_vms_interfaces_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_vms_interfaces_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_vms_resources_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_vms_resources_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_vms_resources_usage_samples CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_vms_users_usage_daily CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_statistics_vms_users_usage_hourly CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_tags_details_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_tags_relations_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >DROP VIEW if exists v4_3_users_details_history CASCADE; >************************** > >DROP VIEW >********* QUERY ********** >Create or replace FUNCTION fn_db_add_column(v_table varchar(128), v_column varchar(128), v_column_def text) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (not exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_drop_column(v_table varchar(128), v_column varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > EXECUTE v_sql; > end; > end if; >end;$procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_change_column_type(v_table varchar(128), v_column varchar(128), > v_type varchar(128), v_new_type varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column and (udt_name ilike v_type or data_type ilike v_type))) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_rename_column(v_table varchar(128), v_column varchar(128), v_new_name varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_config_value(v_option_name varchar(100), v_option_value varchar(4000), > v_version varchar(40)) >returns void >AS $procedure$ >begin > if (not exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_option_value, v_version); > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_value_all_versions(v_option_name varchar(100)) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name)) then > begin > delete from vdc_options where option_name ilike v_option_name; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_value(v_option_name varchar(100), v_version text) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version in (select ID from fnSplitter(v_version)))) then > begin > delete from vdc_options where option_name ilike v_option_name and version in (select ID from fnSplitter(v_version)); > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_for_version(v_version text) >returns void >AS $procedure$ >BEGIN > delete from vdc_options where version in (select ID from fnSplitter(v_version)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_update_config_value(v_option_name varchar(100), v_option_value varchar(4000), > v_version varchar(40)) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and version = v_version; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_update_default_config_value(v_option_name varchar(100),v_default_option_value varchar(4000),v_option_value varchar(4000),v_version varchar(40),v_ignore_default_value_case boolean) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > if (v_ignore_default_value_case) > then > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and option_value ilike v_default_option_value and version = v_version; > else > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and option_value = v_default_option_value and version = v_version; > end if; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_rename_config_key(v_old_option_name varchar(100),v_new_option_name varchar(100),v_version varchar(40)) >returns void >AS $procedure$ >DECLARE > v_current_option_value varchar(4000); >begin > if (exists (select 1 from vdc_options where option_name ilike v_old_option_name and version = v_version)) then > v_current_option_value:=option_value from vdc_options where option_name ilike v_old_option_name and version = v_version; > update vdc_options set option_name = v_new_option_name, option_value = v_current_option_value > where option_name ilike v_old_option_name and version = v_version; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_create_constraint ( > v_table varchar(128), v_constraint varchar(128), v_constraint_sql text) >returns void >AS $procedure$ >begin > if NOT EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_drop_constraint ( > v_table varchar(128), v_constraint varchar(128)) >returns void >AS $procedure$ >begin > if EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION attach_user_to_su_role(v_permission_id uuid) > RETURNS void AS >$procedure$ > DECLARE > v_user_entry VARCHAR(255); > v_user_id UUID; > v_name VARCHAR(255); > v_domain VARCHAR(255); > v_user_name VARCHAR(255); > > v_document VARCHAR(64); > v_index INTEGER; >BEGIN > > select option_value INTO v_user_entry from vdc_options where option_name = 'AdUserId'; > select option_value INTO v_name from vdc_options where option_name = 'AdUserName'; > select option_value INTO v_domain from vdc_options where option_name = 'DomainName'; > > v_index := POSITION(':' IN v_user_entry); > if ( v_index <> 0 ) then > v_user_entry := substring( v_user_entry from v_index + 1 ); > v_user_id := CAST( v_user_entry AS uuid ); > end if; > > v_index := POSITION(':' IN v_name); > if ( v_index <> 0 ) then > v_name := substring( v_name from v_index + 1 ); > end if; > >-- find if name already includes domain (@) > v_index := POSITION('@' IN v_name); > > if (v_index = 0) then > v_user_name := coalesce(v_name,'') || '@' || coalesce(v_domain,''); > else > v_user_name := v_name; > end if; > > >insert into users(user_id,name,domain,username,groups,status) select v_user_id, v_name, v_domain, v_user_name,'',1 where not exists (select user_id,name,domain,username,groups,status from users where user_id = v_user_id and name = v_name and domain = v_domain and username = v_user_name and groups = '' and status = 1); > >insert into permissions(id,role_id,ad_element_id,object_id,object_type_id) select v_permission_id, '00000000-0000-0000-0000-000000000001', v_user_id, getGlobalIds('system'), 1 where not exists(select role_id,ad_element_id,object_id,object_type_id from permissions where role_id = '00000000-0000-0000-0000-000000000001' and ad_element_id = v_user_id and object_id= getGlobalIds('system') and object_type_id = 1); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION CheckDBConnection() RETURNS SETOF integer IMMUTABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_functions_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' from pg_proc inner join pg_namespace ns on (pg_proc.pronamespace=ns.oid) where ns.nspname = 'public' and proname not ilike 'uuid%' order by proname; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_views_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP VIEW if exists ' || table_name || ' CASCADE;' from information_schema.views where table_schema = 'public' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_tables_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP TABLE if exists ' || table_name || ' CASCADE;' from information_schema.tables where table_schema = 'public' and table_type = 'BASE TABLE' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_seq_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP SEQUENCE if exists ' || sequence_name || ' CASCADE;' from information_schema.sequences where sequence_schema = 'public' order by sequence_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_user_types_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, pg_class c, pg_type t > WHERE n.oid = c.relnamespace and t.typrelid = c.oid and c.relkind = 'c'::"char" and > n.nspname = 'public' > ORDER BY c.relname::information_schema.sql_identifier; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_get_column_size( v_table varchar(64), v_column varchar(64)) returns integer STABLE > AS $procedure$ > declare > retvalue integer; >BEGIN > retvalue := character_maximum_length from information_schema.columns > where > table_name ilike v_table and column_name ilike v_column and > table_schema = 'public' and udt_name in ('char','varchar'); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION attach_user_to_su_role(v_permission_id uuid, v_user_id VARCHAR(255), v_name VARCHAR(255), v_domain VARCHAR(255)) > RETURNS void AS >$BODY$ > DECLARE > v_user_name VARCHAR(255); > v_document VARCHAR(64); > v_index INTEGER; > input_uuid uuid; >BEGIN > input_uuid = CAST( v_user_id AS uuid ); >-- find if name already includes domain (@) > v_index := POSITION('@' IN v_name); > > if (v_index = 0) then > v_user_name := coalesce(v_name,'') || '@' || coalesce(v_domain,''); > else > v_user_name := v_name; > end if; > > >insert into users(user_id,name,domain,username,groups,status) select input_uuid, v_name, v_domain, v_user_name,'',1 where not exists (select user_id,name,domain,username,groups,status from users where user_id = input_uuid); > >insert into permissions(id,role_id,ad_element_id,object_id,object_type_id) select v_permission_id, '00000000-0000-0000-0000-000000000001', input_uuid, getGlobalIds('system'), 1 where not exists(select role_id,ad_element_id,object_id,object_type_id from permissions where role_id = '00000000-0000-0000-0000-000000000001' and ad_element_id = input_uuid and object_id= getGlobalIds('system') and object_type_id = 1); >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_action_group_to_role(v_role_id UUID, v_action_group_id INTEGER) >RETURNS VOID >AS $procedure$ >BEGIN > INSERT INTO roles_groups(role_id,action_group_id) > SELECT v_role_id, v_action_group_id > WHERE NOT EXISTS (SELECT 1 > FROM roles_groups > WHERE role_id = v_role_id > AND action_group_id = v_action_group_id); >RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_split_config_value(v_option_name character varying, v_old_option_value character varying, v_new_option_value character varying, v_update_from_version character varying) > RETURNS void AS >$BODY$ >declare >v_old_value varchar(4000); >v_cur cursor for select distinct version from vdc_options where version <> 'general' order by version; >v_version varchar(40); >v_index integer; >v_count integer; >v_total_count integer; >v_version_count integer; >begin > v_total_count := count(version) from vdc_options where option_name = v_option_name; > v_old_value := option_value from vdc_options where option_name = v_option_name and version = 'general'; > v_version_count := count(distinct version) from vdc_options where version <> 'general'; > if (v_total_count <= v_version_count) then > begin > if (v_old_value IS NULL) then > v_old_value := v_old_option_value; > end if; > v_count := count(distinct version) from vdc_options where version <> 'general'; > v_index := 1; > open v_cur; > loop > fetch v_cur into v_version; > exit when not found; > -- We shouldn't update if already exists > if (not exists (select 1 from vdc_options where option_name = v_option_name and version = v_version)) then > -- Might not work well for versions such as 3.10, but we currently don't have any > if (v_version >= v_update_from_version) then > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_new_option_value, v_version); > else > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_old_value, v_version); > end if; > end if; > v_index := v_index +1; > end loop; > close v_cur; > delete from vdc_options where option_name = v_option_name and version = 'general'; > end; > end if; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_grant_action_group_to_all_roles_filter(v_action_group_id integer, uuid[]) > RETURNS void AS >$BODY$ >declare >v_role_id_to_filter alias for $2; >begin > insert into roles_groups (role_id, action_group_id) > select distinct role_id, v_action_group_id > from roles_groups rg > where not ARRAY [role_id] <@ v_role_id_to_filter and not exists (select 1 from roles_groups where role_id = rg.role_id and action_group_id = v_action_group_id); >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object(v_object regclass) RETURNS setof record as >$BODY$ >DECLARE > v_sql TEXT; > v_table record; > v_table_name TEXT; > temprec record; >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > select c.relname, n.nspname INTO v_table > FROM pg_class c join pg_namespace n on c.relnamespace = n.oid WHERE c.oid = v_object; > -- try to get filtered query syntax from previous execution > if exists (select 1 from object_column_white_list_sql where object_name = v_table.relname) then > select sql into v_sql from object_column_white_list_sql where object_name = v_table.relname; > else > v_table_name := quote_ident( v_table.nspname ) || '.' || quote_ident( v_table.relname ); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > for temprec in select a.attname, t.typname > FROM pg_attribute a join pg_type t on a.atttypid = t.oid > WHERE a.attrelid = v_object AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum > loop > v_sql := coalesce( v_sql || ', ', 'SELECT ' ); > if exists(select 1 from object_column_white_list > where object_name = v_table.relname and column_name = temprec.attname) then > v_sql := v_sql || quote_ident( temprec.attname ); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident( temprec.typname ) || ' as ' || quote_ident( temprec.attname ); > END IF; > END LOOP; > v_sql := v_sql || ' FROM ' || v_table_name; > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > -- save generated query for further use > insert into object_column_white_list_sql(object_name,sql) values (v_table.relname, v_sql); > end if; > RETURN QUERY EXECUTE v_sql; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_column_to_object_white_list(v_object_name varchar(128), v_column_name varchar(128)) >returns void >AS $procedure$ >begin > if (not exists (select 1 from object_column_white_list > where object_name = v_object_name and column_name = v_column_name)) then > begin > -- verify that there is such object in db > if exists (select 1 from information_schema.columns > where table_name = v_object_name and column_name = v_column_name) then > insert into object_column_white_list (object_name, column_name) values (v_object_name, v_column_name); > end if; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_disk(v_id UUID) >returns void >AS $procedure$ >declare > OK integer; > LOCKED integer; >begin > OK:=1; > LOCKED:=2; > update images set imagestatus = OK where imagestatus = LOCKED and > image_group_id in (select device_id from vm_device where device_id = v_id and is_plugged); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_snapshot(v_id UUID) >returns void >AS $procedure$ >declare > OK varchar; > LOCKED varchar; >begin > OK:='OK'; > LOCKED:='LOCKED'; > update snapshots set status = OK where status = LOCKED and snapshot_id = v_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_entity(v_object_type varchar(10), v_name varchar(255), v_recursive boolean) >returns void >AS $procedure$ >declare > DOWN integer; > OK integer; > LOCKED integer; > TEMPLATE_OK integer; > TEMPLATE_LOCKED integer; > IMAGE_LOCKED integer; > SNAPSHOT_OK varchar; > SNAPSHOT_LOCKED varchar; > v_id UUID; >begin > DOWN:=0; > OK:=1; > LOCKED:=2; > TEMPLATE_OK:=0; > TEMPLATE_LOCKED:=1; > IMAGE_LOCKED:=15; > SNAPSHOT_OK:='OK'; > SNAPSHOT_LOCKED:='LOCKED'; > v_id := vm_guid from vm_static where vm_name = v_name and entity_type ilike v_object_type; > -- set VM status to DOWN > if (v_object_type = 'vm') then > update vm_dynamic set status = DOWN where status = IMAGE_LOCKED and vm_guid = v_id; > -- set Template status to OK > else > if (v_object_type = 'template') then > update vm_static set template_status = TEMPLATE_OK where template_status = TEMPLATE_LOCKED and vm_guid = v_id; > end if; > end if; > --unlock images and snapshots if recursive flag is set > if (v_recursive) then > update images set imagestatus = OK where imagestatus = LOCKED and > image_group_id in (select device_id from vm_device where vm_id = v_id and is_plugged); > > update snapshots set status = SNAPSHOT_OK where status ilike SNAPSHOT_LOCKED and vm_id = v_id; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/* Displays DC id , DC name, SPM Host id , SPM Host name and number of async tasks awaiting. > >1) create a record type with DC name, DC id, SPM host id, SPM host name, count > >2) get all distinct DC ids from async_tasks table > >3) Run a cursor for each result in 2) > > a) get DC name > b) get SPM Host id & name if available > c) get count of tasks > > return current record > >4) return set of generated records >*/ >DROP TYPE IF EXISTS async_tasks_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE async_tasks_info_rs AS ( > dc_id UUID, dc_name CHARACTER VARYING, spm_host_id UUID, spm_host_name CHARACTER VARYING, task_count integer); >************************** > >CREATE TYPE >********* QUERY ********** >create or replace FUNCTION fn_db_get_async_tasks() >returns SETOF async_tasks_info_rs STABLE >AS $procedure$ >DECLARE > v_record async_tasks_info_rs; > > -- selects storage_pool_id uuid found in async_tasks > v_tasks_cursor cursor for select distinct storage_pool_id from async_tasks; >begin > > OPEN v_tasks_cursor; > FETCH v_tasks_cursor into v_record.dc_id; > WHILE FOUND LOOP > -- get dc_name and SPM Host id > v_record.dc_name := name from storage_pool where id = v_record.dc_id; > v_record.spm_host_id := > spm_vds_id from storage_pool where id = v_record.dc_id; > -- get Host name if we have non NULL SPM Host > if (v_record.spm_host_id IS NOT NULL) then > v_record.spm_host_name := > vds_name from vds_static where vds_id = v_record.spm_host_id; > else > v_record.spm_host_name:=''; > end if; > -- get tasks count for this DC > v_record.task_count := count(*) from async_tasks > where position (cast(v_record.dc_id as varchar) in action_parameters) > 0; > -- return the record > RETURN NEXT v_record; > FETCH v_tasks_cursor into v_record.dc_id; > END LOOP; > CLOSE v_tasks_cursor; > -- return full set of generated records > RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >select * from generate_drop_all_functions_syntax(); >************************** > > drop function if exists public.attach_user_to_su_role(uuid, character varying, character varying, character varying) cascade; > drop function if exists public.attach_user_to_su_role(uuid) cascade; > drop function if exists public.checkdbconnection() cascade; > drop function if exists public.fn_db_add_action_group_to_role(uuid, integer) cascade; > drop function if exists public.fn_db_add_column(character varying, character varying, text) cascade; > drop function if exists public.fn_db_add_column_to_object_white_list(character varying, character varying) cascade; > drop function if exists public.fn_db_add_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_change_column_type(character varying, character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_create_constraint(character varying, character varying, text) cascade; > drop function if exists public.fn_db_delete_config_for_version(text) cascade; > drop function if exists public.fn_db_delete_config_value(character varying, text) cascade; > drop function if exists public.fn_db_delete_config_value_all_versions(character varying) cascade; > drop function if exists public.fn_db_drop_column(character varying, character varying) cascade; > drop function if exists public.fn_db_drop_constraint(character varying, character varying) cascade; > drop function if exists public.fn_db_get_async_tasks() cascade; > drop function if exists public.fn_db_grant_action_group_to_all_roles_filter(integer, uuid[]) cascade; > drop function if exists public.fn_db_mask_object(regclass) cascade; > drop function if exists public.fn_db_rename_column(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_rename_config_key(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_split_config_value(character varying, character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_unlock_disk(uuid) cascade; > drop function if exists public.fn_db_unlock_entity(character varying, character varying, boolean) cascade; > drop function if exists public.fn_db_unlock_snapshot(uuid) cascade; > drop function if exists public.fn_db_update_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_update_default_config_value(character varying, character varying, character varying, character varying, boolean) cascade; > drop function if exists public.fn_get_column_size(character varying, character varying) cascade; > drop function if exists public.generate_drop_all_functions_syntax() cascade; > drop function if exists public.generate_drop_all_seq_syntax() cascade; > drop function if exists public.generate_drop_all_tables_syntax() cascade; > drop function if exists public.generate_drop_all_user_types_syntax() cascade; > drop function if exists public.generate_drop_all_views_syntax() cascade; > drop function if exists public.getpathids(uuid, integer) cascade; > drop function if exists public.getpathinnames(integer) cascade; > drop function if exists public.update_enum_translator(character varying, smallint, character varying, text) cascade; > drop function if exists public.update_tags_path_child(timestamp with time zone) cascade; > >********* QUERY ********** > drop function if exists public.attach_user_to_su_role(uuid, character varying, character varying, character varying) cascade; > drop function if exists public.attach_user_to_su_role(uuid) cascade; > drop function if exists public.checkdbconnection() cascade; > drop function if exists public.fn_db_add_action_group_to_role(uuid, integer) cascade; > drop function if exists public.fn_db_add_column(character varying, character varying, text) cascade; > drop function if exists public.fn_db_add_column_to_object_white_list(character varying, character varying) cascade; > drop function if exists public.fn_db_add_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_change_column_type(character varying, character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_create_constraint(character varying, character varying, text) cascade; > drop function if exists public.fn_db_delete_config_for_version(text) cascade; > drop function if exists public.fn_db_delete_config_value(character varying, text) cascade; > drop function if exists public.fn_db_delete_config_value_all_versions(character varying) cascade; > drop function if exists public.fn_db_drop_column(character varying, character varying) cascade; > drop function if exists public.fn_db_drop_constraint(character varying, character varying) cascade; > drop function if exists public.fn_db_get_async_tasks() cascade; > drop function if exists public.fn_db_grant_action_group_to_all_roles_filter(integer, uuid[]) cascade; > drop function if exists public.fn_db_mask_object(regclass) cascade; > drop function if exists public.fn_db_rename_column(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_rename_config_key(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_split_config_value(character varying, character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_unlock_disk(uuid) cascade; > drop function if exists public.fn_db_unlock_entity(character varying, character varying, boolean) cascade; > drop function if exists public.fn_db_unlock_snapshot(uuid) cascade; > drop function if exists public.fn_db_update_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_update_default_config_value(character varying, character varying, character varying, character varying, boolean) cascade; > drop function if exists public.fn_get_column_size(character varying, character varying) cascade; > drop function if exists public.generate_drop_all_functions_syntax() cascade; > drop function if exists public.generate_drop_all_seq_syntax() cascade; > drop function if exists public.generate_drop_all_tables_syntax() cascade; > drop function if exists public.generate_drop_all_user_types_syntax() cascade; > drop function if exists public.generate_drop_all_views_syntax() cascade; > drop function if exists public.getpathids(uuid, integer) cascade; > drop function if exists public.getpathinnames(integer) cascade; > drop function if exists public.update_enum_translator(character varying, smallint, character varying, text) cascade; > drop function if exists public.update_tags_path_child(timestamp with time zone) cascade; >************************** > >DROP FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPathInNames(tagHistoryID int) >RETURNS VARCHAR(4000) > AS $function$ > DECLARE > v_id UUID; > v_path_names VARCHAR(4000); > SWV_path VARCHAR(4000); >BEGIN > SELECT tag_path into SWV_path FROM tag_details WHERE history_id = tagHistoryID; > v_path_names := '/root'; > IF (SWV_path IS NULL or SWV_path = '') THEN > RETURN SWV_path; > ELSEIF (SWV_path = '/00000000-0000-0000-0000-000000000000') THEN > RETURN v_path_names; > ELSE > SWV_path := SUBSTR(SWV_path,38); > WHILE (LENGTH(SWV_path) > 0) LOOP > v_id := cast(SUBSTR(SWV_path,2,36) as UUID); > SWV_path := SUBSTR(SWV_path,38); > SELECT v_path_names || '/' || tag_name INTO v_path_names FROM tag_details where tag_id = v_id; > END LOOP; > end if; > RETURN v_path_names; >END; $function$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPathIDs(currentTagID UUID, runNumber int default 0) >RETURNS VARCHAR(4000) > AS $function$ > DECLARE > ParentID UUID; >BEGIN > IF currentTagID IS NULL then > RETURN NULL; > end if; > select parent_id INTO ParentID FROM tag_relations_history WHERE entity_id = currentTagID and history_id in (SELECT max(a.history_id) > FROM tag_relations_history a > WHERE a.entity_id = currentTagID); > IF runNumber = 0 then > RETURN coalesce(GetPathIDs(ParentID, runNumber + 1),'/'); > ELSE > RETURN coalesce(GetPathIDs(ParentID, runNumber + 1) || '/' ,'/') || currentTagID; > end if; >END; $function$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION update_tags_path_child(thisUpdate TIMESTAMP WITH TIME ZONE) >RETURNS VOID AS $procedure$ >BEGIN > /*This inserts all children of the changed nodes with their new path*/ > Insert into tag_details(tag_id, > tag_name, > tag_description, > tag_path, > tag_level, > create_date, > update_date) > select distinct a.tag_id, > a.tag_name, > a.tag_description, > c.new_child_path || SUBSTR(a.tag_path,LENGTH(b.old_child_path) + 1), > LENGTH(c.new_child_path || SUBSTR(a.tag_path,LENGTH(b.old_child_path) + 1)) - LENGTH(REPLACE((c.new_child_path || SUBSTR(a.tag_path,LENGTH(b.old_child_path) + 1)),'/','')), > a.create_date, > thisUpdate > FROM tag_details a, > (select e.tag_path || '/' || CAST(e.tag_id AS VARCHAR(36)) as old_child_path, e.tag_id as parent /*36 is the uuid length*/ > from tag_details e > where e.history_id in (SELECT max(f.history_id) > FROM tag_details f > WHERE (f.update_date < thisUpdate or f.update_date IS NULL) > GROUP BY f.tag_id) > AND e.delete_date IS NULL) b, > (select tag_path || '/' || CAST(tag_id AS VARCHAR(36)) as new_child_path, tag_id as parent /*36 is the uuid length*/ > from tag_details > where update_date = thisUpdate > and delete_date IS NULL) c > Where a.tag_path like b.old_child_path || '%' and > b.parent = c.parent and > not exists (SELECT z.tag_id, z.tag_path FROM tag_details as z WHERE tag_id = a.tag_id and z.tag_path = c.new_child_path || SUBSTR(a.tag_path,LENGTH(b.old_child_path) + 1)); > RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_add_column(v_table varchar(128), v_column varchar(128), v_column_def text) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (not exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_drop_column(v_table varchar(128), v_column varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > EXECUTE v_sql; > end; > end if; >end;$procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_change_column_type(v_table varchar(128), v_column varchar(128), > v_type varchar(128), v_new_type varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column and (udt_name ilike v_type or data_type ilike v_type))) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_rename_column(v_table varchar(128), v_column varchar(128), v_new_name varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_config_value(v_option_name varchar(100), v_option_value varchar(4000), > v_version varchar(40)) >returns void >AS $procedure$ >begin > if (not exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_option_value, v_version); > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_value_all_versions(v_option_name varchar(100)) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name)) then > begin > delete from vdc_options where option_name ilike v_option_name; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_value(v_option_name varchar(100), v_version text) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version in (select ID from fnSplitter(v_version)))) then > begin > delete from vdc_options where option_name ilike v_option_name and version in (select ID from fnSplitter(v_version)); > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_for_version(v_version text) >returns void >AS $procedure$ >BEGIN > delete from vdc_options where version in (select ID from fnSplitter(v_version)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_update_config_value(v_option_name varchar(100), v_option_value varchar(4000), > v_version varchar(40)) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and version = v_version; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_update_default_config_value(v_option_name varchar(100),v_default_option_value varchar(4000),v_option_value varchar(4000),v_version varchar(40),v_ignore_default_value_case boolean) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > if (v_ignore_default_value_case) > then > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and option_value ilike v_default_option_value and version = v_version; > else > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and option_value = v_default_option_value and version = v_version; > end if; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_rename_config_key(v_old_option_name varchar(100),v_new_option_name varchar(100),v_version varchar(40)) >returns void >AS $procedure$ >DECLARE > v_current_option_value varchar(4000); >begin > if (exists (select 1 from vdc_options where option_name ilike v_old_option_name and version = v_version)) then > v_current_option_value:=option_value from vdc_options where option_name ilike v_old_option_name and version = v_version; > update vdc_options set option_name = v_new_option_name, option_value = v_current_option_value > where option_name ilike v_old_option_name and version = v_version; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_create_constraint ( > v_table varchar(128), v_constraint varchar(128), v_constraint_sql text) >returns void >AS $procedure$ >begin > if NOT EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_drop_constraint ( > v_table varchar(128), v_constraint varchar(128)) >returns void >AS $procedure$ >begin > if EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION attach_user_to_su_role(v_permission_id uuid) > RETURNS void AS >$procedure$ > DECLARE > v_user_entry VARCHAR(255); > v_user_id UUID; > v_name VARCHAR(255); > v_domain VARCHAR(255); > v_user_name VARCHAR(255); > > v_document VARCHAR(64); > v_index INTEGER; >BEGIN > > select option_value INTO v_user_entry from vdc_options where option_name = 'AdUserId'; > select option_value INTO v_name from vdc_options where option_name = 'AdUserName'; > select option_value INTO v_domain from vdc_options where option_name = 'DomainName'; > > v_index := POSITION(':' IN v_user_entry); > if ( v_index <> 0 ) then > v_user_entry := substring( v_user_entry from v_index + 1 ); > v_user_id := CAST( v_user_entry AS uuid ); > end if; > > v_index := POSITION(':' IN v_name); > if ( v_index <> 0 ) then > v_name := substring( v_name from v_index + 1 ); > end if; > >-- find if name already includes domain (@) > v_index := POSITION('@' IN v_name); > > if (v_index = 0) then > v_user_name := coalesce(v_name,'') || '@' || coalesce(v_domain,''); > else > v_user_name := v_name; > end if; > > >insert into users(user_id,name,domain,username,groups,status) select v_user_id, v_name, v_domain, v_user_name,'',1 where not exists (select user_id,name,domain,username,groups,status from users where user_id = v_user_id and name = v_name and domain = v_domain and username = v_user_name and groups = '' and status = 1); > >insert into permissions(id,role_id,ad_element_id,object_id,object_type_id) select v_permission_id, '00000000-0000-0000-0000-000000000001', v_user_id, getGlobalIds('system'), 1 where not exists(select role_id,ad_element_id,object_id,object_type_id from permissions where role_id = '00000000-0000-0000-0000-000000000001' and ad_element_id = v_user_id and object_id= getGlobalIds('system') and object_type_id = 1); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION CheckDBConnection() RETURNS SETOF integer IMMUTABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_functions_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' from pg_proc inner join pg_namespace ns on (pg_proc.pronamespace=ns.oid) where ns.nspname = 'public' and proname not ilike 'uuid%' order by proname; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_views_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP VIEW if exists ' || table_name || ' CASCADE;' from information_schema.views where table_schema = 'public' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_tables_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP TABLE if exists ' || table_name || ' CASCADE;' from information_schema.tables where table_schema = 'public' and table_type = 'BASE TABLE' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_seq_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP SEQUENCE if exists ' || sequence_name || ' CASCADE;' from information_schema.sequences where sequence_schema = 'public' order by sequence_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_user_types_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, pg_class c, pg_type t > WHERE n.oid = c.relnamespace and t.typrelid = c.oid and c.relkind = 'c'::"char" and > n.nspname = 'public' > ORDER BY c.relname::information_schema.sql_identifier; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_get_column_size( v_table varchar(64), v_column varchar(64)) returns integer STABLE > AS $procedure$ > declare > retvalue integer; >BEGIN > retvalue := character_maximum_length from information_schema.columns > where > table_name ilike v_table and column_name ilike v_column and > table_schema = 'public' and udt_name in ('char','varchar'); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION attach_user_to_su_role(v_permission_id uuid, v_user_id VARCHAR(255), v_name VARCHAR(255), v_domain VARCHAR(255)) > RETURNS void AS >$BODY$ > DECLARE > v_user_name VARCHAR(255); > v_document VARCHAR(64); > v_index INTEGER; > input_uuid uuid; >BEGIN > input_uuid = CAST( v_user_id AS uuid ); >-- find if name already includes domain (@) > v_index := POSITION('@' IN v_name); > > if (v_index = 0) then > v_user_name := coalesce(v_name,'') || '@' || coalesce(v_domain,''); > else > v_user_name := v_name; > end if; > > >insert into users(user_id,name,domain,username,groups,status) select input_uuid, v_name, v_domain, v_user_name,'',1 where not exists (select user_id,name,domain,username,groups,status from users where user_id = input_uuid); > >insert into permissions(id,role_id,ad_element_id,object_id,object_type_id) select v_permission_id, '00000000-0000-0000-0000-000000000001', input_uuid, getGlobalIds('system'), 1 where not exists(select role_id,ad_element_id,object_id,object_type_id from permissions where role_id = '00000000-0000-0000-0000-000000000001' and ad_element_id = input_uuid and object_id= getGlobalIds('system') and object_type_id = 1); >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_action_group_to_role(v_role_id UUID, v_action_group_id INTEGER) >RETURNS VOID >AS $procedure$ >BEGIN > INSERT INTO roles_groups(role_id,action_group_id) > SELECT v_role_id, v_action_group_id > WHERE NOT EXISTS (SELECT 1 > FROM roles_groups > WHERE role_id = v_role_id > AND action_group_id = v_action_group_id); >RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_split_config_value(v_option_name character varying, v_old_option_value character varying, v_new_option_value character varying, v_update_from_version character varying) > RETURNS void AS >$BODY$ >declare >v_old_value varchar(4000); >v_cur cursor for select distinct version from vdc_options where version <> 'general' order by version; >v_version varchar(40); >v_index integer; >v_count integer; >v_total_count integer; >v_version_count integer; >begin > v_total_count := count(version) from vdc_options where option_name = v_option_name; > v_old_value := option_value from vdc_options where option_name = v_option_name and version = 'general'; > v_version_count := count(distinct version) from vdc_options where version <> 'general'; > if (v_total_count <= v_version_count) then > begin > if (v_old_value IS NULL) then > v_old_value := v_old_option_value; > end if; > v_count := count(distinct version) from vdc_options where version <> 'general'; > v_index := 1; > open v_cur; > loop > fetch v_cur into v_version; > exit when not found; > -- We shouldn't update if already exists > if (not exists (select 1 from vdc_options where option_name = v_option_name and version = v_version)) then > -- Might not work well for versions such as 3.10, but we currently don't have any > if (v_version >= v_update_from_version) then > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_new_option_value, v_version); > else > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_old_value, v_version); > end if; > end if; > v_index := v_index +1; > end loop; > close v_cur; > delete from vdc_options where option_name = v_option_name and version = 'general'; > end; > end if; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_grant_action_group_to_all_roles_filter(v_action_group_id integer, uuid[]) > RETURNS void AS >$BODY$ >declare >v_role_id_to_filter alias for $2; >begin > insert into roles_groups (role_id, action_group_id) > select distinct role_id, v_action_group_id > from roles_groups rg > where not ARRAY [role_id] <@ v_role_id_to_filter and not exists (select 1 from roles_groups where role_id = rg.role_id and action_group_id = v_action_group_id); >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object(v_object regclass) RETURNS setof record as >$BODY$ >DECLARE > v_sql TEXT; > v_table record; > v_table_name TEXT; > temprec record; >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > select c.relname, n.nspname INTO v_table > FROM pg_class c join pg_namespace n on c.relnamespace = n.oid WHERE c.oid = v_object; > -- try to get filtered query syntax from previous execution > if exists (select 1 from object_column_white_list_sql where object_name = v_table.relname) then > select sql into v_sql from object_column_white_list_sql where object_name = v_table.relname; > else > v_table_name := quote_ident( v_table.nspname ) || '.' || quote_ident( v_table.relname ); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > for temprec in select a.attname, t.typname > FROM pg_attribute a join pg_type t on a.atttypid = t.oid > WHERE a.attrelid = v_object AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum > loop > v_sql := coalesce( v_sql || ', ', 'SELECT ' ); > if exists(select 1 from object_column_white_list > where object_name = v_table.relname and column_name = temprec.attname) then > v_sql := v_sql || quote_ident( temprec.attname ); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident( temprec.typname ) || ' as ' || quote_ident( temprec.attname ); > END IF; > END LOOP; > v_sql := v_sql || ' FROM ' || v_table_name; > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > -- save generated query for further use > insert into object_column_white_list_sql(object_name,sql) values (v_table.relname, v_sql); > end if; > RETURN QUERY EXECUTE v_sql; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_column_to_object_white_list(v_object_name varchar(128), v_column_name varchar(128)) >returns void >AS $procedure$ >begin > if (not exists (select 1 from object_column_white_list > where object_name = v_object_name and column_name = v_column_name)) then > begin > -- verify that there is such object in db > if exists (select 1 from information_schema.columns > where table_name = v_object_name and column_name = v_column_name) then > insert into object_column_white_list (object_name, column_name) values (v_object_name, v_column_name); > end if; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_disk(v_id UUID) >returns void >AS $procedure$ >declare > OK integer; > LOCKED integer; >begin > OK:=1; > LOCKED:=2; > update images set imagestatus = OK where imagestatus = LOCKED and > image_group_id in (select device_id from vm_device where device_id = v_id and is_plugged); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_snapshot(v_id UUID) >returns void >AS $procedure$ >declare > OK varchar; > LOCKED varchar; >begin > OK:='OK'; > LOCKED:='LOCKED'; > update snapshots set status = OK where status = LOCKED and snapshot_id = v_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_entity(v_object_type varchar(10), v_name varchar(255), v_recursive boolean) >returns void >AS $procedure$ >declare > DOWN integer; > OK integer; > LOCKED integer; > TEMPLATE_OK integer; > TEMPLATE_LOCKED integer; > IMAGE_LOCKED integer; > SNAPSHOT_OK varchar; > SNAPSHOT_LOCKED varchar; > v_id UUID; >begin > DOWN:=0; > OK:=1; > LOCKED:=2; > TEMPLATE_OK:=0; > TEMPLATE_LOCKED:=1; > IMAGE_LOCKED:=15; > SNAPSHOT_OK:='OK'; > SNAPSHOT_LOCKED:='LOCKED'; > v_id := vm_guid from vm_static where vm_name = v_name and entity_type ilike v_object_type; > -- set VM status to DOWN > if (v_object_type = 'vm') then > update vm_dynamic set status = DOWN where status = IMAGE_LOCKED and vm_guid = v_id; > -- set Template status to OK > else > if (v_object_type = 'template') then > update vm_static set template_status = TEMPLATE_OK where template_status = TEMPLATE_LOCKED and vm_guid = v_id; > end if; > end if; > --unlock images and snapshots if recursive flag is set > if (v_recursive) then > update images set imagestatus = OK where imagestatus = LOCKED and > image_group_id in (select device_id from vm_device where vm_id = v_id and is_plugged); > > update snapshots set status = SNAPSHOT_OK where status ilike SNAPSHOT_LOCKED and vm_id = v_id; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/* Displays DC id , DC name, SPM Host id , SPM Host name and number of async tasks awaiting. > >1) create a record type with DC name, DC id, SPM host id, SPM host name, count > >2) get all distinct DC ids from async_tasks table > >3) Run a cursor for each result in 2) > > a) get DC name > b) get SPM Host id & name if available > c) get count of tasks > > return current record > >4) return set of generated records >*/ >DROP TYPE IF EXISTS async_tasks_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE async_tasks_info_rs AS ( > dc_id UUID, dc_name CHARACTER VARYING, spm_host_id UUID, spm_host_name CHARACTER VARYING, task_count integer); >************************** > >CREATE TYPE >********* QUERY ********** >create or replace FUNCTION fn_db_get_async_tasks() >returns SETOF async_tasks_info_rs STABLE >AS $procedure$ >DECLARE > v_record async_tasks_info_rs; > > -- selects storage_pool_id uuid found in async_tasks > v_tasks_cursor cursor for select distinct storage_pool_id from async_tasks; >begin > > OPEN v_tasks_cursor; > FETCH v_tasks_cursor into v_record.dc_id; > WHILE FOUND LOOP > -- get dc_name and SPM Host id > v_record.dc_name := name from storage_pool where id = v_record.dc_id; > v_record.spm_host_id := > spm_vds_id from storage_pool where id = v_record.dc_id; > -- get Host name if we have non NULL SPM Host > if (v_record.spm_host_id IS NOT NULL) then > v_record.spm_host_name := > vds_name from vds_static where vds_id = v_record.spm_host_id; > else > v_record.spm_host_name:=''; > end if; > -- get tasks count for this DC > v_record.task_count := count(*) from async_tasks > where position (cast(v_record.dc_id as varchar) in action_parameters) > 0; > -- return the record > RETURN NEXT v_record; > FETCH v_tasks_cursor into v_record.dc_id; > END LOOP; > CLOSE v_tasks_cursor; > -- return full set of generated records > RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >select fn_db_add_column('schema_version', 'comment', 'text NULL default '''' '); >************************** > > > >********* QUERY ********** >CREATE OR REPLACE FUNCTION update_enum_translator(enum_type varchar(40), enum_key smallint, language_code varchar(40), value text) RETURNS void AS $$ >BEGIN > DELETE FROM enum_translator > WHERE enum_translator.enum_type = update_enum_translator.enum_type > AND enum_translator.enum_key = update_enum_translator.enum_key > AND enum_translator.language_code = update_enum_translator.language_code > AND EXISTS (SELECT 1 > FROM enum_translator as a > WHERE a.enum_type = update_enum_translator.enum_type > AND a.enum_key = update_enum_translator.enum_key > AND a.language_code = update_enum_translator.language_code); > INSERT INTO enum_translator VALUES (update_enum_translator.enum_type, update_enum_translator.enum_key, update_enum_translator.language_code, update_enum_translator.value); >END; >$$ LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >ALTER TABLE schema_version ALTER COLUMN installed_by TYPE varchar(63); >************************** > >ALTER TABLE >********* QUERY ********** >INSERT INTO history_configuration(var_name,var_value) SELECT 'default_language','en_US' WHERE not exists (SELECT var_name FROM history_configuration WHERE var_name = 'default_language'); >************************** > >INSERT 0 0 >********* QUERY ********** >UPDATE history_configuration SET var_value = 'en_US' WHERE var_name = 'default_language' and var_value = 'us-en'; >************************** > >UPDATE 0 >********* QUERY ********** >INSERT INTO history_configuration(var_name,var_value) SELECT 'MinimalETLVersion','4.3.0' WHERE not exists (SELECT var_name FROM history_configuration WHERE var_name = 'MinimalETLVersion'); >************************** > >INSERT 0 0 >********* QUERY ********** >UPDATE history_configuration SET var_value = '4.3.0' WHERE var_name = 'MinimalETLVersion'; >************************** > >UPDATE 1 >********* QUERY ********** >copy ( > select version > from schema_version > where current = true > order by id > LIMIT 1 > ) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy ( > select max(id) > from schema_version > where state in ('INSTALLED','SKIPPED') > ) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** > > update schema_version > set current=(id=46); > >************************** > >UPDATE 46 >********* QUERY ********** >/************************************** > VERSIONED VIEWS (3.6) >**************************************/ >CREATE OR REPLACE VIEW v3_6_enum_translator > AS >SELECT > enum_translator.enum_type as enum_type, > enum_translator.enum_key as enum_key, > enum_translator.value as value >FROM enum_translator INNER JOIN > history_configuration ON > (enum_translator.language_code = history_configuration.var_value > and history_configuration.var_name = 'default_language'); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_configuration_history_datacenters > AS >SELECT > history_id as history_id, > datacenter_id as datacenter_id, > datacenter_name as datacenter_name, > datacenter_description as datacenter_description, > is_local_storage as is_local_storage, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM datacenter_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_configuration_datacenters > AS >SELECT > history_id as history_id, > datacenter_id as datacenter_id, > datacenter_name as datacenter_name, > datacenter_description as datacenter_description, > is_local_storage as is_local_storage, > create_date as create_date, > update_date as update_date >FROM datacenter_configuration >WHERE history_id in (SELECT max(a.history_id) FROM datacenter_configuration as a GROUP BY a.datacenter_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_datacenters_resources_usage_samples > AS >SELECT > cast(NULL as bigint) as history_id, > cast(NULL as timestamp with time zone) as history_datetime, > cast(NULL as uuid) as datacenter_id, > cast(NULL as smallint ) as datacenter_status, > cast(NULL as numeric(7,2)) as minutes_in_status, > cast(NULL as integer) as datacenter_configuration_version; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_datacenters_resources_usage_hourly > AS >SELECT > cast(NULL as bigint) as history_id, > cast(NULL as timestamp with time zone) as history_datetime, > cast(NULL as uuid) as datacenter_id, > cast(NULL as smallint ) as datacenter_status, > cast(NULL as numeric(7,2)) as minutes_in_status, > cast(NULL as integer) as datacenter_configuration_version; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_datacenters_resources_usage_daily > AS >SELECT > cast(NULL as bigint) as history_id, > cast(NULL as date) as history_datetime, > cast(NULL as uuid) as datacenter_id, > cast(NULL as smallint ) as datacenter_status, > cast(NULL as numeric(7,2)) as minutes_in_status, > cast(NULL as integer) as datacenter_configuration_version; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_map_history_datacenters_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > datacenter_id as datacenter_id, > attach_date as attach_date, > detach_date as detach_date >FROM datacenter_storage_domain_map; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_map_datacenters_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > datacenter_id as datacenter_id, > attach_date as attach_date >FROM datacenter_storage_domain_map >WHERE history_id in (SELECT max(a.history_id) FROM datacenter_storage_domain_map as a GROUP BY a.storage_domain_id, a.datacenter_id) > and detach_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_configuration_history_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > storage_domain_name as storage_domain_name, > storage_domain_type as storage_domain_type, > storage_type as storage_type, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM storage_domain_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_configuration_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > storage_domain_name as storage_domain_name, > storage_domain_type as storage_domain_type, > storage_type as storage_type, > create_date as create_date, > update_date as update_date >FROM storage_domain_configuration >WHERE history_id in (SELECT max(a.history_id) FROM storage_domain_configuration as a GROUP BY a.storage_domain_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_storage_domains_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_storage_domains_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_storage_domains_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_configuration_history_clusters > AS >SELECT > history_id as history_id, > cluster_id as cluster_id, > cluster_name as cluster_name, > cluster_description as cluster_description, > datacenter_id as datacenter_id, > cpu_name as cpu_name, > compatibility_version as compatibility_version, > datacenter_configuration_version as datacenter_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM cluster_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_configuration_clusters > AS >SELECT > history_id as history_id, > cluster_id as cluster_id, > cluster_name as cluster_name, > cluster_description as cluster_description, > datacenter_id as datacenter_id, > cpu_name as cpu_name, > compatibility_version as compatibility_version, > datacenter_configuration_version as datacenter_configuration_version, > create_date as create_date, > update_date as update_date >FROM cluster_configuration >WHERE history_id in (SELECT max(a.history_id) FROM cluster_configuration as a GROUP BY a.cluster_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_configuration_history_hosts > AS >SELECT > history_id as history_id, > host_id as host_id, > host_unique_id as host_unique_id, > host_name as host_name, > cluster_id as cluster_id, > host_type as host_type, > fqdn_or_ip as fqdn_or_ip, > memory_size_mb as memory_size_mb, > swap_size_mb as swap_size_mb, > cpu_model as cpu_model, > number_of_cores as number_of_cores, > number_of_sockets, > cpu_speed_mh, > host_os as host_os, > kernel_version as kernel_version, > kvm_version as kvm_version, > CASE SUBSTR(vdsm_version,1,3) > WHEN '4.4' THEN '2.1' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.5' THEN '2.2' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.9' THEN '2.3' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > ELSE vdsm_version > END as vdsm_version, > vdsm_port as vdsm_port, > threads_per_core as threads_per_core, > hardware_manufacturer as hardware_manufacturer, > hardware_product_name as hardware_product_name, > hardware_version as hardware_version, > hardware_serial_number as hardware_serial_number, > cluster_configuration_version as cluster_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM host_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_configuration_hosts > AS >SELECT > history_id as history_id, > host_id as host_id, > host_unique_id as host_unique_id, > host_name as host_name, > cluster_id as cluster_id, > host_type as host_type, > fqdn_or_ip as fqdn_or_ip, > memory_size_mb as memory_size_mb, > swap_size_mb as swap_size_mb, > cpu_model as cpu_model, > number_of_cores as number_of_cores, > number_of_sockets, > cpu_speed_mh, > host_os as host_os, > kernel_version as kernel_version, > kvm_version as kvm_version, > CASE SUBSTR(vdsm_version,1,3) > WHEN '4.4' THEN '2.1' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.5' THEN '2.2' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.9' THEN '2.3' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > ELSE vdsm_version > END as vdsm_version, > vdsm_port as vdsm_port, > threads_per_core as threads_per_core, > hardware_manufacturer as hardware_manufacturer, > hardware_product_name as hardware_product_name, > hardware_version as hardware_version, > hardware_serial_number as hardware_serial_number, > cluster_configuration_version as cluster_configuration_version, > create_date as create_date, > update_date as update_date >FROM host_configuration >WHERE history_id in (SELECT max(a.history_id) FROM host_configuration as a GROUP BY a.host_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_hosts_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > memory_usage_percent as memory_usage_percent, > ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > ksm_cpu_percent as ksm_cpu_percent, > active_vms as active_vms, > total_vms as total_vms, > total_vms_vcpus as total_vms_vcpus, > cpu_load as cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_hosts_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > minutes_in_status as minutes_in_status, > memory_usage_percent as memory_usage_percent, > max_memory_usage as max_memory_usage, > ksm_shared_memory_mb, > max_ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > max_cpu_usage as max_cpu_usage, > ksm_cpu_percent as ksm_cpu_percent, > max_ksm_cpu_percent as max_ksm_cpu_percent, > active_vms as active_vms, > max_active_vms as max_active_vms, > total_vms as total_vms, > max_total_vms as max_total_vms, > total_vms_vcpus as total_vms_vcpus, > max_total_vms_vcpus as max_total_vms_vcpus, > cpu_load as cpu_load, > max_cpu_load as max_cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > max_system_cpu_usage_percent as max_system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > max_user_cpu_usage_percent as max_user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > max_swap_used_mb as max_swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_hosts_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > minutes_in_status as minutes_in_status, > memory_usage_percent as memory_usage_percent, > max_memory_usage as max_memory_usage, > ksm_shared_memory_mb, > max_ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > max_cpu_usage as max_cpu_usage, > ksm_cpu_percent as ksm_cpu_percent, > max_ksm_cpu_percent as max_ksm_cpu_percent, > active_vms as active_vms, > max_active_vms as max_active_vms, > total_vms as total_vms, > max_total_vms as max_total_vms, > total_vms_vcpus as total_vms_vcpus, > max_total_vms_vcpus as max_total_vms_vcpus, > cpu_load as cpu_load, > max_cpu_load as max_cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > max_system_cpu_usage_percent as max_system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > max_user_cpu_usage_percent as max_user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > max_swap_used_mb as max_swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_configuration_history_hosts_interfaces > AS >SELECT > history_id as history_id, > host_interface_id as host_interface_id, > host_interface_name as host_interface_name, > host_id as host_id, > host_interface_type as host_interface_type, > host_interface_speed_bps as host_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > ip_address as ip_address, > gateway as gateway, > bond as bond, > bond_name as bond_name, > vlan_id as vlan_id, > host_configuration_version as host_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM host_interface_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_configuration_hosts_interfaces > AS >SELECT > history_id as history_id, > host_interface_id as host_interface_id, > host_interface_name as host_interface_name, > host_id as host_id, > host_interface_type as host_interface_type, > host_interface_speed_bps as host_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > ip_address as ip_address, > gateway as gateway, > bond as bond, > bond_name as bond_name, > vlan_id as vlan_id, > host_configuration_version as host_configuration_version, > create_date as create_date, > update_date as update_date >FROM host_interface_configuration >WHERE history_id in (SELECT max(a.history_id) FROM host_interface_configuration as a GROUP BY a.host_interface_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_hosts_interfaces_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_hosts_interfaces_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_hosts_interfaces_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_configuration_history_vms > AS >SELECT > history_id as history_id, > vm_id as vm_id, > vm_name as vm_name, > vm_description as vm_description, > vm_type as vm_type, > cluster_id as cluster_id, > template_id as template_id, > template_name as template_name, > cpu_per_socket as cpu_per_socket, > number_of_sockets as number_of_sockets, > memory_size_mb as memory_size_mb, > operating_system as operating_system, > default_host as default_host, > high_availability as high_availability, > initialized as initialized, > stateless as stateless, > fail_back as fail_back, > usb_policy as usb_policy, > time_zone as time_zone, > vm_pool_id, > vm_pool_name, > created_by_user_id, > cluster_configuration_version as cluster_configuration_version, > default_host_configuration_version as default_host_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_configuration_vms > AS >SELECT > history_id as history_id, > vm_id as vm_id, > vm_name as vm_name, > vm_description as vm_description, > vm_type as vm_type, > cluster_id as cluster_id, > template_id as template_id, > template_name as template_name, > cpu_per_socket as cpu_per_socket, > number_of_sockets as number_of_sockets, > memory_size_mb as memory_size_mb, > operating_system as operating_system, > default_host as default_host, > high_availability as high_availability, > initialized as initialized, > stateless as stateless, > fail_back as fail_back, > usb_policy as usb_policy, > time_zone as time_zone, > vm_pool_id, > vm_pool_name, > created_by_user_id, > cluster_configuration_version as cluster_configuration_version, > default_host_configuration_version as default_host_configuration_version, > create_date as create_date, > update_date as update_date >FROM vm_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_configuration as a GROUP BY a.vm_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_vms_resources_usage_samples > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > cast(a.seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.memory_usage_percent as memory_usage_percent, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.vm_client_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > a.user_logged_in_to_guest, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb >FROM vm_samples_history as a > LEFT OUTER JOIN vm_disks_usage_samples_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_vms_resources_usage_hourly > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > a.minutes_in_status as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.max_cpu_usage as max_cpu_usage, > a.memory_usage_percent as memory_usage_percent, > a.max_memory_usage as max_memory_usage, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb, > a.max_memory_buffered_kb as max_memory_buffered_kb, > a.max_memory_cached_kb as max_memory_cached_kb >FROM vm_hourly_history as a > LEFT OUTER JOIN vm_disks_usage_hourly_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_vms_resources_usage_daily > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > a.minutes_in_status as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.max_cpu_usage as max_cpu_usage, > a.memory_usage_percent as memory_usage_percent, > a.max_memory_usage as max_memory_usage, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb, > a.max_memory_buffered_kb as max_memory_buffered_kb, > a.max_memory_cached_kb as max_memory_cached_kb >FROM vm_daily_history as a > LEFT OUTER JOIN vm_disks_usage_daily_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_vms_users_usage_hourly > AS >SELECT history_id, > history_datetime, > user_id, > vm_id, > session_time_in_minutes, > cpu_usage_percent, > max_cpu_usage, > memory_usage_percent, > max_memory_usage, > user_cpu_usage_percent, > max_user_cpu_usage_percent, > system_cpu_usage_percent, > max_system_cpu_usage_percent, > vm_ip, > vm_client_ip, > user_logged_in_to_guest, > currently_running_on_host, > vm_configuration_version, > current_host_configuration_version >FROM statistics_vms_users_usage_hourly; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_vms_users_usage_daily > AS >SELECT history_id, > history_datetime, > user_id, > vm_id, > session_time_in_minutes, > cpu_usage_percent, > max_cpu_usage, > memory_usage_percent, > max_memory_usage, > user_cpu_usage_percent, > max_user_cpu_usage_percent, > system_cpu_usage_percent, > max_system_cpu_usage_percent, > vm_ip, > vm_client_ip, > user_logged_in_to_guest, > currently_running_on_host, > vm_configuration_version, > current_host_configuration_version >FROM statistics_vms_users_usage_daily; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_configuration_history_vms_interfaces > AS >SELECT > history_id as history_id, > vm_interface_id as vm_interface_id, > vm_interface_name as vm_interface_name, > vm_interface_type as vm_interface_type, > vm_interface_speed_bps as vm_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > vm_configuration_version as vm_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_interface_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_configuration_vms_interfaces > AS >SELECT > history_id as history_id, > vm_interface_id as vm_interface_id, > vm_interface_name as vm_interface_name, > vm_interface_type as vm_interface_type, > vm_interface_speed_bps as vm_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > vm_configuration_version as vm_configuration_version, > create_date as create_date, > update_date as update_date >FROM vm_interface_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_interface_configuration as a GROUP BY a.vm_interface_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_vms_interfaces_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_vms_interfaces_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_vms_interfaces_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_configuration_history_vms_disks > AS >SELECT > history_id as history_id, > vm_disk_id as vm_disk_id, > CASE > WHEN vm_disk_name IS NOT NULL THEN vm_disk_name > ELSE 'disk ' || cast(vm_internal_drive_mapping as varchar) > END as vm_disk_name, > vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > storage_domain_id as storage_domain_id, > vm_disk_size_mb as vm_disk_size_mb, > vm_disk_type as vm_disk_type, > vm_disk_format as vm_disk_format, > cast(NULL as smallint) as vm_disk_interface, > is_shared as is_shared, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_disk_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_configuration_vms_disks > AS >SELECT > history_id as history_id, > vm_disk_id as vm_disk_id, > CASE > WHEN vm_disk_name IS NOT NULL THEN vm_disk_name > ELSE 'disk ' || cast(vm_internal_drive_mapping as varchar) > END as vm_disk_name, > vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > storage_domain_id as storage_domain_id, > vm_disk_size_mb as vm_disk_size_mb, > vm_disk_type as vm_disk_type, > vm_disk_format as vm_disk_format, > cast(NULL as smallint) as vm_disk_interface, > is_shared as is_shared, > create_date as create_date, > update_date as update_date >FROM vm_disk_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_disk_configuration as a GROUP BY a.vm_disk_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_vms_disks_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_vms_disks_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > minutes_in_status as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > max_read_latency_seconds as max_read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > max_write_latency_seconds as max_write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > max_flush_latency_seconds as max_flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_statistics_vms_disks_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > minutes_in_status as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > max_read_latency_seconds as max_read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > max_write_latency_seconds as max_write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > max_flush_latency_seconds as max_flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_configuration_history_vms_devices > AS >SELECT > history_id as history_id, > vm_id, > device_id, > type, > address, > is_managed, > is_plugged, > is_readonly, > vm_configuration_version, > device_configuration_version, > create_date, > update_date, > delete_date >FROM vm_device_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_configuration_vms_devices > AS >SELECT > history_id as history_id, > vm_id, > device_id, > type, > address, > is_managed, > is_plugged, > is_readonly, > vm_configuration_version, > device_configuration_version, > create_date, > update_date >FROM vm_device_history >WHERE history_id in (SELECT max(a.history_id) FROM vm_device_history as a GROUP BY a.vm_id, a.device_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_users_details_history > AS >SELECT > user_id, > first_name, > last_name, > domain, > username, > department, > user_role_title, > email, > external_id, > active, > create_date, > update_date, > delete_date >FROM users_details_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_users_details > AS >SELECT > user_id, > first_name, > last_name, > domain, > username, > department, > user_role_title, > email, > external_id, > active, > create_date, > update_date, > delete_date >FROM users_details_history >WHERE delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_tags_relations_history > AS >SELECT history_id as history_id, > entity_id as entity_id, > entity_type as entity_type, > parent_id as parent_id, > attach_date as attach_date, > detach_date as detach_date >FROM tag_relations_history >WHERE entity_type in(3,2,5,18,15); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_tags_relations > AS >SELECT history_id as history_id, > entity_id as entity_id, > entity_type as entity_type, > parent_id as parent_id, > attach_date as attach_date, > detach_date as detach_date >FROM tag_relations_history >WHERE entity_type in(3,2,5,18,15) > and history_id in (SELECT max(a.history_id) FROM tag_relations_history as a GROUP BY a.entity_id, a.parent_id) > and detach_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_tags_details_history > AS >SELECT history_id as history_id, > tag_id as tag_id, > tag_name as tag_name, > tag_description as tag_description, > tag_path as tag_path, > tag_level as tag_level, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM tag_details; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v3_6_latest_tags_details > AS >SELECT history_id as history_id, > tag_id as tag_id, > tag_name as tag_name, > tag_description as tag_description, > tag_path as tag_path, > tag_level as tag_level, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM tag_details >WHERE history_id in (SELECT max(a.history_id) FROM tag_details as a GROUP BY a.tag_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >/************************************** > VERSIONED VIEWS (4.0) >**************************************/ >CREATE OR REPLACE VIEW v4_0_enum_translator > AS >SELECT > enum_translator.enum_type as enum_type, > enum_translator.enum_key as enum_key, > enum_translator.value as value >FROM enum_translator INNER JOIN > history_configuration ON > (enum_translator.language_code = history_configuration.var_value > and history_configuration.var_name = 'default_language'); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_configuration_history_datacenters > AS >SELECT > history_id as history_id, > datacenter_id as datacenter_id, > datacenter_name as datacenter_name, > datacenter_description as datacenter_description, > is_local_storage as is_local_storage, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM datacenter_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_configuration_datacenters > AS >SELECT > history_id as history_id, > datacenter_id as datacenter_id, > datacenter_name as datacenter_name, > datacenter_description as datacenter_description, > is_local_storage as is_local_storage, > create_date as create_date, > update_date as update_date >FROM datacenter_configuration >WHERE history_id in (SELECT max(a.history_id) FROM datacenter_configuration as a GROUP BY a.datacenter_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_map_history_datacenters_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > datacenter_id as datacenter_id, > attach_date as attach_date, > detach_date as detach_date >FROM datacenter_storage_domain_map; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_map_datacenters_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > datacenter_id as datacenter_id, > attach_date as attach_date >FROM datacenter_storage_domain_map >WHERE history_id in (SELECT max(a.history_id) FROM datacenter_storage_domain_map as a GROUP BY a.storage_domain_id, a.datacenter_id) > and detach_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_configuration_history_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > storage_domain_name as storage_domain_name, > storage_domain_type as storage_domain_type, > storage_type as storage_type, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM storage_domain_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_configuration_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > storage_domain_name as storage_domain_name, > storage_domain_type as storage_domain_type, > storage_type as storage_type, > create_date as create_date, > update_date as update_date >FROM storage_domain_configuration >WHERE history_id in (SELECT max(a.history_id) FROM storage_domain_configuration as a GROUP BY a.storage_domain_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_storage_domains_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_storage_domains_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_storage_domains_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_configuration_history_clusters > AS >SELECT > history_id as history_id, > cluster_id as cluster_id, > cluster_name as cluster_name, > cluster_description as cluster_description, > datacenter_id as datacenter_id, > cpu_name as cpu_name, > compatibility_version as compatibility_version, > datacenter_configuration_version as datacenter_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM cluster_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_configuration_clusters > AS >SELECT > history_id as history_id, > cluster_id as cluster_id, > cluster_name as cluster_name, > cluster_description as cluster_description, > datacenter_id as datacenter_id, > cpu_name as cpu_name, > compatibility_version as compatibility_version, > datacenter_configuration_version as datacenter_configuration_version, > create_date as create_date, > update_date as update_date >FROM cluster_configuration >WHERE history_id in (SELECT max(a.history_id) FROM cluster_configuration as a GROUP BY a.cluster_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_configuration_history_hosts > AS >SELECT > history_id as history_id, > host_id as host_id, > host_unique_id as host_unique_id, > host_name as host_name, > cluster_id as cluster_id, > host_type as host_type, > fqdn_or_ip as fqdn_or_ip, > memory_size_mb as memory_size_mb, > swap_size_mb as swap_size_mb, > cpu_model as cpu_model, > number_of_cores as number_of_cores, > number_of_sockets, > cpu_speed_mh, > host_os as host_os, > kernel_version as kernel_version, > kvm_version as kvm_version, > CASE SUBSTR(vdsm_version,1,3) > WHEN '4.4' THEN '2.1' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.5' THEN '2.2' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.9' THEN '2.3' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > ELSE vdsm_version > END as vdsm_version, > vdsm_port as vdsm_port, > threads_per_core as threads_per_core, > hardware_manufacturer as hardware_manufacturer, > hardware_product_name as hardware_product_name, > hardware_version as hardware_version, > hardware_serial_number as hardware_serial_number, > cluster_configuration_version as cluster_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM host_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_configuration_hosts > AS >SELECT > history_id as history_id, > host_id as host_id, > host_unique_id as host_unique_id, > host_name as host_name, > cluster_id as cluster_id, > host_type as host_type, > fqdn_or_ip as fqdn_or_ip, > memory_size_mb as memory_size_mb, > swap_size_mb as swap_size_mb, > cpu_model as cpu_model, > number_of_cores as number_of_cores, > number_of_sockets, > cpu_speed_mh, > host_os as host_os, > kernel_version as kernel_version, > kvm_version as kvm_version, > CASE SUBSTR(vdsm_version,1,3) > WHEN '4.4' THEN '2.1' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.5' THEN '2.2' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.9' THEN '2.3' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > ELSE vdsm_version > END as vdsm_version, > vdsm_port as vdsm_port, > threads_per_core as threads_per_core, > hardware_manufacturer as hardware_manufacturer, > hardware_product_name as hardware_product_name, > hardware_version as hardware_version, > hardware_serial_number as hardware_serial_number, > cluster_configuration_version as cluster_configuration_version, > create_date as create_date, > update_date as update_date >FROM host_configuration >WHERE history_id in (SELECT max(a.history_id) FROM host_configuration as a GROUP BY a.host_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_hosts_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > memory_usage_percent as memory_usage_percent, > ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > ksm_cpu_percent as ksm_cpu_percent, > active_vms as active_vms, > total_vms as total_vms, > total_vms_vcpus as total_vms_vcpus, > cpu_load as cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_hosts_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > memory_usage_percent as memory_usage_percent, > max_memory_usage as max_memory_usage, > ksm_shared_memory_mb, > max_ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > max_cpu_usage as max_cpu_usage, > ksm_cpu_percent as ksm_cpu_percent, > max_ksm_cpu_percent as max_ksm_cpu_percent, > active_vms as active_vms, > max_active_vms as max_active_vms, > total_vms as total_vms, > max_total_vms as max_total_vms, > total_vms_vcpus as total_vms_vcpus, > max_total_vms_vcpus as max_total_vms_vcpus, > cpu_load as cpu_load, > max_cpu_load as max_cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > max_system_cpu_usage_percent as max_system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > max_user_cpu_usage_percent as max_user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > max_swap_used_mb as max_swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_hosts_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > memory_usage_percent as memory_usage_percent, > max_memory_usage as max_memory_usage, > ksm_shared_memory_mb, > max_ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > max_cpu_usage as max_cpu_usage, > ksm_cpu_percent as ksm_cpu_percent, > max_ksm_cpu_percent as max_ksm_cpu_percent, > active_vms as active_vms, > max_active_vms as max_active_vms, > total_vms as total_vms, > max_total_vms as max_total_vms, > total_vms_vcpus as total_vms_vcpus, > max_total_vms_vcpus as max_total_vms_vcpus, > cpu_load as cpu_load, > max_cpu_load as max_cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > max_system_cpu_usage_percent as max_system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > max_user_cpu_usage_percent as max_user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > max_swap_used_mb as max_swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_configuration_history_hosts_interfaces > AS >SELECT > history_id as history_id, > host_interface_id as host_interface_id, > host_interface_name as host_interface_name, > host_id as host_id, > host_interface_type as host_interface_type, > host_interface_speed_bps as host_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > ip_address as ip_address, > gateway as gateway, > bond as bond, > bond_name as bond_name, > vlan_id as vlan_id, > host_configuration_version as host_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM host_interface_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_configuration_hosts_interfaces > AS >SELECT > history_id as history_id, > host_interface_id as host_interface_id, > host_interface_name as host_interface_name, > host_id as host_id, > host_interface_type as host_interface_type, > host_interface_speed_bps as host_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > ip_address as ip_address, > gateway as gateway, > bond as bond, > bond_name as bond_name, > vlan_id as vlan_id, > host_configuration_version as host_configuration_version, > create_date as create_date, > update_date as update_date >FROM host_interface_configuration >WHERE history_id in (SELECT max(a.history_id) FROM host_interface_configuration as a GROUP BY a.host_interface_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_hosts_interfaces_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_hosts_interfaces_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_hosts_interfaces_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_fully_joined_statistics_hosts_resources_usage_samples > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > stats.seconds_in_status as host_seconds_in_status, > cast(stats.seconds_in_status as numeric(7,2)) / 60 as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.active_vms as active_vms, > stats.total_vms as total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_0_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_0_statistics_hosts_resources_usage_samples AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_0_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_0_statistics_hosts_interfaces_resources_usage_samples nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_fully_joined_statistics_hosts_resources_usage_hourly > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > cast(stats.minutes_in_status * 60 as integer) as host_seconds_in_status, > stats.minutes_in_status as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.max_ksm_shared_memory_mb as max_ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.max_ksm_cpu_percent as max_ksm_cpu_percent, > stats.active_vms as active_vms, > stats.max_active_vms as max_active_vms, > stats.total_vms as total_vms, > stats.max_total_vms as max_total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.max_total_vms_vcpus as max_total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.max_cpu_load as max_cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > stats.max_swap_used_mb as max_swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_0_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_0_statistics_hosts_resources_usage_hourly AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_0_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_0_statistics_hosts_interfaces_resources_usage_hourly nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_fully_joined_statistics_hosts_resources_usage_daily > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > cast(stats.minutes_in_status * 60 as integer) as host_seconds_in_status, > stats.minutes_in_status as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.max_ksm_shared_memory_mb as max_ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.max_ksm_cpu_percent as max_ksm_cpu_percent, > stats.active_vms as active_vms, > stats.max_active_vms as max_active_vms, > stats.total_vms as total_vms, > stats.max_total_vms as max_total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.max_total_vms_vcpus as max_total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.max_cpu_load as max_cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > stats.max_swap_used_mb as max_swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_0_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_0_statistics_hosts_resources_usage_daily AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_0_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_0_statistics_hosts_interfaces_resources_usage_daily nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_configuration_history_vms > AS >SELECT > history_id as history_id, > vm_id as vm_id, > vm_name as vm_name, > vm_description as vm_description, > vm_type as vm_type, > cluster_id as cluster_id, > template_id as template_id, > template_name as template_name, > cpu_per_socket as cpu_per_socket, > number_of_sockets as number_of_sockets, > memory_size_mb as memory_size_mb, > operating_system as operating_system, > default_host as default_host, > high_availability as high_availability, > initialized as initialized, > stateless as stateless, > fail_back as fail_back, > usb_policy as usb_policy, > time_zone as time_zone, > vm_pool_id, > vm_pool_name, > created_by_user_id, > cluster_configuration_version as cluster_configuration_version, > default_host_configuration_version as default_host_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_configuration_vms > AS >SELECT > history_id as history_id, > vm_id as vm_id, > vm_name as vm_name, > vm_description as vm_description, > vm_type as vm_type, > cluster_id as cluster_id, > template_id as template_id, > template_name as template_name, > cpu_per_socket as cpu_per_socket, > number_of_sockets as number_of_sockets, > memory_size_mb as memory_size_mb, > operating_system as operating_system, > default_host as default_host, > high_availability as high_availability, > initialized as initialized, > stateless as stateless, > fail_back as fail_back, > usb_policy as usb_policy, > time_zone as time_zone, > vm_pool_id, > vm_pool_name, > created_by_user_id, > cluster_configuration_version as cluster_configuration_version, > default_host_configuration_version as default_host_configuration_version, > create_date as create_date, > update_date as update_date >FROM vm_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_configuration as a GROUP BY a.vm_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_vms_resources_usage_samples > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > a.seconds_in_status as seconds_in_status, > cast(a.seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.memory_usage_percent as memory_usage_percent, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.vm_client_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > a.user_logged_in_to_guest, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb >FROM vm_samples_history as a > LEFT OUTER JOIN vm_disks_usage_samples_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_vms_resources_usage_hourly > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > cast(a.minutes_in_status * 60 as integer) as seconds_in_status, > a.minutes_in_status as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.max_cpu_usage as max_cpu_usage, > a.memory_usage_percent as memory_usage_percent, > a.max_memory_usage as max_memory_usage, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb, > a.max_memory_buffered_kb as max_memory_buffered_kb, > a.max_memory_cached_kb as max_memory_cached_kb >FROM vm_hourly_history as a > LEFT OUTER JOIN vm_disks_usage_hourly_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_vms_resources_usage_daily > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > cast(a.minutes_in_status * 60 as integer) as seconds_in_status, > a.minutes_in_status as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.max_cpu_usage as max_cpu_usage, > a.memory_usage_percent as memory_usage_percent, > a.max_memory_usage as max_memory_usage, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb, > a.max_memory_buffered_kb as max_memory_buffered_kb, > a.max_memory_cached_kb as max_memory_cached_kb >FROM vm_daily_history as a > LEFT OUTER JOIN vm_disks_usage_daily_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_vms_users_usage_hourly > AS >SELECT history_id, > history_datetime, > user_id, > vm_id, > session_time_in_minutes, > cpu_usage_percent, > max_cpu_usage, > memory_usage_percent, > max_memory_usage, > user_cpu_usage_percent, > max_user_cpu_usage_percent, > system_cpu_usage_percent, > max_system_cpu_usage_percent, > vm_ip, > vm_client_ip, > user_logged_in_to_guest, > currently_running_on_host, > vm_configuration_version, > current_host_configuration_version >FROM statistics_vms_users_usage_hourly; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_vms_users_usage_daily > AS >SELECT history_id, > history_datetime, > user_id, > vm_id, > session_time_in_minutes, > cpu_usage_percent, > max_cpu_usage, > memory_usage_percent, > max_memory_usage, > user_cpu_usage_percent, > max_user_cpu_usage_percent, > system_cpu_usage_percent, > max_system_cpu_usage_percent, > vm_ip, > vm_client_ip, > user_logged_in_to_guest, > currently_running_on_host, > vm_configuration_version, > current_host_configuration_version >FROM statistics_vms_users_usage_daily; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_configuration_history_vms_interfaces > AS >SELECT > history_id as history_id, > vm_interface_id as vm_interface_id, > vm_interface_name as vm_interface_name, > vm_interface_type as vm_interface_type, > vm_interface_speed_bps as vm_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > vm_configuration_version as vm_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_interface_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_configuration_vms_interfaces > AS >SELECT > history_id as history_id, > vm_interface_id as vm_interface_id, > vm_interface_name as vm_interface_name, > vm_interface_type as vm_interface_type, > vm_interface_speed_bps as vm_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > vm_configuration_version as vm_configuration_version, > create_date as create_date, > update_date as update_date >FROM vm_interface_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_interface_configuration as a GROUP BY a.vm_interface_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_vms_interfaces_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_vms_interfaces_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_vms_interfaces_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_configuration_history_vms_disks > AS >SELECT > history_id as history_id, > vm_disk_id as vm_disk_id, > CASE > WHEN vm_disk_name IS NOT NULL THEN vm_disk_name > ELSE 'disk ' || cast(vm_internal_drive_mapping as varchar) > END as vm_disk_name, > vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > storage_domain_id as storage_domain_id, > vm_disk_size_mb as vm_disk_size_mb, > vm_disk_type as vm_disk_type, > vm_disk_format as vm_disk_format, > is_shared as is_shared, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_disk_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_configuration_vms_disks > AS >SELECT > history_id as history_id, > vm_disk_id as vm_disk_id, > CASE > WHEN vm_disk_name IS NOT NULL THEN vm_disk_name > ELSE 'disk ' || cast(vm_internal_drive_mapping as varchar) > END as vm_disk_name, > vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > storage_domain_id as storage_domain_id, > vm_disk_size_mb as vm_disk_size_mb, > vm_disk_type as vm_disk_type, > vm_disk_format as vm_disk_format, > is_shared as is_shared, > create_date as create_date, > update_date as update_date >FROM vm_disk_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_disk_configuration as a GROUP BY a.vm_disk_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_vms_disks_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_vms_disks_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > max_read_latency_seconds as max_read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > max_write_latency_seconds as max_write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > max_flush_latency_seconds as max_flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_statistics_vms_disks_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > max_read_latency_seconds as max_read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > max_write_latency_seconds as max_write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > max_flush_latency_seconds as max_flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_configuration_history_vms_devices > AS >SELECT > history_id as history_id, > vm_id, > device_id, > type, > address, > is_managed, > is_plugged, > is_readonly, > vm_configuration_version, > device_configuration_version, > create_date, > update_date, > delete_date >FROM vm_device_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_configuration_vms_devices > AS >SELECT > history_id as history_id, > vm_id, > device_id, > type, > address, > is_managed, > is_plugged, > is_readonly, > vm_configuration_version, > device_configuration_version, > create_date, > update_date >FROM vm_device_history >WHERE history_id in (SELECT max(a.history_id) FROM vm_device_history as a GROUP BY a.vm_id, a.device_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_fully_joined_statistics_vms_resources_usage_samples > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > stats.seconds_in_status as seconds_in_status, > cast(stats.seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.memory_usage_percent as memory_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.vm_client_ip as vm_client_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.user_logged_in_to_guest, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > disk_stats.seconds_in_status as vm_disk_seconds_in_status, > cast(disk_stats.seconds_in_status as numeric(7,2)) / 60 as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds >FROM v4_0_configuration_history_vms AS conf > LEFT OUTER JOIN v4_0_statistics_vms_resources_usage_samples AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_0_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_0_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_0_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_0_statistics_vms_interfaces_resources_usage_samples AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_0_statistics_vms_disks_resources_usage_samples disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_fully_joined_statistics_vms_resources_usage_hourly > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > cast(stats.minutes_in_status * 60 as integer) as vm_seconds_in_status, > stats.minutes_in_status as vm_minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > stats.max_memory_buffered_kb as max_memory_buffered_kb, > stats.max_memory_cached_kb as max_memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > cast(disk_stats.minutes_in_status * 60 as integer) as vm_disk_seconds_in_status, > disk_stats.minutes_in_status as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.max_read_latency_seconds as max_read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.max_write_latency_seconds as max_write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds, > disk_stats.max_flush_latency_seconds as max_flush_latency_seconds >FROM v4_0_configuration_history_vms AS conf > LEFT OUTER JOIN v4_0_statistics_vms_resources_usage_hourly AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_0_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_0_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_0_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_0_statistics_vms_interfaces_resources_usage_hourly AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_0_statistics_vms_disks_resources_usage_hourly disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_fully_joined_statistics_vms_resources_usage_daily > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > cast(stats.minutes_in_status * 60 as integer) as vm_seconds_in_status, > stats.minutes_in_status as vm_minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > stats.max_memory_buffered_kb as max_memory_buffered_kb, > stats.max_memory_cached_kb as max_memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > cast(disk_stats.minutes_in_status * 60 as integer) as vm_disk_seconds_in_status, > disk_stats.minutes_in_status as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.max_read_latency_seconds as max_read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.max_write_latency_seconds as max_write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds, > disk_stats.max_flush_latency_seconds as max_flush_latency_seconds >FROM v4_0_configuration_history_vms AS conf > LEFT OUTER JOIN v4_0_statistics_vms_resources_usage_daily AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_0_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_0_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_0_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_0_statistics_vms_interfaces_resources_usage_daily AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_0_statistics_vms_disks_resources_usage_daily disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_users_details_history > AS >SELECT > user_id, > first_name, > last_name, > domain, > username, > department, > user_role_title, > email, > external_id, > active, > create_date, > update_date, > delete_date >FROM users_details_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_users_details > AS >SELECT > user_id, > first_name, > last_name, > domain, > username, > department, > user_role_title, > email, > external_id, > active, > create_date, > update_date, > delete_date >FROM users_details_history >WHERE delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_tags_relations_history > AS >SELECT history_id as history_id, > entity_id as entity_id, > entity_type as entity_type, > parent_id as parent_id, > attach_date as attach_date, > detach_date as detach_date >FROM tag_relations_history >WHERE entity_type in(3,2,5,18,15); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_tags_relations > AS >SELECT history_id as history_id, > entity_id as entity_id, > entity_type as entity_type, > parent_id as parent_id, > attach_date as attach_date, > detach_date as detach_date >FROM tag_relations_history >WHERE entity_type in(3,2,5,18,15) > and history_id in (SELECT max(a.history_id) FROM tag_relations_history as a GROUP BY a.entity_id, a.parent_id) > and detach_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_tags_details_history > AS >SELECT history_id as history_id, > tag_id as tag_id, > tag_name as tag_name, > tag_description as tag_description, > tag_path as tag_path, > tag_level as tag_level, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM tag_details; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_0_latest_tags_details > AS >SELECT history_id as history_id, > tag_id as tag_id, > tag_name as tag_name, > tag_description as tag_description, > tag_path as tag_path, > tag_level as tag_level, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM tag_details >WHERE history_id in (SELECT max(a.history_id) FROM tag_details as a GROUP BY a.tag_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >/************************************** > VERSIONED VIEWS (4.1) >**************************************/ >CREATE OR REPLACE VIEW v4_1_enum_translator > AS >SELECT > enum_translator.enum_type as enum_type, > enum_translator.enum_key as enum_key, > enum_translator.value as value >FROM enum_translator INNER JOIN > history_configuration ON > (enum_translator.language_code = history_configuration.var_value > and history_configuration.var_name = 'default_language'); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_configuration_history_datacenters > AS >SELECT > history_id as history_id, > datacenter_id as datacenter_id, > datacenter_name as datacenter_name, > datacenter_description as datacenter_description, > is_local_storage as is_local_storage, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM datacenter_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_configuration_datacenters > AS >SELECT > history_id as history_id, > datacenter_id as datacenter_id, > datacenter_name as datacenter_name, > datacenter_description as datacenter_description, > is_local_storage as is_local_storage, > create_date as create_date, > update_date as update_date >FROM datacenter_configuration >WHERE history_id in (SELECT max(a.history_id) FROM datacenter_configuration as a GROUP BY a.datacenter_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_map_history_datacenters_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > datacenter_id as datacenter_id, > attach_date as attach_date, > detach_date as detach_date >FROM datacenter_storage_domain_map; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_map_datacenters_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > datacenter_id as datacenter_id, > attach_date as attach_date >FROM datacenter_storage_domain_map >WHERE history_id in (SELECT max(a.history_id) FROM datacenter_storage_domain_map as a GROUP BY a.storage_domain_id, a.datacenter_id) > and detach_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_configuration_history_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > storage_domain_name as storage_domain_name, > storage_domain_type as storage_domain_type, > storage_type as storage_type, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM storage_domain_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_configuration_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > storage_domain_name as storage_domain_name, > storage_domain_type as storage_domain_type, > storage_type as storage_type, > create_date as create_date, > update_date as update_date >FROM storage_domain_configuration >WHERE history_id in (SELECT max(a.history_id) FROM storage_domain_configuration as a GROUP BY a.storage_domain_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_storage_domains_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_storage_domains_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_storage_domains_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_configuration_history_clusters > AS >SELECT > history_id as history_id, > cluster_id as cluster_id, > cluster_name as cluster_name, > cluster_description as cluster_description, > datacenter_id as datacenter_id, > cpu_name as cpu_name, > compatibility_version as compatibility_version, > datacenter_configuration_version as datacenter_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM cluster_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_configuration_clusters > AS >SELECT > history_id as history_id, > cluster_id as cluster_id, > cluster_name as cluster_name, > cluster_description as cluster_description, > datacenter_id as datacenter_id, > cpu_name as cpu_name, > compatibility_version as compatibility_version, > datacenter_configuration_version as datacenter_configuration_version, > create_date as create_date, > update_date as update_date >FROM cluster_configuration >WHERE history_id in (SELECT max(a.history_id) FROM cluster_configuration as a GROUP BY a.cluster_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_configuration_history_hosts > AS >SELECT > history_id as history_id, > host_id as host_id, > host_unique_id as host_unique_id, > host_name as host_name, > cluster_id as cluster_id, > host_type as host_type, > fqdn_or_ip as fqdn_or_ip, > memory_size_mb as memory_size_mb, > swap_size_mb as swap_size_mb, > cpu_model as cpu_model, > number_of_cores as number_of_cores, > number_of_sockets, > cpu_speed_mh, > host_os as host_os, > kernel_version as kernel_version, > kvm_version as kvm_version, > CASE SUBSTR(vdsm_version,1,3) > WHEN '4.4' THEN '2.1' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.5' THEN '2.2' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.9' THEN '2.3' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > ELSE vdsm_version > END as vdsm_version, > vdsm_port as vdsm_port, > threads_per_core as threads_per_core, > hardware_manufacturer as hardware_manufacturer, > hardware_product_name as hardware_product_name, > hardware_version as hardware_version, > hardware_serial_number as hardware_serial_number, > cluster_configuration_version as cluster_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM host_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_configuration_hosts > AS >SELECT > history_id as history_id, > host_id as host_id, > host_unique_id as host_unique_id, > host_name as host_name, > cluster_id as cluster_id, > host_type as host_type, > fqdn_or_ip as fqdn_or_ip, > memory_size_mb as memory_size_mb, > swap_size_mb as swap_size_mb, > cpu_model as cpu_model, > number_of_cores as number_of_cores, > number_of_sockets, > cpu_speed_mh, > host_os as host_os, > kernel_version as kernel_version, > kvm_version as kvm_version, > CASE SUBSTR(vdsm_version,1,3) > WHEN '4.4' THEN '2.1' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.5' THEN '2.2' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.9' THEN '2.3' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > ELSE vdsm_version > END as vdsm_version, > vdsm_port as vdsm_port, > threads_per_core as threads_per_core, > hardware_manufacturer as hardware_manufacturer, > hardware_product_name as hardware_product_name, > hardware_version as hardware_version, > hardware_serial_number as hardware_serial_number, > cluster_configuration_version as cluster_configuration_version, > create_date as create_date, > update_date as update_date >FROM host_configuration >WHERE history_id in (SELECT max(a.history_id) FROM host_configuration as a GROUP BY a.host_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_hosts_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > memory_usage_percent as memory_usage_percent, > ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > ksm_cpu_percent as ksm_cpu_percent, > active_vms as active_vms, > total_vms as total_vms, > total_vms_vcpus as total_vms_vcpus, > cpu_load as cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_hosts_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > memory_usage_percent as memory_usage_percent, > max_memory_usage as max_memory_usage, > ksm_shared_memory_mb, > max_ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > max_cpu_usage as max_cpu_usage, > ksm_cpu_percent as ksm_cpu_percent, > max_ksm_cpu_percent as max_ksm_cpu_percent, > active_vms as active_vms, > max_active_vms as max_active_vms, > total_vms as total_vms, > max_total_vms as max_total_vms, > total_vms_vcpus as total_vms_vcpus, > max_total_vms_vcpus as max_total_vms_vcpus, > cpu_load as cpu_load, > max_cpu_load as max_cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > max_system_cpu_usage_percent as max_system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > max_user_cpu_usage_percent as max_user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > max_swap_used_mb as max_swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_hosts_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > memory_usage_percent as memory_usage_percent, > max_memory_usage as max_memory_usage, > ksm_shared_memory_mb, > max_ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > max_cpu_usage as max_cpu_usage, > ksm_cpu_percent as ksm_cpu_percent, > max_ksm_cpu_percent as max_ksm_cpu_percent, > active_vms as active_vms, > max_active_vms as max_active_vms, > total_vms as total_vms, > max_total_vms as max_total_vms, > total_vms_vcpus as total_vms_vcpus, > max_total_vms_vcpus as max_total_vms_vcpus, > cpu_load as cpu_load, > max_cpu_load as max_cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > max_system_cpu_usage_percent as max_system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > max_user_cpu_usage_percent as max_user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > max_swap_used_mb as max_swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_configuration_history_hosts_interfaces > AS >SELECT > history_id as history_id, > host_interface_id as host_interface_id, > host_interface_name as host_interface_name, > host_id as host_id, > host_interface_type as host_interface_type, > host_interface_speed_bps as host_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > ip_address as ip_address, > gateway as gateway, > bond as bond, > bond_name as bond_name, > vlan_id as vlan_id, > host_configuration_version as host_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM host_interface_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_configuration_hosts_interfaces > AS >SELECT > history_id as history_id, > host_interface_id as host_interface_id, > host_interface_name as host_interface_name, > host_id as host_id, > host_interface_type as host_interface_type, > host_interface_speed_bps as host_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > ip_address as ip_address, > gateway as gateway, > bond as bond, > bond_name as bond_name, > vlan_id as vlan_id, > host_configuration_version as host_configuration_version, > create_date as create_date, > update_date as update_date >FROM host_interface_configuration >WHERE history_id in (SELECT max(a.history_id) FROM host_interface_configuration as a GROUP BY a.host_interface_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_hosts_interfaces_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_hosts_interfaces_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_hosts_interfaces_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_fully_joined_statistics_hosts_resources_usage_samples > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > stats.seconds_in_status as host_seconds_in_status, > cast(stats.seconds_in_status as numeric(7,2)) / 60 as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.active_vms as active_vms, > stats.total_vms as total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_1_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_1_statistics_hosts_resources_usage_samples AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_1_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_1_statistics_hosts_interfaces_resources_usage_samples nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_fully_joined_statistics_hosts_resources_usage_hourly > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > cast(stats.minutes_in_status * 60 as integer) as host_seconds_in_status, > stats.minutes_in_status as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.max_ksm_shared_memory_mb as max_ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.max_ksm_cpu_percent as max_ksm_cpu_percent, > stats.active_vms as active_vms, > stats.max_active_vms as max_active_vms, > stats.total_vms as total_vms, > stats.max_total_vms as max_total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.max_total_vms_vcpus as max_total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.max_cpu_load as max_cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > stats.max_swap_used_mb as max_swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_1_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_1_statistics_hosts_resources_usage_hourly AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_1_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_1_statistics_hosts_interfaces_resources_usage_hourly nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_fully_joined_statistics_hosts_resources_usage_daily > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > cast(stats.minutes_in_status * 60 as integer) as host_seconds_in_status, > stats.minutes_in_status as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.max_ksm_shared_memory_mb as max_ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.max_ksm_cpu_percent as max_ksm_cpu_percent, > stats.active_vms as active_vms, > stats.max_active_vms as max_active_vms, > stats.total_vms as total_vms, > stats.max_total_vms as max_total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.max_total_vms_vcpus as max_total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.max_cpu_load as max_cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > stats.max_swap_used_mb as max_swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_1_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_1_statistics_hosts_resources_usage_daily AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_1_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_1_statistics_hosts_interfaces_resources_usage_daily nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_configuration_history_vms > AS >SELECT > history_id as history_id, > vm_id as vm_id, > vm_name as vm_name, > vm_description as vm_description, > vm_type as vm_type, > cluster_id as cluster_id, > template_id as template_id, > template_name as template_name, > cpu_per_socket as cpu_per_socket, > number_of_sockets as number_of_sockets, > memory_size_mb as memory_size_mb, > operating_system as operating_system, > default_host as default_host, > high_availability as high_availability, > initialized as initialized, > stateless as stateless, > fail_back as fail_back, > usb_policy as usb_policy, > time_zone as time_zone, > vm_pool_id, > vm_pool_name, > created_by_user_id, > cluster_configuration_version as cluster_configuration_version, > default_host_configuration_version as default_host_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_configuration_vms > AS >SELECT > history_id as history_id, > vm_id as vm_id, > vm_name as vm_name, > vm_description as vm_description, > vm_type as vm_type, > cluster_id as cluster_id, > template_id as template_id, > template_name as template_name, > cpu_per_socket as cpu_per_socket, > number_of_sockets as number_of_sockets, > memory_size_mb as memory_size_mb, > operating_system as operating_system, > default_host as default_host, > high_availability as high_availability, > initialized as initialized, > stateless as stateless, > fail_back as fail_back, > usb_policy as usb_policy, > time_zone as time_zone, > vm_pool_id, > vm_pool_name, > created_by_user_id, > cluster_configuration_version as cluster_configuration_version, > default_host_configuration_version as default_host_configuration_version, > create_date as create_date, > update_date as update_date >FROM vm_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_configuration as a GROUP BY a.vm_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_vms_resources_usage_samples > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > a.seconds_in_status as seconds_in_status, > cast(a.seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.memory_usage_percent as memory_usage_percent, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.vm_client_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > a.user_logged_in_to_guest, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb >FROM vm_samples_history as a > LEFT OUTER JOIN vm_disks_usage_samples_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_vms_resources_usage_hourly > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > cast(a.minutes_in_status * 60 as integer) as seconds_in_status, > a.minutes_in_status as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.max_cpu_usage as max_cpu_usage, > a.memory_usage_percent as memory_usage_percent, > a.max_memory_usage as max_memory_usage, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb, > a.max_memory_buffered_kb as max_memory_buffered_kb, > a.max_memory_cached_kb as max_memory_cached_kb >FROM vm_hourly_history as a > LEFT OUTER JOIN vm_disks_usage_hourly_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_vms_resources_usage_daily > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > cast(a.minutes_in_status * 60 as integer) as seconds_in_status, > a.minutes_in_status as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.max_cpu_usage as max_cpu_usage, > a.memory_usage_percent as memory_usage_percent, > a.max_memory_usage as max_memory_usage, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb, > a.max_memory_buffered_kb as max_memory_buffered_kb, > a.max_memory_cached_kb as max_memory_cached_kb >FROM vm_daily_history as a > LEFT OUTER JOIN vm_disks_usage_daily_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_vms_users_usage_hourly > AS >SELECT history_id, > history_datetime, > user_id, > vm_id, > session_time_in_minutes, > cpu_usage_percent, > max_cpu_usage, > memory_usage_percent, > max_memory_usage, > user_cpu_usage_percent, > max_user_cpu_usage_percent, > system_cpu_usage_percent, > max_system_cpu_usage_percent, > vm_ip, > vm_client_ip, > user_logged_in_to_guest, > currently_running_on_host, > vm_configuration_version, > current_host_configuration_version >FROM statistics_vms_users_usage_hourly; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_vms_users_usage_daily > AS >SELECT history_id, > history_datetime, > user_id, > vm_id, > session_time_in_minutes, > cpu_usage_percent, > max_cpu_usage, > memory_usage_percent, > max_memory_usage, > user_cpu_usage_percent, > max_user_cpu_usage_percent, > system_cpu_usage_percent, > max_system_cpu_usage_percent, > vm_ip, > vm_client_ip, > user_logged_in_to_guest, > currently_running_on_host, > vm_configuration_version, > current_host_configuration_version >FROM statistics_vms_users_usage_daily; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_configuration_history_vms_interfaces > AS >SELECT > history_id as history_id, > vm_interface_id as vm_interface_id, > vm_interface_name as vm_interface_name, > vm_interface_type as vm_interface_type, > vm_interface_speed_bps as vm_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > vm_configuration_version as vm_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_interface_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_configuration_vms_interfaces > AS >SELECT > history_id as history_id, > vm_interface_id as vm_interface_id, > vm_interface_name as vm_interface_name, > vm_interface_type as vm_interface_type, > vm_interface_speed_bps as vm_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > vm_configuration_version as vm_configuration_version, > create_date as create_date, > update_date as update_date >FROM vm_interface_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_interface_configuration as a GROUP BY a.vm_interface_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_vms_interfaces_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_vms_interfaces_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_vms_interfaces_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_configuration_history_vms_disks > AS >SELECT > history_id as history_id, > vm_disk_id as vm_disk_id, > CASE > WHEN vm_disk_name IS NOT NULL THEN vm_disk_name > ELSE 'disk ' || cast(vm_internal_drive_mapping as varchar) > END as vm_disk_name, > vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > storage_domain_id as storage_domain_id, > vm_disk_size_mb as vm_disk_size_mb, > vm_disk_type as vm_disk_type, > vm_disk_format as vm_disk_format, > is_shared as is_shared, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_disk_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_configuration_vms_disks > AS >SELECT > history_id as history_id, > vm_disk_id as vm_disk_id, > CASE > WHEN vm_disk_name IS NOT NULL THEN vm_disk_name > ELSE 'disk ' || cast(vm_internal_drive_mapping as varchar) > END as vm_disk_name, > vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > storage_domain_id as storage_domain_id, > vm_disk_size_mb as vm_disk_size_mb, > vm_disk_type as vm_disk_type, > vm_disk_format as vm_disk_format, > is_shared as is_shared, > create_date as create_date, > update_date as update_date >FROM vm_disk_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_disk_configuration as a GROUP BY a.vm_disk_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_vms_disks_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_vms_disks_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > max_read_latency_seconds as max_read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > max_write_latency_seconds as max_write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > max_flush_latency_seconds as max_flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_statistics_vms_disks_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > max_read_latency_seconds as max_read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > max_write_latency_seconds as max_write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > max_flush_latency_seconds as max_flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_configuration_history_vms_devices > AS >SELECT > history_id as history_id, > vm_id, > device_id, > type, > address, > is_managed, > is_plugged, > is_readonly, > vm_configuration_version, > device_configuration_version, > create_date, > update_date, > delete_date >FROM vm_device_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_configuration_vms_devices > AS >SELECT > history_id as history_id, > vm_id, > device_id, > type, > address, > is_managed, > is_plugged, > is_readonly, > vm_configuration_version, > device_configuration_version, > create_date, > update_date >FROM vm_device_history >WHERE history_id in (SELECT max(a.history_id) FROM vm_device_history as a GROUP BY a.vm_id, a.device_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_fully_joined_statistics_vms_resources_usage_samples > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > stats.seconds_in_status as seconds_in_status, > cast(stats.seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.memory_usage_percent as memory_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.vm_client_ip as vm_client_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.user_logged_in_to_guest, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > disk_stats.seconds_in_status as vm_disk_seconds_in_status, > cast(disk_stats.seconds_in_status as numeric(7,2)) / 60 as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds >FROM v4_1_configuration_history_vms AS conf > LEFT OUTER JOIN v4_1_statistics_vms_resources_usage_samples AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_1_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_1_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_1_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_1_statistics_vms_interfaces_resources_usage_samples AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_1_statistics_vms_disks_resources_usage_samples disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_fully_joined_statistics_vms_resources_usage_hourly > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > cast(stats.minutes_in_status * 60 as integer) as vm_seconds_in_status, > stats.minutes_in_status as vm_minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > stats.max_memory_buffered_kb as max_memory_buffered_kb, > stats.max_memory_cached_kb as max_memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > cast(disk_stats.minutes_in_status * 60 as integer) as vm_disk_seconds_in_status, > disk_stats.minutes_in_status as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.max_read_latency_seconds as max_read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.max_write_latency_seconds as max_write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds, > disk_stats.max_flush_latency_seconds as max_flush_latency_seconds >FROM v4_1_configuration_history_vms AS conf > LEFT OUTER JOIN v4_1_statistics_vms_resources_usage_hourly AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_1_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_1_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_1_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_1_statistics_vms_interfaces_resources_usage_hourly AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_1_statistics_vms_disks_resources_usage_hourly disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_fully_joined_statistics_vms_resources_usage_daily > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > cast(stats.minutes_in_status * 60 as integer) as vm_seconds_in_status, > stats.minutes_in_status as vm_minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > stats.max_memory_buffered_kb as max_memory_buffered_kb, > stats.max_memory_cached_kb as max_memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > cast(NULL as uuid) as image_id, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > cast(disk_stats.minutes_in_status * 60 as integer) as vm_disk_seconds_in_status, > disk_stats.minutes_in_status as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.max_read_latency_seconds as max_read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.max_write_latency_seconds as max_write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds, > disk_stats.max_flush_latency_seconds as max_flush_latency_seconds >FROM v4_1_configuration_history_vms AS conf > LEFT OUTER JOIN v4_1_statistics_vms_resources_usage_daily AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_1_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_1_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_1_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_1_statistics_vms_interfaces_resources_usage_daily AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_1_statistics_vms_disks_resources_usage_daily disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_users_details_history > AS >SELECT > user_id, > first_name, > last_name, > domain, > username, > department, > user_role_title, > email, > external_id, > active, > create_date, > update_date, > delete_date >FROM users_details_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_users_details > AS >SELECT > user_id, > first_name, > last_name, > domain, > username, > department, > user_role_title, > email, > external_id, > active, > create_date, > update_date, > delete_date >FROM users_details_history >WHERE delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_tags_relations_history > AS >SELECT history_id as history_id, > entity_id as entity_id, > entity_type as entity_type, > parent_id as parent_id, > attach_date as attach_date, > detach_date as detach_date >FROM tag_relations_history >WHERE entity_type in(3,2,5,18,15); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_tags_relations > AS >SELECT history_id as history_id, > entity_id as entity_id, > entity_type as entity_type, > parent_id as parent_id, > attach_date as attach_date, > detach_date as detach_date >FROM tag_relations_history >WHERE entity_type in(3,2,5,18,15) > and history_id in (SELECT max(a.history_id) FROM tag_relations_history as a GROUP BY a.entity_id, a.parent_id) > and detach_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_tags_details_history > AS >SELECT history_id as history_id, > tag_id as tag_id, > tag_name as tag_name, > tag_description as tag_description, > tag_path as tag_path, > tag_level as tag_level, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM tag_details; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_1_latest_tags_details > AS >SELECT history_id as history_id, > tag_id as tag_id, > tag_name as tag_name, > tag_description as tag_description, > tag_path as tag_path, > tag_level as tag_level, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM tag_details >WHERE history_id in (SELECT max(a.history_id) FROM tag_details as a GROUP BY a.tag_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >/************************************** > VERSIONED VIEWS (4.2) >**************************************/ >CREATE OR REPLACE VIEW v4_2_enum_translator > AS >SELECT > enum_translator.enum_type as enum_type, > enum_translator.enum_key as enum_key, > enum_translator.value as value >FROM enum_translator INNER JOIN > history_configuration ON > (enum_translator.language_code = history_configuration.var_value > and history_configuration.var_name = 'default_language'); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_configuration_history_datacenters > AS >SELECT > history_id as history_id, > datacenter_id as datacenter_id, > datacenter_name as datacenter_name, > datacenter_description as datacenter_description, > is_local_storage as is_local_storage, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM datacenter_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_configuration_datacenters > AS >SELECT > history_id as history_id, > datacenter_id as datacenter_id, > datacenter_name as datacenter_name, > datacenter_description as datacenter_description, > is_local_storage as is_local_storage, > create_date as create_date, > update_date as update_date >FROM datacenter_configuration >WHERE history_id in (SELECT max(a.history_id) FROM datacenter_configuration as a GROUP BY a.datacenter_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_map_history_datacenters_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > datacenter_id as datacenter_id, > attach_date as attach_date, > detach_date as detach_date >FROM datacenter_storage_domain_map; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_map_datacenters_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > datacenter_id as datacenter_id, > attach_date as attach_date >FROM datacenter_storage_domain_map >WHERE history_id in (SELECT max(a.history_id) FROM datacenter_storage_domain_map as a GROUP BY a.storage_domain_id, a.datacenter_id) > and detach_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_configuration_history_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > storage_domain_name as storage_domain_name, > storage_domain_type as storage_domain_type, > storage_type as storage_type, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM storage_domain_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_configuration_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > storage_domain_name as storage_domain_name, > storage_domain_type as storage_domain_type, > storage_type as storage_type, > create_date as create_date, > update_date as update_date >FROM storage_domain_configuration >WHERE history_id in (SELECT max(a.history_id) FROM storage_domain_configuration as a GROUP BY a.storage_domain_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_storage_domains_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_storage_domains_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_storage_domains_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_configuration_history_clusters > AS >SELECT > history_id as history_id, > cluster_id as cluster_id, > cluster_name as cluster_name, > cluster_description as cluster_description, > datacenter_id as datacenter_id, > cpu_name as cpu_name, > compatibility_version as compatibility_version, > datacenter_configuration_version as datacenter_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM cluster_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_configuration_clusters > AS >SELECT > history_id as history_id, > cluster_id as cluster_id, > cluster_name as cluster_name, > cluster_description as cluster_description, > datacenter_id as datacenter_id, > cpu_name as cpu_name, > compatibility_version as compatibility_version, > datacenter_configuration_version as datacenter_configuration_version, > create_date as create_date, > update_date as update_date >FROM cluster_configuration >WHERE history_id in (SELECT max(a.history_id) FROM cluster_configuration as a GROUP BY a.cluster_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_configuration_history_hosts > AS >SELECT > history_id as history_id, > host_id as host_id, > host_unique_id as host_unique_id, > host_name as host_name, > cluster_id as cluster_id, > host_type as host_type, > fqdn_or_ip as fqdn_or_ip, > memory_size_mb as memory_size_mb, > swap_size_mb as swap_size_mb, > cpu_model as cpu_model, > number_of_cores as number_of_cores, > number_of_sockets, > cpu_speed_mh, > host_os as host_os, > kernel_version as kernel_version, > kvm_version as kvm_version, > CASE SUBSTR(vdsm_version,1,3) > WHEN '4.4' THEN '2.1' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.5' THEN '2.2' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.9' THEN '2.3' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > ELSE vdsm_version > END as vdsm_version, > vdsm_port as vdsm_port, > threads_per_core as threads_per_core, > hardware_manufacturer as hardware_manufacturer, > hardware_product_name as hardware_product_name, > hardware_version as hardware_version, > hardware_serial_number as hardware_serial_number, > cluster_configuration_version as cluster_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM host_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_configuration_hosts > AS >SELECT > history_id as history_id, > host_id as host_id, > host_unique_id as host_unique_id, > host_name as host_name, > cluster_id as cluster_id, > host_type as host_type, > fqdn_or_ip as fqdn_or_ip, > memory_size_mb as memory_size_mb, > swap_size_mb as swap_size_mb, > cpu_model as cpu_model, > number_of_cores as number_of_cores, > number_of_sockets, > cpu_speed_mh, > host_os as host_os, > kernel_version as kernel_version, > kvm_version as kvm_version, > CASE SUBSTR(vdsm_version,1,3) > WHEN '4.4' THEN '2.1' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.5' THEN '2.2' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.9' THEN '2.3' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > ELSE vdsm_version > END as vdsm_version, > vdsm_port as vdsm_port, > threads_per_core as threads_per_core, > hardware_manufacturer as hardware_manufacturer, > hardware_product_name as hardware_product_name, > hardware_version as hardware_version, > hardware_serial_number as hardware_serial_number, > cluster_configuration_version as cluster_configuration_version, > create_date as create_date, > update_date as update_date >FROM host_configuration >WHERE history_id in (SELECT max(a.history_id) FROM host_configuration as a GROUP BY a.host_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_hosts_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > memory_usage_percent as memory_usage_percent, > ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > ksm_cpu_percent as ksm_cpu_percent, > active_vms as active_vms, > total_vms as total_vms, > total_vms_vcpus as total_vms_vcpus, > cpu_load as cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_hosts_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > memory_usage_percent as memory_usage_percent, > max_memory_usage as max_memory_usage, > ksm_shared_memory_mb, > max_ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > max_cpu_usage as max_cpu_usage, > ksm_cpu_percent as ksm_cpu_percent, > max_ksm_cpu_percent as max_ksm_cpu_percent, > active_vms as active_vms, > max_active_vms as max_active_vms, > total_vms as total_vms, > max_total_vms as max_total_vms, > total_vms_vcpus as total_vms_vcpus, > max_total_vms_vcpus as max_total_vms_vcpus, > cpu_load as cpu_load, > max_cpu_load as max_cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > max_system_cpu_usage_percent as max_system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > max_user_cpu_usage_percent as max_user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > max_swap_used_mb as max_swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_hosts_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > memory_usage_percent as memory_usage_percent, > max_memory_usage as max_memory_usage, > ksm_shared_memory_mb, > max_ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > max_cpu_usage as max_cpu_usage, > ksm_cpu_percent as ksm_cpu_percent, > max_ksm_cpu_percent as max_ksm_cpu_percent, > active_vms as active_vms, > max_active_vms as max_active_vms, > total_vms as total_vms, > max_total_vms as max_total_vms, > total_vms_vcpus as total_vms_vcpus, > max_total_vms_vcpus as max_total_vms_vcpus, > cpu_load as cpu_load, > max_cpu_load as max_cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > max_system_cpu_usage_percent as max_system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > max_user_cpu_usage_percent as max_user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > max_swap_used_mb as max_swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_configuration_history_hosts_interfaces > AS >SELECT > history_id as history_id, > host_interface_id as host_interface_id, > host_interface_name as host_interface_name, > host_id as host_id, > host_interface_type as host_interface_type, > host_interface_speed_bps as host_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > ip_address as ip_address, > gateway as gateway, > bond as bond, > bond_name as bond_name, > vlan_id as vlan_id, > host_configuration_version as host_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM host_interface_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_configuration_hosts_interfaces > AS >SELECT > history_id as history_id, > host_interface_id as host_interface_id, > host_interface_name as host_interface_name, > host_id as host_id, > host_interface_type as host_interface_type, > host_interface_speed_bps as host_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > ip_address as ip_address, > gateway as gateway, > bond as bond, > bond_name as bond_name, > vlan_id as vlan_id, > host_configuration_version as host_configuration_version, > create_date as create_date, > update_date as update_date >FROM host_interface_configuration >WHERE history_id in (SELECT max(a.history_id) FROM host_interface_configuration as a GROUP BY a.host_interface_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_hosts_interfaces_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_hosts_interfaces_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_hosts_interfaces_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_fully_joined_statistics_hosts_resources_usage_samples > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > stats.seconds_in_status as host_seconds_in_status, > cast(stats.seconds_in_status as numeric(7,2)) / 60 as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.active_vms as active_vms, > stats.total_vms as total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_2_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_2_statistics_hosts_resources_usage_samples AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_2_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_2_statistics_hosts_interfaces_resources_usage_samples nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_fully_joined_statistics_hosts_resources_usage_hourly > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > cast(stats.minutes_in_status * 60 as integer) as host_seconds_in_status, > stats.minutes_in_status as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.max_ksm_shared_memory_mb as max_ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.max_ksm_cpu_percent as max_ksm_cpu_percent, > stats.active_vms as active_vms, > stats.max_active_vms as max_active_vms, > stats.total_vms as total_vms, > stats.max_total_vms as max_total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.max_total_vms_vcpus as max_total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.max_cpu_load as max_cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > stats.max_swap_used_mb as max_swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_2_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_2_statistics_hosts_resources_usage_hourly AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_2_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_2_statistics_hosts_interfaces_resources_usage_hourly nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_fully_joined_statistics_hosts_resources_usage_daily > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > cast(stats.minutes_in_status * 60 as integer) as host_seconds_in_status, > stats.minutes_in_status as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.max_ksm_shared_memory_mb as max_ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.max_ksm_cpu_percent as max_ksm_cpu_percent, > stats.active_vms as active_vms, > stats.max_active_vms as max_active_vms, > stats.total_vms as total_vms, > stats.max_total_vms as max_total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.max_total_vms_vcpus as max_total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.max_cpu_load as max_cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > stats.max_swap_used_mb as max_swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_2_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_2_statistics_hosts_resources_usage_daily AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_2_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_2_statistics_hosts_interfaces_resources_usage_daily nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_configuration_history_vms > AS >SELECT > history_id as history_id, > vm_id as vm_id, > vm_name as vm_name, > vm_description as vm_description, > vm_type as vm_type, > cluster_id as cluster_id, > template_id as template_id, > template_name as template_name, > cpu_per_socket as cpu_per_socket, > number_of_sockets as number_of_sockets, > memory_size_mb as memory_size_mb, > operating_system as operating_system, > default_host as default_host, > high_availability as high_availability, > initialized as initialized, > stateless as stateless, > fail_back as fail_back, > usb_policy as usb_policy, > time_zone as time_zone, > vm_pool_id, > vm_pool_name, > created_by_user_id, > cluster_configuration_version as cluster_configuration_version, > default_host_configuration_version as default_host_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_configuration_vms > AS >SELECT > history_id as history_id, > vm_id as vm_id, > vm_name as vm_name, > vm_description as vm_description, > vm_type as vm_type, > cluster_id as cluster_id, > template_id as template_id, > template_name as template_name, > cpu_per_socket as cpu_per_socket, > number_of_sockets as number_of_sockets, > memory_size_mb as memory_size_mb, > operating_system as operating_system, > default_host as default_host, > high_availability as high_availability, > initialized as initialized, > stateless as stateless, > fail_back as fail_back, > usb_policy as usb_policy, > time_zone as time_zone, > vm_pool_id, > vm_pool_name, > created_by_user_id, > cluster_configuration_version as cluster_configuration_version, > default_host_configuration_version as default_host_configuration_version, > create_date as create_date, > update_date as update_date >FROM vm_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_configuration as a GROUP BY a.vm_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_vms_resources_usage_samples > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > a.seconds_in_status as seconds_in_status, > cast(a.seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.memory_usage_percent as memory_usage_percent, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.vm_client_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > a.user_logged_in_to_guest, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb >FROM vm_samples_history as a > LEFT OUTER JOIN vm_disks_usage_samples_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_vms_resources_usage_hourly > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > cast(a.minutes_in_status * 60 as integer) as seconds_in_status, > a.minutes_in_status as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.max_cpu_usage as max_cpu_usage, > a.memory_usage_percent as memory_usage_percent, > a.max_memory_usage as max_memory_usage, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb, > a.max_memory_buffered_kb as max_memory_buffered_kb, > a.max_memory_cached_kb as max_memory_cached_kb >FROM vm_hourly_history as a > LEFT OUTER JOIN vm_disks_usage_hourly_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_vms_resources_usage_daily > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > cast(a.minutes_in_status * 60 as integer) as seconds_in_status, > a.minutes_in_status as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.max_cpu_usage as max_cpu_usage, > a.memory_usage_percent as memory_usage_percent, > a.max_memory_usage as max_memory_usage, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb, > a.max_memory_buffered_kb as max_memory_buffered_kb, > a.max_memory_cached_kb as max_memory_cached_kb >FROM vm_daily_history as a > LEFT OUTER JOIN vm_disks_usage_daily_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_vms_users_usage_hourly > AS >SELECT history_id, > history_datetime, > user_id, > vm_id, > session_time_in_minutes, > cpu_usage_percent, > max_cpu_usage, > memory_usage_percent, > max_memory_usage, > user_cpu_usage_percent, > max_user_cpu_usage_percent, > system_cpu_usage_percent, > max_system_cpu_usage_percent, > vm_ip, > vm_client_ip, > user_logged_in_to_guest, > currently_running_on_host, > vm_configuration_version, > current_host_configuration_version >FROM statistics_vms_users_usage_hourly; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_vms_users_usage_daily > AS >SELECT history_id, > history_datetime, > user_id, > vm_id, > session_time_in_minutes, > cpu_usage_percent, > max_cpu_usage, > memory_usage_percent, > max_memory_usage, > user_cpu_usage_percent, > max_user_cpu_usage_percent, > system_cpu_usage_percent, > max_system_cpu_usage_percent, > vm_ip, > vm_client_ip, > user_logged_in_to_guest, > currently_running_on_host, > vm_configuration_version, > current_host_configuration_version >FROM statistics_vms_users_usage_daily; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_configuration_history_vms_interfaces > AS >SELECT > history_id as history_id, > vm_interface_id as vm_interface_id, > vm_interface_name as vm_interface_name, > vm_interface_type as vm_interface_type, > vm_interface_speed_bps as vm_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > vm_configuration_version as vm_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_interface_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_configuration_vms_interfaces > AS >SELECT > history_id as history_id, > vm_interface_id as vm_interface_id, > vm_interface_name as vm_interface_name, > vm_interface_type as vm_interface_type, > vm_interface_speed_bps as vm_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > vm_configuration_version as vm_configuration_version, > create_date as create_date, > update_date as update_date >FROM vm_interface_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_interface_configuration as a GROUP BY a.vm_interface_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_vms_interfaces_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_vms_interfaces_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_vms_interfaces_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_configuration_history_vms_disks > AS >SELECT > history_id as history_id, > vm_disk_id as vm_disk_id, > CASE > WHEN vm_disk_name IS NOT NULL THEN vm_disk_name > ELSE 'disk ' || cast(vm_internal_drive_mapping as varchar) > END as vm_disk_name, > vm_disk_description as vm_disk_description, > storage_domain_id as storage_domain_id, > vm_disk_size_mb as vm_disk_size_mb, > vm_disk_type as vm_disk_type, > vm_disk_format as vm_disk_format, > is_shared as is_shared, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_disk_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_configuration_vms_disks > AS >SELECT > history_id as history_id, > vm_disk_id as vm_disk_id, > CASE > WHEN vm_disk_name IS NOT NULL THEN vm_disk_name > ELSE 'disk ' || cast(vm_internal_drive_mapping as varchar) > END as vm_disk_name, > vm_disk_description as vm_disk_description, > storage_domain_id as storage_domain_id, > vm_disk_size_mb as vm_disk_size_mb, > vm_disk_type as vm_disk_type, > vm_disk_format as vm_disk_format, > is_shared as is_shared, > create_date as create_date, > update_date as update_date >FROM vm_disk_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_disk_configuration as a GROUP BY a.vm_disk_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_vms_disks_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_vms_disks_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > max_read_latency_seconds as max_read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > max_write_latency_seconds as max_write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > max_flush_latency_seconds as max_flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_statistics_vms_disks_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > max_read_latency_seconds as max_read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > max_write_latency_seconds as max_write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > max_flush_latency_seconds as max_flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_configuration_history_vms_devices > AS >SELECT > history_id as history_id, > vm_id, > device_id, > type, > address, > is_managed, > is_plugged, > is_readonly, > vm_configuration_version, > device_configuration_version, > create_date, > update_date, > delete_date >FROM vm_device_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_configuration_vms_devices > AS >SELECT > history_id as history_id, > vm_id, > device_id, > type, > address, > is_managed, > is_plugged, > is_readonly, > vm_configuration_version, > device_configuration_version, > create_date, > update_date >FROM vm_device_history >WHERE history_id in (SELECT max(a.history_id) FROM vm_device_history as a GROUP BY a.vm_id, a.device_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_fully_joined_statistics_vms_resources_usage_samples > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > stats.seconds_in_status as seconds_in_status, > cast(stats.seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.memory_usage_percent as memory_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.vm_client_ip as vm_client_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.user_logged_in_to_guest, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > disk_stats.seconds_in_status as vm_disk_seconds_in_status, > cast(disk_stats.seconds_in_status as numeric(7,2)) / 60 as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds >FROM v4_2_configuration_history_vms AS conf > LEFT OUTER JOIN v4_2_statistics_vms_resources_usage_samples AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_2_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_2_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_2_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_2_statistics_vms_interfaces_resources_usage_samples AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_2_statistics_vms_disks_resources_usage_samples disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_fully_joined_statistics_vms_resources_usage_hourly > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > cast(stats.minutes_in_status * 60 as integer) as vm_seconds_in_status, > stats.minutes_in_status as vm_minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > stats.max_memory_buffered_kb as max_memory_buffered_kb, > stats.max_memory_cached_kb as max_memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > cast(disk_stats.minutes_in_status * 60 as integer) as vm_disk_seconds_in_status, > disk_stats.minutes_in_status as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.max_read_latency_seconds as max_read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.max_write_latency_seconds as max_write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds, > disk_stats.max_flush_latency_seconds as max_flush_latency_seconds >FROM v4_2_configuration_history_vms AS conf > LEFT OUTER JOIN v4_2_statistics_vms_resources_usage_hourly AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_2_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_2_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_2_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_2_statistics_vms_interfaces_resources_usage_hourly AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_2_statistics_vms_disks_resources_usage_hourly disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_fully_joined_statistics_vms_resources_usage_daily > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > cast(stats.minutes_in_status * 60 as integer) as vm_seconds_in_status, > stats.minutes_in_status as vm_minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > stats.max_memory_buffered_kb as max_memory_buffered_kb, > stats.max_memory_cached_kb as max_memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > cast(disk_stats.minutes_in_status * 60 as integer) as vm_disk_seconds_in_status, > disk_stats.minutes_in_status as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.max_read_latency_seconds as max_read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.max_write_latency_seconds as max_write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds, > disk_stats.max_flush_latency_seconds as max_flush_latency_seconds >FROM v4_2_configuration_history_vms AS conf > LEFT OUTER JOIN v4_2_statistics_vms_resources_usage_daily AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_2_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_2_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_2_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_2_statistics_vms_interfaces_resources_usage_daily AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_2_statistics_vms_disks_resources_usage_daily disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_users_details_history > AS >SELECT > user_id, > first_name, > last_name, > domain, > username, > department, > user_role_title, > email, > external_id, > active, > create_date, > update_date, > delete_date >FROM users_details_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_users_details > AS >SELECT > user_id, > first_name, > last_name, > domain, > username, > department, > user_role_title, > email, > external_id, > active, > create_date, > update_date, > delete_date >FROM users_details_history >WHERE delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_tags_relations_history > AS >SELECT history_id as history_id, > entity_id as entity_id, > entity_type as entity_type, > parent_id as parent_id, > attach_date as attach_date, > detach_date as detach_date >FROM tag_relations_history >WHERE entity_type in(3,2,5,18,15); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_tags_relations > AS >SELECT history_id as history_id, > entity_id as entity_id, > entity_type as entity_type, > parent_id as parent_id, > attach_date as attach_date, > detach_date as detach_date >FROM tag_relations_history >WHERE entity_type in(3,2,5,18,15) > and history_id in (SELECT max(a.history_id) FROM tag_relations_history as a GROUP BY a.entity_id, a.parent_id) > and detach_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_tags_details_history > AS >SELECT history_id as history_id, > tag_id as tag_id, > tag_name as tag_name, > tag_description as tag_description, > tag_path as tag_path, > tag_level as tag_level, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM tag_details; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_2_latest_tags_details > AS >SELECT history_id as history_id, > tag_id as tag_id, > tag_name as tag_name, > tag_description as tag_description, > tag_path as tag_path, > tag_level as tag_level, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM tag_details >WHERE history_id in (SELECT max(a.history_id) FROM tag_details as a GROUP BY a.tag_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >/************************************** > VERSIONED VIEWS (4.3) >**************************************/ >CREATE OR REPLACE VIEW v4_3_enum_translator > AS >SELECT > enum_translator.enum_type as enum_type, > enum_translator.enum_key as enum_key, > enum_translator.value as value >FROM enum_translator INNER JOIN > history_configuration ON > (enum_translator.language_code = history_configuration.var_value > and history_configuration.var_name = 'default_language'); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_configuration_history_datacenters > AS >SELECT > history_id as history_id, > datacenter_id as datacenter_id, > datacenter_name as datacenter_name, > datacenter_description as datacenter_description, > is_local_storage as is_local_storage, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM datacenter_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_configuration_datacenters > AS >SELECT > history_id as history_id, > datacenter_id as datacenter_id, > datacenter_name as datacenter_name, > datacenter_description as datacenter_description, > is_local_storage as is_local_storage, > create_date as create_date, > update_date as update_date >FROM datacenter_configuration >WHERE history_id in (SELECT max(a.history_id) FROM datacenter_configuration as a GROUP BY a.datacenter_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_map_history_datacenters_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > datacenter_id as datacenter_id, > attach_date as attach_date, > detach_date as detach_date >FROM datacenter_storage_domain_map; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_map_datacenters_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > datacenter_id as datacenter_id, > attach_date as attach_date >FROM datacenter_storage_domain_map >WHERE history_id in (SELECT max(a.history_id) FROM datacenter_storage_domain_map as a GROUP BY a.storage_domain_id, a.datacenter_id) > and detach_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_configuration_history_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > storage_domain_name as storage_domain_name, > storage_domain_type as storage_domain_type, > storage_type as storage_type, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM storage_domain_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_configuration_storage_domains > AS >SELECT > history_id as history_id, > storage_domain_id as storage_domain_id, > storage_domain_name as storage_domain_name, > storage_domain_type as storage_domain_type, > storage_type as storage_type, > create_date as create_date, > update_date as update_date >FROM storage_domain_configuration >WHERE history_id in (SELECT max(a.history_id) FROM storage_domain_configuration as a GROUP BY a.storage_domain_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_storage_domains_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_storage_domains_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_storage_domains_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > storage_domain_id as storage_domain_id, > storage_domain_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status, > available_disk_size_gb as available_disk_size_gb, > used_disk_size_gb as used_disk_size_gb, > storage_configuration_version as storage_configuration_version >FROM storage_domain_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_configuration_history_clusters > AS >SELECT > history_id as history_id, > cluster_id as cluster_id, > cluster_name as cluster_name, > cluster_description as cluster_description, > datacenter_id as datacenter_id, > cpu_name as cpu_name, > compatibility_version as compatibility_version, > datacenter_configuration_version as datacenter_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM cluster_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_configuration_clusters > AS >SELECT > history_id as history_id, > cluster_id as cluster_id, > cluster_name as cluster_name, > cluster_description as cluster_description, > datacenter_id as datacenter_id, > cpu_name as cpu_name, > compatibility_version as compatibility_version, > datacenter_configuration_version as datacenter_configuration_version, > create_date as create_date, > update_date as update_date >FROM cluster_configuration >WHERE history_id in (SELECT max(a.history_id) FROM cluster_configuration as a GROUP BY a.cluster_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_configuration_history_hosts > AS >SELECT > history_id as history_id, > host_id as host_id, > host_unique_id as host_unique_id, > host_name as host_name, > cluster_id as cluster_id, > host_type as host_type, > fqdn_or_ip as fqdn_or_ip, > memory_size_mb as memory_size_mb, > swap_size_mb as swap_size_mb, > cpu_model as cpu_model, > number_of_cores as number_of_cores, > number_of_sockets, > cpu_speed_mh, > host_os as host_os, > kernel_version as kernel_version, > kvm_version as kvm_version, > CASE SUBSTR(vdsm_version,1,3) > WHEN '4.4' THEN '2.1' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.5' THEN '2.2' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.9' THEN '2.3' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > ELSE vdsm_version > END as vdsm_version, > vdsm_port as vdsm_port, > threads_per_core as threads_per_core, > hardware_manufacturer as hardware_manufacturer, > hardware_product_name as hardware_product_name, > hardware_version as hardware_version, > hardware_serial_number as hardware_serial_number, > cluster_configuration_version as cluster_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM host_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_configuration_hosts > AS >SELECT > history_id as history_id, > host_id as host_id, > host_unique_id as host_unique_id, > host_name as host_name, > cluster_id as cluster_id, > host_type as host_type, > fqdn_or_ip as fqdn_or_ip, > memory_size_mb as memory_size_mb, > swap_size_mb as swap_size_mb, > cpu_model as cpu_model, > number_of_cores as number_of_cores, > number_of_sockets, > cpu_speed_mh, > host_os as host_os, > kernel_version as kernel_version, > kvm_version as kvm_version, > CASE SUBSTR(vdsm_version,1,3) > WHEN '4.4' THEN '2.1' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.5' THEN '2.2' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > WHEN '4.9' THEN '2.3' || SUBSTR(vdsm_version,4,LENGTH(vdsm_version)) > ELSE vdsm_version > END as vdsm_version, > vdsm_port as vdsm_port, > threads_per_core as threads_per_core, > hardware_manufacturer as hardware_manufacturer, > hardware_product_name as hardware_product_name, > hardware_version as hardware_version, > hardware_serial_number as hardware_serial_number, > cluster_configuration_version as cluster_configuration_version, > create_date as create_date, > update_date as update_date >FROM host_configuration >WHERE history_id in (SELECT max(a.history_id) FROM host_configuration as a GROUP BY a.host_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_hosts_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > memory_usage_percent as memory_usage_percent, > ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > ksm_cpu_percent as ksm_cpu_percent, > active_vms as active_vms, > total_vms as total_vms, > total_vms_vcpus as total_vms_vcpus, > cpu_load as cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_hosts_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > memory_usage_percent as memory_usage_percent, > max_memory_usage as max_memory_usage, > ksm_shared_memory_mb, > max_ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > max_cpu_usage as max_cpu_usage, > ksm_cpu_percent as ksm_cpu_percent, > max_ksm_cpu_percent as max_ksm_cpu_percent, > active_vms as active_vms, > max_active_vms as max_active_vms, > total_vms as total_vms, > max_total_vms as max_total_vms, > total_vms_vcpus as total_vms_vcpus, > max_total_vms_vcpus as max_total_vms_vcpus, > cpu_load as cpu_load, > max_cpu_load as max_cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > max_system_cpu_usage_percent as max_system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > max_user_cpu_usage_percent as max_user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > max_swap_used_mb as max_swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_hosts_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_id as host_id, > host_status as host_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > memory_usage_percent as memory_usage_percent, > max_memory_usage as max_memory_usage, > ksm_shared_memory_mb, > max_ksm_shared_memory_mb, > cpu_usage_percent as cpu_usage_percent, > max_cpu_usage as max_cpu_usage, > ksm_cpu_percent as ksm_cpu_percent, > max_ksm_cpu_percent as max_ksm_cpu_percent, > active_vms as active_vms, > max_active_vms as max_active_vms, > total_vms as total_vms, > max_total_vms as max_total_vms, > total_vms_vcpus as total_vms_vcpus, > max_total_vms_vcpus as max_total_vms_vcpus, > cpu_load as cpu_load, > max_cpu_load as max_cpu_load, > system_cpu_usage_percent as system_cpu_usage_percent, > max_system_cpu_usage_percent as max_system_cpu_usage_percent, > user_cpu_usage_percent as user_cpu_usage_percent, > max_user_cpu_usage_percent as max_user_cpu_usage_percent, > swap_used_mb as swap_used_mb, > max_swap_used_mb as max_swap_used_mb, > host_configuration_version as host_configuration_version >FROM host_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_configuration_history_hosts_interfaces > AS >SELECT > history_id as history_id, > host_interface_id as host_interface_id, > host_interface_name as host_interface_name, > host_id as host_id, > host_interface_type as host_interface_type, > host_interface_speed_bps as host_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > ip_address as ip_address, > gateway as gateway, > bond as bond, > bond_name as bond_name, > vlan_id as vlan_id, > host_configuration_version as host_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM host_interface_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_configuration_hosts_interfaces > AS >SELECT > history_id as history_id, > host_interface_id as host_interface_id, > host_interface_name as host_interface_name, > host_id as host_id, > host_interface_type as host_interface_type, > host_interface_speed_bps as host_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > ip_address as ip_address, > gateway as gateway, > bond as bond, > bond_name as bond_name, > vlan_id as vlan_id, > host_configuration_version as host_configuration_version, > create_date as create_date, > update_date as update_date >FROM host_interface_configuration >WHERE history_id in (SELECT max(a.history_id) FROM host_interface_configuration as a GROUP BY a.host_interface_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_hosts_interfaces_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_hosts_interfaces_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_hosts_interfaces_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > host_interface_id as host_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > host_interface_configuration_version as host_interface_configuration_version >FROM host_interface_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_fully_joined_statistics_hosts_resources_usage_samples > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > stats.seconds_in_status as host_seconds_in_status, > cast(stats.seconds_in_status as numeric(7,2)) / 60 as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.active_vms as active_vms, > stats.total_vms as total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_3_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_3_statistics_hosts_resources_usage_samples AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_3_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_3_statistics_hosts_interfaces_resources_usage_samples nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_fully_joined_statistics_hosts_resources_usage_hourly > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > cast(stats.minutes_in_status * 60 as integer) as host_seconds_in_status, > stats.minutes_in_status as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.max_ksm_shared_memory_mb as max_ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.max_ksm_cpu_percent as max_ksm_cpu_percent, > stats.active_vms as active_vms, > stats.max_active_vms as max_active_vms, > stats.total_vms as total_vms, > stats.max_total_vms as max_total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.max_total_vms_vcpus as max_total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.max_cpu_load as max_cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > stats.max_swap_used_mb as max_swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_3_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_3_statistics_hosts_resources_usage_hourly AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_3_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_3_statistics_hosts_interfaces_resources_usage_hourly nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_fully_joined_statistics_hosts_resources_usage_daily > AS >SELECT > conf.host_id as host_id, > conf.host_unique_id as host_unique_id, > conf.host_name as host_name, > conf.cluster_id as cluster_id, > conf.host_type as host_type, > conf.fqdn_or_ip as fqdn_or_ip, > conf.memory_size_mb as memory_size_mb, > conf.swap_size_mb as swap_size_mb, > conf.cpu_model as cpu_model, > conf.number_of_cores as number_of_cores, > conf.number_of_sockets as number_of_sockets, > conf.cpu_speed_mh as cpu_speed_mh, > conf.host_os as host_os, > conf.kernel_version as kernel_version, > conf.kvm_version as kvm_version, > conf.vdsm_version as vdsm_version, > conf.vdsm_port as vdsm_port, > conf.threads_per_core as threads_per_core, > conf.hardware_manufacturer as hardware_manufacturer, > conf.hardware_product_name as hardware_product_name, > conf.hardware_version as hardware_version, > conf.hardware_serial_number as hardware_serial_number, > conf.cluster_configuration_version as cluster_configuration_version, > conf.create_date as host_create_date, > conf.update_date as host_update_date, > conf.delete_date as host_delete_date, > stats.history_datetime as history_datetime, > stats.host_status as host_status, > cast(stats.minutes_in_status * 60 as integer) as host_seconds_in_status, > stats.minutes_in_status as host_minutes_in_status, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.ksm_shared_memory_mb ksm_shared_memory_mb, > stats.max_ksm_shared_memory_mb as max_ksm_shared_memory_mb, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.ksm_cpu_percent as ksm_cpu_percent, > stats.max_ksm_cpu_percent as max_ksm_cpu_percent, > stats.active_vms as active_vms, > stats.max_active_vms as max_active_vms, > stats.total_vms as total_vms, > stats.max_total_vms as max_total_vms, > stats.total_vms_vcpus as total_vms_vcpus, > stats.max_total_vms_vcpus as max_total_vms_vcpus, > stats.cpu_load as cpu_load, > stats.max_cpu_load as max_cpu_load, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.swap_used_mb as swap_used_mb, > stats.max_swap_used_mb as max_swap_used_mb, > nic_conf.host_interface_id as host_interface_id, > nic_conf.host_interface_name as host_interface_name, > nic_conf.host_interface_type as host_interface_type, > nic_conf.host_interface_speed_bps as host_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name, > nic_conf.ip_address as ip_address, > nic_conf.gateway as gateway, > nic_conf.bond as bond, > nic_conf.bond_name as bond_name, > nic_conf.vlan_id as vlan_id, > nic_conf.create_date as host_interface_create_date, > nic_conf.update_date as host_interface_update_date, > nic_conf.delete_date as host_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte >FROM v4_3_configuration_history_hosts AS conf > LEFT OUTER JOIN v4_3_statistics_hosts_resources_usage_daily AS stats > ON (conf.history_id = stats.host_configuration_version) > LEFT OUTER JOIN v4_3_configuration_history_hosts_interfaces nic_conf > ON (conf.history_id = nic_conf.host_configuration_version) > LEFT OUTER JOIN v4_3_statistics_hosts_interfaces_resources_usage_daily nic_stats > ON (nic_conf.history_id = nic_stats.host_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_configuration_history_vms > AS >SELECT > history_id as history_id, > vm_id as vm_id, > vm_name as vm_name, > vm_description as vm_description, > vm_type as vm_type, > cluster_id as cluster_id, > template_id as template_id, > template_name as template_name, > cpu_per_socket as cpu_per_socket, > number_of_sockets as number_of_sockets, > memory_size_mb as memory_size_mb, > operating_system as operating_system, > default_host as default_host, > high_availability as high_availability, > initialized as initialized, > stateless as stateless, > fail_back as fail_back, > usb_policy as usb_policy, > time_zone as time_zone, > vm_pool_id, > vm_pool_name, > created_by_user_id, > cluster_configuration_version as cluster_configuration_version, > default_host_configuration_version as default_host_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_configuration_vms > AS >SELECT > history_id as history_id, > vm_id as vm_id, > vm_name as vm_name, > vm_description as vm_description, > vm_type as vm_type, > cluster_id as cluster_id, > template_id as template_id, > template_name as template_name, > cpu_per_socket as cpu_per_socket, > number_of_sockets as number_of_sockets, > memory_size_mb as memory_size_mb, > operating_system as operating_system, > default_host as default_host, > high_availability as high_availability, > initialized as initialized, > stateless as stateless, > fail_back as fail_back, > usb_policy as usb_policy, > time_zone as time_zone, > vm_pool_id, > vm_pool_name, > created_by_user_id, > cluster_configuration_version as cluster_configuration_version, > default_host_configuration_version as default_host_configuration_version, > create_date as create_date, > update_date as update_date >FROM vm_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_configuration as a GROUP BY a.vm_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_vms_resources_usage_samples > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > a.seconds_in_status as seconds_in_status, > cast(a.seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.memory_usage_percent as memory_usage_percent, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.vm_client_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > a.user_logged_in_to_guest, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb >FROM vm_samples_history as a > LEFT OUTER JOIN vm_disks_usage_samples_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_vms_resources_usage_hourly > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > cast(a.minutes_in_status * 60 as integer) as seconds_in_status, > a.minutes_in_status as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.max_cpu_usage as max_cpu_usage, > a.memory_usage_percent as memory_usage_percent, > a.max_memory_usage as max_memory_usage, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb, > a.max_memory_buffered_kb as max_memory_buffered_kb, > a.max_memory_cached_kb as max_memory_cached_kb >FROM vm_hourly_history as a > LEFT OUTER JOIN vm_disks_usage_hourly_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_vms_resources_usage_daily > AS >SELECT > a.history_id as history_id, > a.history_datetime as history_datetime, > a.vm_id as vm_id, > a.vm_status as vm_status, > cast(a.minutes_in_status * 60 as integer) as seconds_in_status, > a.minutes_in_status as minutes_in_status, > a.cpu_usage_percent as cpu_usage_percent, > a.max_cpu_usage as max_cpu_usage, > a.memory_usage_percent as memory_usage_percent, > a.max_memory_usage as max_memory_usage, > a.user_cpu_usage_percent as user_cpu_usage_percent, > a.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > a.system_cpu_usage_percent as system_cpu_usage_percent, > a.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > a.vm_ip as vm_ip, > a.currently_running_on_host as currently_running_on_host, > a.current_user_id as current_user_id, > b.disks_usage as disks_usage, > a.vm_configuration_version as vm_configuration_version, > a.current_host_configuration_version as current_host_configuration_version, > a.memory_buffered_kb as memory_buffered_kb, > a.memory_cached_kb as memory_cached_kb, > a.max_memory_buffered_kb as max_memory_buffered_kb, > a.max_memory_cached_kb as max_memory_cached_kb >FROM vm_daily_history as a > LEFT OUTER JOIN vm_disks_usage_daily_history as b > ON (a.history_datetime = b.history_datetime AND a.vm_id = b.vm_id); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_vms_users_usage_hourly > AS >SELECT history_id, > history_datetime, > user_id, > vm_id, > session_time_in_minutes, > cpu_usage_percent, > max_cpu_usage, > memory_usage_percent, > max_memory_usage, > user_cpu_usage_percent, > max_user_cpu_usage_percent, > system_cpu_usage_percent, > max_system_cpu_usage_percent, > vm_ip, > vm_client_ip, > user_logged_in_to_guest, > currently_running_on_host, > vm_configuration_version, > current_host_configuration_version >FROM statistics_vms_users_usage_hourly; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_vms_users_usage_daily > AS >SELECT history_id, > history_datetime, > user_id, > vm_id, > session_time_in_minutes, > cpu_usage_percent, > max_cpu_usage, > memory_usage_percent, > max_memory_usage, > user_cpu_usage_percent, > max_user_cpu_usage_percent, > system_cpu_usage_percent, > max_system_cpu_usage_percent, > vm_ip, > vm_client_ip, > user_logged_in_to_guest, > currently_running_on_host, > vm_configuration_version, > current_host_configuration_version >FROM statistics_vms_users_usage_daily; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_configuration_history_vms_interfaces > AS >SELECT > history_id as history_id, > vm_interface_id as vm_interface_id, > vm_interface_name as vm_interface_name, > vm_interface_type as vm_interface_type, > vm_interface_speed_bps as vm_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > vm_configuration_version as vm_configuration_version, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_interface_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_configuration_vms_interfaces > AS >SELECT > history_id as history_id, > vm_interface_id as vm_interface_id, > vm_interface_name as vm_interface_name, > vm_interface_type as vm_interface_type, > vm_interface_speed_bps as vm_interface_speed_bps, > mac_address as mac_address, > logical_network_name, > vm_configuration_version as vm_configuration_version, > create_date as create_date, > update_date as update_date >FROM vm_interface_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_interface_configuration as a GROUP BY a.vm_interface_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_vms_interfaces_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_vms_interfaces_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_vms_interfaces_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_interface_id as vm_interface_id, > receive_rate_percent as receive_rate_percent, > max_receive_rate_percent as max_receive_rate_percent, > transmit_rate_percent as transmit_rate_percent, > max_transmit_rate_percent as max_transmit_rate_percent, > received_total_byte as received_total_byte, > transmitted_total_byte as transmitted_total_byte, > vm_interface_configuration_version as vm_interface_configuration_version >FROM vm_interface_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_configuration_history_vms_disks > AS >SELECT > history_id as history_id, > vm_disk_id as vm_disk_id, > CASE > WHEN vm_disk_name IS NOT NULL THEN vm_disk_name > ELSE 'disk ' || cast(vm_internal_drive_mapping as varchar) > END as vm_disk_name, > vm_disk_description as vm_disk_description, > storage_domain_id as storage_domain_id, > vm_disk_size_mb as vm_disk_size_mb, > vm_disk_type as vm_disk_type, > vm_disk_format as vm_disk_format, > is_shared as is_shared, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM vm_disk_configuration; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_configuration_vms_disks > AS >SELECT > history_id as history_id, > vm_disk_id as vm_disk_id, > CASE > WHEN vm_disk_name IS NOT NULL THEN vm_disk_name > ELSE 'disk ' || cast(vm_internal_drive_mapping as varchar) > END as vm_disk_name, > vm_disk_description as vm_disk_description, > storage_domain_id as storage_domain_id, > vm_disk_size_mb as vm_disk_size_mb, > vm_disk_type as vm_disk_type, > vm_disk_format as vm_disk_format, > is_shared as is_shared, > create_date as create_date, > update_date as update_date >FROM vm_disk_configuration >WHERE history_id in (SELECT max(a.history_id) FROM vm_disk_configuration as a GROUP BY a.vm_disk_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_vms_disks_resources_usage_samples > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > seconds_in_status as seconds_in_status, > cast(seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_samples_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_vms_disks_resources_usage_hourly > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > max_read_latency_seconds as max_read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > max_write_latency_seconds as max_write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > max_flush_latency_seconds as max_flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_hourly_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_statistics_vms_disks_resources_usage_daily > AS >SELECT > history_id as history_id, > history_datetime as history_datetime, > vm_disk_id as vm_disk_id, > vm_disk_status as vm_disk_status, > cast(minutes_in_status * 60 as integer) as seconds_in_status, > minutes_in_status as minutes_in_status, > vm_disk_actual_size_mb as vm_disk_actual_size_mb, > read_rate_bytes_per_second as read_rate_bytes_per_second, > max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > read_latency_seconds as read_latency_seconds, > max_read_latency_seconds as max_read_latency_seconds, > write_rate_bytes_per_second as write_rate_bytes_per_second, > max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > write_latency_seconds as write_latency_seconds, > max_write_latency_seconds as max_write_latency_seconds, > flush_latency_seconds as flush_latency_seconds, > max_flush_latency_seconds as max_flush_latency_seconds, > vm_disk_configuration_version as vm_disk_configuration_version >FROM vm_disk_daily_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_configuration_history_vms_devices > AS >SELECT > history_id as history_id, > vm_id, > device_id, > type, > address, > is_managed, > is_plugged, > is_readonly, > vm_configuration_version, > device_configuration_version, > create_date, > update_date, > delete_date >FROM vm_device_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_configuration_vms_devices > AS >SELECT > history_id as history_id, > vm_id, > device_id, > type, > address, > is_managed, > is_plugged, > is_readonly, > vm_configuration_version, > device_configuration_version, > create_date, > update_date >FROM vm_device_history >WHERE history_id in (SELECT max(a.history_id) FROM vm_device_history as a GROUP BY a.vm_id, a.device_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_fully_joined_statistics_vms_resources_usage_samples > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > stats.seconds_in_status as seconds_in_status, > cast(stats.seconds_in_status as numeric(7,2)) / 60 as minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.memory_usage_percent as memory_usage_percent, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.vm_client_ip as vm_client_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.user_logged_in_to_guest, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > disk_stats.seconds_in_status as vm_disk_seconds_in_status, > cast(disk_stats.seconds_in_status as numeric(7,2)) / 60 as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds >FROM v4_3_configuration_history_vms AS conf > LEFT OUTER JOIN v4_3_statistics_vms_resources_usage_samples AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_3_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_3_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_3_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_3_statistics_vms_interfaces_resources_usage_samples AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_3_statistics_vms_disks_resources_usage_samples disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_fully_joined_statistics_vms_resources_usage_hourly > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > cast(stats.minutes_in_status * 60 as integer) as vm_seconds_in_status, > stats.minutes_in_status as vm_minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > stats.max_memory_buffered_kb as max_memory_buffered_kb, > stats.max_memory_cached_kb as max_memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > cast(disk_stats.minutes_in_status * 60 as integer) as vm_disk_seconds_in_status, > disk_stats.minutes_in_status as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.max_read_latency_seconds as max_read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.max_write_latency_seconds as max_write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds, > disk_stats.max_flush_latency_seconds as max_flush_latency_seconds >FROM v4_3_configuration_history_vms AS conf > LEFT OUTER JOIN v4_3_statistics_vms_resources_usage_hourly AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_3_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_3_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_3_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_3_statistics_vms_interfaces_resources_usage_hourly AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_3_statistics_vms_disks_resources_usage_hourly disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_fully_joined_statistics_vms_resources_usage_daily > AS > SELECT > conf.vm_id as vm_id, > conf.vm_name as vm_name, > conf.vm_description as vm_description, > conf.vm_type as vm_type, > conf.cluster_id as cluster_id, > conf.template_id as template_id, > conf.template_name as template_name, > conf.cpu_per_socket as cpu_per_socket, > conf.number_of_sockets as number_of_sockets, > conf.memory_size_mb as memory_size_mb, > conf.operating_system as operating_system, > conf.default_host as default_host, > conf.high_availability as high_availability, > conf.initialized as initialized, > conf.stateless as stateless, > conf.fail_back as fail_back, > conf.usb_policy as usb_policy, > conf.time_zone as time_zone, > conf.vm_pool_id as vm_pool_id, > conf.vm_pool_name as vm_pool_name, > conf.created_by_user_id as created_by_user_id, > conf.cluster_configuration_version as cluster_configuration_version, > conf.default_host_configuration_version as default_host_configuration_version, > conf.create_date as vm_create_date, > conf.update_date as vm_update_date, > conf.delete_date as vm_delete_date, > stats.history_datetime as history_datetime, > stats.vm_status as vm_status, > cast(stats.minutes_in_status * 60 as integer) as vm_seconds_in_status, > stats.minutes_in_status as vm_minutes_in_status, > stats.cpu_usage_percent as cpu_usage_percent, > stats.max_cpu_usage as max_cpu_usage, > stats.memory_usage_percent as memory_usage_percent, > stats.max_memory_usage as max_memory_usage, > stats.user_cpu_usage_percent as user_cpu_usage_percent, > stats.max_user_cpu_usage_percent as max_user_cpu_usage_percent, > stats.system_cpu_usage_percent as system_cpu_usage_percent, > stats.max_system_cpu_usage_percent as max_system_cpu_usage_percent, > stats.vm_ip as vm_ip, > stats.currently_running_on_host as currently_running_on_host, > stats.current_user_id as current_user_id, > stats.disks_usage as disks_usage, > stats.current_host_configuration_version as current_host_configuration_version, > stats.memory_buffered_kb as memory_buffered_kb, > stats.memory_cached_kb as memory_cached_kb, > stats.max_memory_buffered_kb as max_memory_buffered_kb, > stats.max_memory_cached_kb as max_memory_cached_kb, > device_conf.device_id as device_id, > device_conf.type as device_type, > device_conf.address as address, > device_conf.is_managed as is_managed, > device_conf.is_plugged as is_plugged, > device_conf.is_readonly as is_readonly, > device_conf.create_date as device_create_date, > device_conf.update_date as device_update_date, > device_conf.delete_date as device_delete_date, > nic_conf.vm_interface_id as vm_interface_id, > nic_conf.vm_interface_name as vm_interface_name, > nic_conf.vm_interface_type as vm_interface_type, > nic_conf.vm_interface_speed_bps as vm_interface_speed_bps, > nic_conf.mac_address as mac_address, > nic_conf.logical_network_name as logical_network_name, > nic_conf.create_date as vm_interface_create_date, > nic_conf.update_date as vm_interface_update_date, > nic_conf.delete_date as vm_interface_delete_date, > nic_stats.receive_rate_percent as receive_rate_percent, > nic_stats.max_receive_rate_percent as max_receive_rate_percent, > nic_stats.transmit_rate_percent as transmit_rate_percent, > nic_stats.max_transmit_rate_percent as max_transmit_rate_percent, > nic_stats.received_total_byte as received_total_byte, > nic_stats.transmitted_total_byte as transmitted_total_byte, > disk_conf.vm_disk_id as vm_disk_id, > disk_conf.vm_disk_name as vm_disk_name, > disk_conf.vm_disk_description as vm_disk_description, > disk_conf.storage_domain_id as storage_domain_id, > disk_conf.vm_disk_size_mb as vm_disk_size_mb, > disk_conf.vm_disk_type as vm_disk_type, > disk_conf.vm_disk_format as vm_disk_format, > disk_conf.is_shared as is_shared, > disk_conf.create_date as vm_disk_create_date, > disk_conf.update_date as vm_disk_update_date, > disk_conf.delete_date as vm_disk_delete_date, > disk_stats.vm_disk_status as vm_disk_status, > cast(disk_stats.minutes_in_status * 60 as integer) as vm_disk_seconds_in_status, > disk_stats.minutes_in_status as vm_disk_minutes_in_status, > disk_stats.vm_disk_actual_size_mb as vm_disk_actual_size_mb, > disk_stats.read_rate_bytes_per_second as read_rate_bytes_per_second, > disk_stats.max_read_rate_bytes_per_second as max_read_rate_bytes_per_second, > disk_stats.read_latency_seconds as read_latency_seconds, > disk_stats.max_read_latency_seconds as max_read_latency_seconds, > disk_stats.write_rate_bytes_per_second as write_rate_bytes_per_second, > disk_stats.max_write_rate_bytes_per_second as max_write_rate_bytes_per_second, > disk_stats.write_latency_seconds as write_latency_seconds, > disk_stats.max_write_latency_seconds as max_write_latency_seconds, > disk_stats.flush_latency_seconds as flush_latency_seconds, > disk_stats.max_flush_latency_seconds as max_flush_latency_seconds >FROM v4_3_configuration_history_vms AS conf > LEFT OUTER JOIN v4_3_statistics_vms_resources_usage_daily AS stats > ON (conf.history_id = stats.vm_configuration_version) > LEFT OUTER JOIN v4_3_configuration_history_vms_devices device_conf > ON (conf.history_id = device_conf.vm_configuration_version) > LEFT OUTER JOIN v4_3_configuration_history_vms_disks disk_conf > ON (device_conf.device_configuration_version = disk_conf.history_id) > LEFT OUTER JOIN v4_3_configuration_history_vms_interfaces AS nic_conf > ON (device_conf.device_configuration_version = nic_conf.history_id AND > conf.history_id = nic_conf.vm_configuration_version) > LEFT OUTER JOIN v4_3_statistics_vms_interfaces_resources_usage_daily AS nic_stats > ON (nic_conf.history_id = nic_stats.vm_interface_configuration_version AND > stats.history_datetime = nic_stats.history_datetime) > LEFT OUTER JOIN v4_3_statistics_vms_disks_resources_usage_daily disk_stats > ON (disk_conf.history_id = disk_stats.vm_disk_configuration_version AND > stats.history_datetime = disk_stats.history_datetime); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_users_details_history > AS >SELECT > user_id, > first_name, > last_name, > domain, > username, > department, > user_role_title, > email, > external_id, > active, > create_date, > update_date, > delete_date >FROM users_details_history; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_users_details > AS >SELECT > user_id, > first_name, > last_name, > domain, > username, > department, > user_role_title, > email, > external_id, > active, > create_date, > update_date, > delete_date >FROM users_details_history >WHERE delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_tags_relations_history > AS >SELECT history_id as history_id, > entity_id as entity_id, > entity_type as entity_type, > parent_id as parent_id, > attach_date as attach_date, > detach_date as detach_date >FROM tag_relations_history >WHERE entity_type in(3,2,5,18,15); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_tags_relations > AS >SELECT history_id as history_id, > entity_id as entity_id, > entity_type as entity_type, > parent_id as parent_id, > attach_date as attach_date, > detach_date as detach_date >FROM tag_relations_history >WHERE entity_type in(3,2,5,18,15) > and history_id in (SELECT max(a.history_id) FROM tag_relations_history as a GROUP BY a.entity_id, a.parent_id) > and detach_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_tags_details_history > AS >SELECT history_id as history_id, > tag_id as tag_id, > tag_name as tag_name, > tag_description as tag_description, > tag_path as tag_path, > tag_level as tag_level, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM tag_details; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW v4_3_latest_tags_details > AS >SELECT history_id as history_id, > tag_id as tag_id, > tag_name as tag_name, > tag_description as tag_description, > tag_path as tag_path, > tag_level as tag_level, > create_date as create_date, > update_date as update_date, > delete_date as delete_date >FROM tag_details >WHERE history_id in (SELECT max(a.history_id) FROM tag_details as a GROUP BY a.tag_id) > and delete_date IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >/************************************** > INTERNAL VIEWS FOR REPORTS >**************************************/ >************************** > >********* QUERY ********** >Create or replace FUNCTION fn_db_add_column(v_table varchar(128), v_column varchar(128), v_column_def text) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (not exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_drop_column(v_table varchar(128), v_column varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > EXECUTE v_sql; > end; > end if; >end;$procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_change_column_type(v_table varchar(128), v_column varchar(128), > v_type varchar(128), v_new_type varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column and (udt_name ilike v_type or data_type ilike v_type))) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_rename_column(v_table varchar(128), v_column varchar(128), v_new_name varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_config_value(v_option_name varchar(100), v_option_value varchar(4000), > v_version varchar(40)) >returns void >AS $procedure$ >begin > if (not exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_option_value, v_version); > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_value_all_versions(v_option_name varchar(100)) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name)) then > begin > delete from vdc_options where option_name ilike v_option_name; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_value(v_option_name varchar(100), v_version text) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version in (select ID from fnSplitter(v_version)))) then > begin > delete from vdc_options where option_name ilike v_option_name and version in (select ID from fnSplitter(v_version)); > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_for_version(v_version text) >returns void >AS $procedure$ >BEGIN > delete from vdc_options where version in (select ID from fnSplitter(v_version)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_update_config_value(v_option_name varchar(100), v_option_value varchar(4000), > v_version varchar(40)) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and version = v_version; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_update_default_config_value(v_option_name varchar(100),v_default_option_value varchar(4000),v_option_value varchar(4000),v_version varchar(40),v_ignore_default_value_case boolean) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > if (v_ignore_default_value_case) > then > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and option_value ilike v_default_option_value and version = v_version; > else > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and option_value = v_default_option_value and version = v_version; > end if; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_rename_config_key(v_old_option_name varchar(100),v_new_option_name varchar(100),v_version varchar(40)) >returns void >AS $procedure$ >DECLARE > v_current_option_value varchar(4000); >begin > if (exists (select 1 from vdc_options where option_name ilike v_old_option_name and version = v_version)) then > v_current_option_value:=option_value from vdc_options where option_name ilike v_old_option_name and version = v_version; > update vdc_options set option_name = v_new_option_name, option_value = v_current_option_value > where option_name ilike v_old_option_name and version = v_version; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_create_constraint ( > v_table varchar(128), v_constraint varchar(128), v_constraint_sql text) >returns void >AS $procedure$ >begin > if NOT EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_drop_constraint ( > v_table varchar(128), v_constraint varchar(128)) >returns void >AS $procedure$ >begin > if EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION attach_user_to_su_role(v_permission_id uuid) > RETURNS void AS >$procedure$ > DECLARE > v_user_entry VARCHAR(255); > v_user_id UUID; > v_name VARCHAR(255); > v_domain VARCHAR(255); > v_user_name VARCHAR(255); > > v_document VARCHAR(64); > v_index INTEGER; >BEGIN > > select option_value INTO v_user_entry from vdc_options where option_name = 'AdUserId'; > select option_value INTO v_name from vdc_options where option_name = 'AdUserName'; > select option_value INTO v_domain from vdc_options where option_name = 'DomainName'; > > v_index := POSITION(':' IN v_user_entry); > if ( v_index <> 0 ) then > v_user_entry := substring( v_user_entry from v_index + 1 ); > v_user_id := CAST( v_user_entry AS uuid ); > end if; > > v_index := POSITION(':' IN v_name); > if ( v_index <> 0 ) then > v_name := substring( v_name from v_index + 1 ); > end if; > >-- find if name already includes domain (@) > v_index := POSITION('@' IN v_name); > > if (v_index = 0) then > v_user_name := coalesce(v_name,'') || '@' || coalesce(v_domain,''); > else > v_user_name := v_name; > end if; > > >insert into users(user_id,name,domain,username,groups,status) select v_user_id, v_name, v_domain, v_user_name,'',1 where not exists (select user_id,name,domain,username,groups,status from users where user_id = v_user_id and name = v_name and domain = v_domain and username = v_user_name and groups = '' and status = 1); > >insert into permissions(id,role_id,ad_element_id,object_id,object_type_id) select v_permission_id, '00000000-0000-0000-0000-000000000001', v_user_id, getGlobalIds('system'), 1 where not exists(select role_id,ad_element_id,object_id,object_type_id from permissions where role_id = '00000000-0000-0000-0000-000000000001' and ad_element_id = v_user_id and object_id= getGlobalIds('system') and object_type_id = 1); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION CheckDBConnection() RETURNS SETOF integer IMMUTABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_functions_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' from pg_proc inner join pg_namespace ns on (pg_proc.pronamespace=ns.oid) where ns.nspname = 'public' and proname not ilike 'uuid%' order by proname; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_views_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP VIEW if exists ' || table_name || ' CASCADE;' from information_schema.views where table_schema = 'public' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_tables_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP TABLE if exists ' || table_name || ' CASCADE;' from information_schema.tables where table_schema = 'public' and table_type = 'BASE TABLE' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_seq_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP SEQUENCE if exists ' || sequence_name || ' CASCADE;' from information_schema.sequences where sequence_schema = 'public' order by sequence_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_user_types_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, pg_class c, pg_type t > WHERE n.oid = c.relnamespace and t.typrelid = c.oid and c.relkind = 'c'::"char" and > n.nspname = 'public' > ORDER BY c.relname::information_schema.sql_identifier; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_get_column_size( v_table varchar(64), v_column varchar(64)) returns integer STABLE > AS $procedure$ > declare > retvalue integer; >BEGIN > retvalue := character_maximum_length from information_schema.columns > where > table_name ilike v_table and column_name ilike v_column and > table_schema = 'public' and udt_name in ('char','varchar'); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION attach_user_to_su_role(v_permission_id uuid, v_user_id VARCHAR(255), v_name VARCHAR(255), v_domain VARCHAR(255)) > RETURNS void AS >$BODY$ > DECLARE > v_user_name VARCHAR(255); > v_document VARCHAR(64); > v_index INTEGER; > input_uuid uuid; >BEGIN > input_uuid = CAST( v_user_id AS uuid ); >-- find if name already includes domain (@) > v_index := POSITION('@' IN v_name); > > if (v_index = 0) then > v_user_name := coalesce(v_name,'') || '@' || coalesce(v_domain,''); > else > v_user_name := v_name; > end if; > > >insert into users(user_id,name,domain,username,groups,status) select input_uuid, v_name, v_domain, v_user_name,'',1 where not exists (select user_id,name,domain,username,groups,status from users where user_id = input_uuid); > >insert into permissions(id,role_id,ad_element_id,object_id,object_type_id) select v_permission_id, '00000000-0000-0000-0000-000000000001', input_uuid, getGlobalIds('system'), 1 where not exists(select role_id,ad_element_id,object_id,object_type_id from permissions where role_id = '00000000-0000-0000-0000-000000000001' and ad_element_id = input_uuid and object_id= getGlobalIds('system') and object_type_id = 1); >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_action_group_to_role(v_role_id UUID, v_action_group_id INTEGER) >RETURNS VOID >AS $procedure$ >BEGIN > INSERT INTO roles_groups(role_id,action_group_id) > SELECT v_role_id, v_action_group_id > WHERE NOT EXISTS (SELECT 1 > FROM roles_groups > WHERE role_id = v_role_id > AND action_group_id = v_action_group_id); >RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_split_config_value(v_option_name character varying, v_old_option_value character varying, v_new_option_value character varying, v_update_from_version character varying) > RETURNS void AS >$BODY$ >declare >v_old_value varchar(4000); >v_cur cursor for select distinct version from vdc_options where version <> 'general' order by version; >v_version varchar(40); >v_index integer; >v_count integer; >v_total_count integer; >v_version_count integer; >begin > v_total_count := count(version) from vdc_options where option_name = v_option_name; > v_old_value := option_value from vdc_options where option_name = v_option_name and version = 'general'; > v_version_count := count(distinct version) from vdc_options where version <> 'general'; > if (v_total_count <= v_version_count) then > begin > if (v_old_value IS NULL) then > v_old_value := v_old_option_value; > end if; > v_count := count(distinct version) from vdc_options where version <> 'general'; > v_index := 1; > open v_cur; > loop > fetch v_cur into v_version; > exit when not found; > -- We shouldn't update if already exists > if (not exists (select 1 from vdc_options where option_name = v_option_name and version = v_version)) then > -- Might not work well for versions such as 3.10, but we currently don't have any > if (v_version >= v_update_from_version) then > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_new_option_value, v_version); > else > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_old_value, v_version); > end if; > end if; > v_index := v_index +1; > end loop; > close v_cur; > delete from vdc_options where option_name = v_option_name and version = 'general'; > end; > end if; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_grant_action_group_to_all_roles_filter(v_action_group_id integer, uuid[]) > RETURNS void AS >$BODY$ >declare >v_role_id_to_filter alias for $2; >begin > insert into roles_groups (role_id, action_group_id) > select distinct role_id, v_action_group_id > from roles_groups rg > where not ARRAY [role_id] <@ v_role_id_to_filter and not exists (select 1 from roles_groups where role_id = rg.role_id and action_group_id = v_action_group_id); >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object(v_object regclass) RETURNS setof record as >$BODY$ >DECLARE > v_sql TEXT; > v_table record; > v_table_name TEXT; > temprec record; >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > select c.relname, n.nspname INTO v_table > FROM pg_class c join pg_namespace n on c.relnamespace = n.oid WHERE c.oid = v_object; > -- try to get filtered query syntax from previous execution > if exists (select 1 from object_column_white_list_sql where object_name = v_table.relname) then > select sql into v_sql from object_column_white_list_sql where object_name = v_table.relname; > else > v_table_name := quote_ident( v_table.nspname ) || '.' || quote_ident( v_table.relname ); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > for temprec in select a.attname, t.typname > FROM pg_attribute a join pg_type t on a.atttypid = t.oid > WHERE a.attrelid = v_object AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum > loop > v_sql := coalesce( v_sql || ', ', 'SELECT ' ); > if exists(select 1 from object_column_white_list > where object_name = v_table.relname and column_name = temprec.attname) then > v_sql := v_sql || quote_ident( temprec.attname ); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident( temprec.typname ) || ' as ' || quote_ident( temprec.attname ); > END IF; > END LOOP; > v_sql := v_sql || ' FROM ' || v_table_name; > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > -- save generated query for further use > insert into object_column_white_list_sql(object_name,sql) values (v_table.relname, v_sql); > end if; > RETURN QUERY EXECUTE v_sql; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_column_to_object_white_list(v_object_name varchar(128), v_column_name varchar(128)) >returns void >AS $procedure$ >begin > if (not exists (select 1 from object_column_white_list > where object_name = v_object_name and column_name = v_column_name)) then > begin > -- verify that there is such object in db > if exists (select 1 from information_schema.columns > where table_name = v_object_name and column_name = v_column_name) then > insert into object_column_white_list (object_name, column_name) values (v_object_name, v_column_name); > end if; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_disk(v_id UUID) >returns void >AS $procedure$ >declare > OK integer; > LOCKED integer; >begin > OK:=1; > LOCKED:=2; > update images set imagestatus = OK where imagestatus = LOCKED and > image_group_id in (select device_id from vm_device where device_id = v_id and is_plugged); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_snapshot(v_id UUID) >returns void >AS $procedure$ >declare > OK varchar; > LOCKED varchar; >begin > OK:='OK'; > LOCKED:='LOCKED'; > update snapshots set status = OK where status = LOCKED and snapshot_id = v_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_entity(v_object_type varchar(10), v_name varchar(255), v_recursive boolean) >returns void >AS $procedure$ >declare > DOWN integer; > OK integer; > LOCKED integer; > TEMPLATE_OK integer; > TEMPLATE_LOCKED integer; > IMAGE_LOCKED integer; > SNAPSHOT_OK varchar; > SNAPSHOT_LOCKED varchar; > v_id UUID; >begin > DOWN:=0; > OK:=1; > LOCKED:=2; > TEMPLATE_OK:=0; > TEMPLATE_LOCKED:=1; > IMAGE_LOCKED:=15; > SNAPSHOT_OK:='OK'; > SNAPSHOT_LOCKED:='LOCKED'; > v_id := vm_guid from vm_static where vm_name = v_name and entity_type ilike v_object_type; > -- set VM status to DOWN > if (v_object_type = 'vm') then > update vm_dynamic set status = DOWN where status = IMAGE_LOCKED and vm_guid = v_id; > -- set Template status to OK > else > if (v_object_type = 'template') then > update vm_static set template_status = TEMPLATE_OK where template_status = TEMPLATE_LOCKED and vm_guid = v_id; > end if; > end if; > --unlock images and snapshots if recursive flag is set > if (v_recursive) then > update images set imagestatus = OK where imagestatus = LOCKED and > image_group_id in (select device_id from vm_device where vm_id = v_id and is_plugged); > > update snapshots set status = SNAPSHOT_OK where status ilike SNAPSHOT_LOCKED and vm_id = v_id; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/* Displays DC id , DC name, SPM Host id , SPM Host name and number of async tasks awaiting. > >1) create a record type with DC name, DC id, SPM host id, SPM host name, count > >2) get all distinct DC ids from async_tasks table > >3) Run a cursor for each result in 2) > > a) get DC name > b) get SPM Host id & name if available > c) get count of tasks > > return current record > >4) return set of generated records >*/ >DROP TYPE IF EXISTS async_tasks_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE async_tasks_info_rs AS ( > dc_id UUID, dc_name CHARACTER VARYING, spm_host_id UUID, spm_host_name CHARACTER VARYING, task_count integer); >************************** > >CREATE TYPE >********* QUERY ********** >create or replace FUNCTION fn_db_get_async_tasks() >returns SETOF async_tasks_info_rs STABLE >AS $procedure$ >DECLARE > v_record async_tasks_info_rs; > > -- selects storage_pool_id uuid found in async_tasks > v_tasks_cursor cursor for select distinct storage_pool_id from async_tasks; >begin > > OPEN v_tasks_cursor; > FETCH v_tasks_cursor into v_record.dc_id; > WHILE FOUND LOOP > -- get dc_name and SPM Host id > v_record.dc_name := name from storage_pool where id = v_record.dc_id; > v_record.spm_host_id := > spm_vds_id from storage_pool where id = v_record.dc_id; > -- get Host name if we have non NULL SPM Host > if (v_record.spm_host_id IS NOT NULL) then > v_record.spm_host_name := > vds_name from vds_static where vds_id = v_record.spm_host_id; > else > v_record.spm_host_name:=''; > end if; > -- get tasks count for this DC > v_record.task_count := count(*) from async_tasks > where position (cast(v_record.dc_id as varchar) in action_parameters) > 0; > -- return the record > RETURN NEXT v_record; > FETCH v_tasks_cursor into v_record.dc_id; > END LOOP; > CLOSE v_tasks_cursor; > -- return full set of generated records > RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_add_column(v_table varchar(128), v_column varchar(128), v_column_def text) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (not exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_drop_column(v_table varchar(128), v_column varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > EXECUTE v_sql; > end; > end if; >end;$procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_change_column_type(v_table varchar(128), v_column varchar(128), > v_type varchar(128), v_new_type varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column and (udt_name ilike v_type or data_type ilike v_type))) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_rename_column(v_table varchar(128), v_column varchar(128), v_new_name varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_config_value(v_option_name varchar(100), v_option_value varchar(4000), > v_version varchar(40)) >returns void >AS $procedure$ >begin > if (not exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_option_value, v_version); > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_value_all_versions(v_option_name varchar(100)) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name)) then > begin > delete from vdc_options where option_name ilike v_option_name; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_value(v_option_name varchar(100), v_version text) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version in (select ID from fnSplitter(v_version)))) then > begin > delete from vdc_options where option_name ilike v_option_name and version in (select ID from fnSplitter(v_version)); > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_delete_config_for_version(v_version text) >returns void >AS $procedure$ >BEGIN > delete from vdc_options where version in (select ID from fnSplitter(v_version)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_update_config_value(v_option_name varchar(100), v_option_value varchar(4000), > v_version varchar(40)) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and version = v_version; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_update_default_config_value(v_option_name varchar(100),v_default_option_value varchar(4000),v_option_value varchar(4000),v_version varchar(40),v_ignore_default_value_case boolean) >returns void >AS $procedure$ >begin > if (exists (select 1 from vdc_options where option_name ilike v_option_name and version = v_version)) then > begin > if (v_ignore_default_value_case) > then > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and option_value ilike v_default_option_value and version = v_version; > else > update vdc_options set option_value = v_option_value > where option_name ilike v_option_name and option_value = v_default_option_value and version = v_version; > end if; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_rename_config_key(v_old_option_name varchar(100),v_new_option_name varchar(100),v_version varchar(40)) >returns void >AS $procedure$ >DECLARE > v_current_option_value varchar(4000); >begin > if (exists (select 1 from vdc_options where option_name ilike v_old_option_name and version = v_version)) then > v_current_option_value:=option_value from vdc_options where option_name ilike v_old_option_name and version = v_version; > update vdc_options set option_name = v_new_option_name, option_value = v_current_option_value > where option_name ilike v_old_option_name and version = v_version; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_create_constraint ( > v_table varchar(128), v_constraint varchar(128), v_constraint_sql text) >returns void >AS $procedure$ >begin > if NOT EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_drop_constraint ( > v_table varchar(128), v_constraint varchar(128)) >returns void >AS $procedure$ >begin > if EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION attach_user_to_su_role(v_permission_id uuid) > RETURNS void AS >$procedure$ > DECLARE > v_user_entry VARCHAR(255); > v_user_id UUID; > v_name VARCHAR(255); > v_domain VARCHAR(255); > v_user_name VARCHAR(255); > > v_document VARCHAR(64); > v_index INTEGER; >BEGIN > > select option_value INTO v_user_entry from vdc_options where option_name = 'AdUserId'; > select option_value INTO v_name from vdc_options where option_name = 'AdUserName'; > select option_value INTO v_domain from vdc_options where option_name = 'DomainName'; > > v_index := POSITION(':' IN v_user_entry); > if ( v_index <> 0 ) then > v_user_entry := substring( v_user_entry from v_index + 1 ); > v_user_id := CAST( v_user_entry AS uuid ); > end if; > > v_index := POSITION(':' IN v_name); > if ( v_index <> 0 ) then > v_name := substring( v_name from v_index + 1 ); > end if; > >-- find if name already includes domain (@) > v_index := POSITION('@' IN v_name); > > if (v_index = 0) then > v_user_name := coalesce(v_name,'') || '@' || coalesce(v_domain,''); > else > v_user_name := v_name; > end if; > > >insert into users(user_id,name,domain,username,groups,status) select v_user_id, v_name, v_domain, v_user_name,'',1 where not exists (select user_id,name,domain,username,groups,status from users where user_id = v_user_id and name = v_name and domain = v_domain and username = v_user_name and groups = '' and status = 1); > >insert into permissions(id,role_id,ad_element_id,object_id,object_type_id) select v_permission_id, '00000000-0000-0000-0000-000000000001', v_user_id, getGlobalIds('system'), 1 where not exists(select role_id,ad_element_id,object_id,object_type_id from permissions where role_id = '00000000-0000-0000-0000-000000000001' and ad_element_id = v_user_id and object_id= getGlobalIds('system') and object_type_id = 1); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION CheckDBConnection() RETURNS SETOF integer IMMUTABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_functions_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' from pg_proc inner join pg_namespace ns on (pg_proc.pronamespace=ns.oid) where ns.nspname = 'public' and proname not ilike 'uuid%' order by proname; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_views_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP VIEW if exists ' || table_name || ' CASCADE;' from information_schema.views where table_schema = 'public' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_tables_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP TABLE if exists ' || table_name || ' CASCADE;' from information_schema.tables where table_schema = 'public' and table_type = 'BASE TABLE' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_seq_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP SEQUENCE if exists ' || sequence_name || ' CASCADE;' from information_schema.sequences where sequence_schema = 'public' order by sequence_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_user_types_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, pg_class c, pg_type t > WHERE n.oid = c.relnamespace and t.typrelid = c.oid and c.relkind = 'c'::"char" and > n.nspname = 'public' > ORDER BY c.relname::information_schema.sql_identifier; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_get_column_size( v_table varchar(64), v_column varchar(64)) returns integer STABLE > AS $procedure$ > declare > retvalue integer; >BEGIN > retvalue := character_maximum_length from information_schema.columns > where > table_name ilike v_table and column_name ilike v_column and > table_schema = 'public' and udt_name in ('char','varchar'); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION attach_user_to_su_role(v_permission_id uuid, v_user_id VARCHAR(255), v_name VARCHAR(255), v_domain VARCHAR(255)) > RETURNS void AS >$BODY$ > DECLARE > v_user_name VARCHAR(255); > v_document VARCHAR(64); > v_index INTEGER; > input_uuid uuid; >BEGIN > input_uuid = CAST( v_user_id AS uuid ); >-- find if name already includes domain (@) > v_index := POSITION('@' IN v_name); > > if (v_index = 0) then > v_user_name := coalesce(v_name,'') || '@' || coalesce(v_domain,''); > else > v_user_name := v_name; > end if; > > >insert into users(user_id,name,domain,username,groups,status) select input_uuid, v_name, v_domain, v_user_name,'',1 where not exists (select user_id,name,domain,username,groups,status from users where user_id = input_uuid); > >insert into permissions(id,role_id,ad_element_id,object_id,object_type_id) select v_permission_id, '00000000-0000-0000-0000-000000000001', input_uuid, getGlobalIds('system'), 1 where not exists(select role_id,ad_element_id,object_id,object_type_id from permissions where role_id = '00000000-0000-0000-0000-000000000001' and ad_element_id = input_uuid and object_id= getGlobalIds('system') and object_type_id = 1); >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_action_group_to_role(v_role_id UUID, v_action_group_id INTEGER) >RETURNS VOID >AS $procedure$ >BEGIN > INSERT INTO roles_groups(role_id,action_group_id) > SELECT v_role_id, v_action_group_id > WHERE NOT EXISTS (SELECT 1 > FROM roles_groups > WHERE role_id = v_role_id > AND action_group_id = v_action_group_id); >RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_split_config_value(v_option_name character varying, v_old_option_value character varying, v_new_option_value character varying, v_update_from_version character varying) > RETURNS void AS >$BODY$ >declare >v_old_value varchar(4000); >v_cur cursor for select distinct version from vdc_options where version <> 'general' order by version; >v_version varchar(40); >v_index integer; >v_count integer; >v_total_count integer; >v_version_count integer; >begin > v_total_count := count(version) from vdc_options where option_name = v_option_name; > v_old_value := option_value from vdc_options where option_name = v_option_name and version = 'general'; > v_version_count := count(distinct version) from vdc_options where version <> 'general'; > if (v_total_count <= v_version_count) then > begin > if (v_old_value IS NULL) then > v_old_value := v_old_option_value; > end if; > v_count := count(distinct version) from vdc_options where version <> 'general'; > v_index := 1; > open v_cur; > loop > fetch v_cur into v_version; > exit when not found; > -- We shouldn't update if already exists > if (not exists (select 1 from vdc_options where option_name = v_option_name and version = v_version)) then > -- Might not work well for versions such as 3.10, but we currently don't have any > if (v_version >= v_update_from_version) then > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_new_option_value, v_version); > else > insert into vdc_options (option_name, option_value, version) values (v_option_name, v_old_value, v_version); > end if; > end if; > v_index := v_index +1; > end loop; > close v_cur; > delete from vdc_options where option_name = v_option_name and version = 'general'; > end; > end if; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_grant_action_group_to_all_roles_filter(v_action_group_id integer, uuid[]) > RETURNS void AS >$BODY$ >declare >v_role_id_to_filter alias for $2; >begin > insert into roles_groups (role_id, action_group_id) > select distinct role_id, v_action_group_id > from roles_groups rg > where not ARRAY [role_id] <@ v_role_id_to_filter and not exists (select 1 from roles_groups where role_id = rg.role_id and action_group_id = v_action_group_id); >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object(v_object regclass) RETURNS setof record as >$BODY$ >DECLARE > v_sql TEXT; > v_table record; > v_table_name TEXT; > temprec record; >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > select c.relname, n.nspname INTO v_table > FROM pg_class c join pg_namespace n on c.relnamespace = n.oid WHERE c.oid = v_object; > -- try to get filtered query syntax from previous execution > if exists (select 1 from object_column_white_list_sql where object_name = v_table.relname) then > select sql into v_sql from object_column_white_list_sql where object_name = v_table.relname; > else > v_table_name := quote_ident( v_table.nspname ) || '.' || quote_ident( v_table.relname ); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > for temprec in select a.attname, t.typname > FROM pg_attribute a join pg_type t on a.atttypid = t.oid > WHERE a.attrelid = v_object AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum > loop > v_sql := coalesce( v_sql || ', ', 'SELECT ' ); > if exists(select 1 from object_column_white_list > where object_name = v_table.relname and column_name = temprec.attname) then > v_sql := v_sql || quote_ident( temprec.attname ); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident( temprec.typname ) || ' as ' || quote_ident( temprec.attname ); > END IF; > END LOOP; > v_sql := v_sql || ' FROM ' || v_table_name; > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > -- save generated query for further use > insert into object_column_white_list_sql(object_name,sql) values (v_table.relname, v_sql); > end if; > RETURN QUERY EXECUTE v_sql; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_column_to_object_white_list(v_object_name varchar(128), v_column_name varchar(128)) >returns void >AS $procedure$ >begin > if (not exists (select 1 from object_column_white_list > where object_name = v_object_name and column_name = v_column_name)) then > begin > -- verify that there is such object in db > if exists (select 1 from information_schema.columns > where table_name = v_object_name and column_name = v_column_name) then > insert into object_column_white_list (object_name, column_name) values (v_object_name, v_column_name); > end if; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_disk(v_id UUID) >returns void >AS $procedure$ >declare > OK integer; > LOCKED integer; >begin > OK:=1; > LOCKED:=2; > update images set imagestatus = OK where imagestatus = LOCKED and > image_group_id in (select device_id from vm_device where device_id = v_id and is_plugged); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_snapshot(v_id UUID) >returns void >AS $procedure$ >declare > OK varchar; > LOCKED varchar; >begin > OK:='OK'; > LOCKED:='LOCKED'; > update snapshots set status = OK where status = LOCKED and snapshot_id = v_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_unlock_entity(v_object_type varchar(10), v_name varchar(255), v_recursive boolean) >returns void >AS $procedure$ >declare > DOWN integer; > OK integer; > LOCKED integer; > TEMPLATE_OK integer; > TEMPLATE_LOCKED integer; > IMAGE_LOCKED integer; > SNAPSHOT_OK varchar; > SNAPSHOT_LOCKED varchar; > v_id UUID; >begin > DOWN:=0; > OK:=1; > LOCKED:=2; > TEMPLATE_OK:=0; > TEMPLATE_LOCKED:=1; > IMAGE_LOCKED:=15; > SNAPSHOT_OK:='OK'; > SNAPSHOT_LOCKED:='LOCKED'; > v_id := vm_guid from vm_static where vm_name = v_name and entity_type ilike v_object_type; > -- set VM status to DOWN > if (v_object_type = 'vm') then > update vm_dynamic set status = DOWN where status = IMAGE_LOCKED and vm_guid = v_id; > -- set Template status to OK > else > if (v_object_type = 'template') then > update vm_static set template_status = TEMPLATE_OK where template_status = TEMPLATE_LOCKED and vm_guid = v_id; > end if; > end if; > --unlock images and snapshots if recursive flag is set > if (v_recursive) then > update images set imagestatus = OK where imagestatus = LOCKED and > image_group_id in (select device_id from vm_device where vm_id = v_id and is_plugged); > > update snapshots set status = SNAPSHOT_OK where status ilike SNAPSHOT_LOCKED and vm_id = v_id; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/* Displays DC id , DC name, SPM Host id , SPM Host name and number of async tasks awaiting. > >1) create a record type with DC name, DC id, SPM host id, SPM host name, count > >2) get all distinct DC ids from async_tasks table > >3) Run a cursor for each result in 2) > > a) get DC name > b) get SPM Host id & name if available > c) get count of tasks > > return current record > >4) return set of generated records >*/ >DROP TYPE IF EXISTS async_tasks_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE async_tasks_info_rs AS ( > dc_id UUID, dc_name CHARACTER VARYING, spm_host_id UUID, spm_host_name CHARACTER VARYING, task_count integer); >************************** > >CREATE TYPE >********* QUERY ********** >create or replace FUNCTION fn_db_get_async_tasks() >returns SETOF async_tasks_info_rs STABLE >AS $procedure$ >DECLARE > v_record async_tasks_info_rs; > > -- selects storage_pool_id uuid found in async_tasks > v_tasks_cursor cursor for select distinct storage_pool_id from async_tasks; >begin > > OPEN v_tasks_cursor; > FETCH v_tasks_cursor into v_record.dc_id; > WHILE FOUND LOOP > -- get dc_name and SPM Host id > v_record.dc_name := name from storage_pool where id = v_record.dc_id; > v_record.spm_host_id := > spm_vds_id from storage_pool where id = v_record.dc_id; > -- get Host name if we have non NULL SPM Host > if (v_record.spm_host_id IS NOT NULL) then > v_record.spm_host_name := > vds_name from vds_static where vds_id = v_record.spm_host_id; > else > v_record.spm_host_name:=''; > end if; > -- get tasks count for this DC > v_record.task_count := count(*) from async_tasks > where position (cast(v_record.dc_id as varchar) in action_parameters) > 0; > -- return the record > RETURN NEXT v_record; > FETCH v_tasks_cursor into v_record.dc_id; > END LOOP; > CLOSE v_tasks_cursor; > -- return full set of generated records > RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DELETE FROM enum_translator >WHERE language_code = 'us-en'; >************************** > >DELETE 0 >********* QUERY ********** >DELETE FROM enum_translator >WHERE language_code = 'zh-CN'; >************************** > >DELETE 0 >********* QUERY ********** >DELETE FROM enum_translator >WHERE language_code = 'pt-BR'; >************************** > >DELETE 0 >********* QUERY ********** > >************************** > >2019-02-26 17:06:34,750+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema plugin.executeRaw:863 execute-result: ['/usr/share/ovirt-engine-dwh/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'ovirt_engine_history', '-d', 'ovirt_engine_history', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'], rc=0 >2019-02-26 17:06:34,751+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema plugin.execute:921 execute-output: ['/usr/share/ovirt-engine-dwh/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'ovirt_engine_history', '-d', 'ovirt_engine_history', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'] stdout: >Creating schema ovirt_engine_history@localhost:5432/ovirt_engine_history >Saving custom users permissions on database objects... >upgrade script detected a change in Config, View or Stored Procedure... >Running upgrade sql script '/usr/share/ovirt-engine-dwh/dbscripts/upgrade/pre_upgrade/add_comment_col_to_schema_version.sql'... >Running upgrade sql script '/usr/share/ovirt-engine-dwh/dbscripts/upgrade/pre_upgrade/add_function_to_update_enum_table.sql'... >Running upgrade sql script '/usr/share/ovirt-engine-dwh/dbscripts/upgrade/pre_upgrade/changed_len_of_installed_by.sql'... >Running upgrade sql script '/usr/share/ovirt-engine-dwh/dbscripts/upgrade/pre_upgrade/set_default_lang_code.sql'... >Running upgrade sql script '/usr/share/ovirt-engine-dwh/dbscripts/upgrade/pre_upgrade/set_etl_minimal_version.sql'... >Creating views API 3.6... >Creating views API 4.0... >Creating views API 4.1... >Creating views API 4.2... >Creating ovirt engine reports views... >Creating ovirt engine reports views... >Creating stored procedures... >Creating stored procedures from /usr/share/ovirt-engine-dwh/dbscripts/common_sp.sql... >Creating stored procedures from /usr/share/ovirt-engine-dwh/dbscripts/create_sp.sql... >Running upgrade sql script '/usr/share/ovirt-engine-dwh/dbscripts/upgrade/post_upgrade/0010_change_enum_lang_code.sql'... >Applying custom users permissions on database objects... > >2019-02-26 17:06:34,751+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema plugin.execute:926 execute-output: ['/usr/share/ovirt-engine-dwh/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'ovirt_engine_history', '-d', 'ovirt_engine_history', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'] stderr: > > >2019-02-26 17:06:34,754+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._check_separate >2019-02-26 17:06:34,754+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config config._check_separate:193 Configuring Image I/O Proxy >2019-02-26 17:06:34,756+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._misc_VDC >2019-02-26 17:06:34,756+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:34,758+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._misc_pki >2019-02-26 17:06:34,758+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:34,761+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.pki.Plugin._miscPKIEngine >2019-02-26 17:06:34,761+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:34,763+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.pki.Plugin._miscPKIProxy >2019-02-26 17:06:34,763+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:34,765+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._check_separate >2019-02-26 17:06:34,765+0100 INFO otopi.plugins.ovirt_engine_setup.websocket_proxy.config config._check_separate:191 Configuring WebSocket Proxy >2019-02-26 17:06:34,767+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._misc_VDC >2019-02-26 17:06:34,767+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:34,769+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._misc_pki >2019-02-26 17:06:34,769+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:34,771+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.cinderlib.config.database.Plugin._misc >2019-02-26 17:06:34,772+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:34,774+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.cinderlib.config.misc.Plugin._misc >2019-02-26 17:06:34,774+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-cinderlib.conf'' >2019-02-26 17:06:34,774+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/engine.conf.d/10-setup-cinderlib.conf' exists >2019-02-26 17:06:34,774+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/engine.conf.d/10-setup-cinderlib.conf' already has content >2019-02-26 17:06:34,776+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.cinderlib.db.connection.Plugin._connection >2019-02-26 17:06:34,776+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:34,778+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema.Plugin._misc >2019-02-26 17:06:34,779+0100 INFO otopi.ovirt_engine_setup.engine_common.database database.backup:750 Backing up database localhost:engine to '/var/lib/ovirt-engine/backups/engine-20190226170634.VhGxVG.dump'. >2019-02-26 17:06:34,779+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.executePipeRaw:481 executePipeRaw: [0] popen kw={'stdin': None, 'stdout': -1, 'preexec_fn': <function _enableSignals at 0x7f1fdf1f0578>, 'env': {'PGPASSWORD': '', 'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'PGPASSFILE': '/tmp/tmphKUzTK', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'}, 'close_fds': True, 'args': ['/opt/rh/rh-postgresql10/root/usr/bin/pg_dump', '-E', 'UTF8', '--disable-dollar-quoting', '--disable-triggers', '-U', 'engine', '-h', 'localhost', '-p', '5432', '--format=custom', '--file=/var/lib/ovirt-engine/backups/engine-20190226170634.VhGxVG.dump', 'engine'], 'stderr': -1} >2019-02-26 17:06:34,784+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.executePipeRaw:486 executePipeRaw: [0] pid pid=27421 >2019-02-26 17:06:35,821+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.executePipeRaw:603 executePipe-result: [0] ['/opt/rh/rh-postgresql10/root/usr/bin/pg_dump', '-E', 'UTF8', '--disable-dollar-quoting', '--disable-triggers', '-U', 'engine', '-h', 'localhost', '-p', '5432', '--format=custom', '--file=/var/lib/ovirt-engine/backups/engine-20190226170634.VhGxVG.dump', 'engine'], rc=0 >2019-02-26 17:06:35,821+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.backup:798 db backup res {'result': [{'stderr': '', 'rc': 0}], 'stdout': ''} >2019-02-26 17:06:35,821+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'Engine schema Transaction' >2019-02-26 17:06:35,821+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema schema._misc:382 Creating/refreshing Engine database schema >2019-02-26 17:06:35,822+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.executeRaw:813 execute: ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine', '-d', 'engine', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'], executable='None', cwd='None', env={'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'DBFUNC_DB_PGPASSFILE': '/tmp/tmphKUzTK', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'} >********* QUERY ********** >copy ( > select count(*) > from pg_available_extensions > where > name = 'uuid-ossp' and > installed_version IS NOT NULL > ) to stdout with delimiter as '|'; >************************** > >2019-02-26 17:06:35,841+0100 dbfunc_psql_die --command=select 1; >********* QUERY ********** >select 1; >************************** > > 1 > >2019-02-26 17:06:35,850+0100 Creating schema engine@localhost:5432/engine >********* QUERY ********** >copy ( > select count(*) as count > from pg_catalog.pg_tables > where > tablename = 'schema_version' and > schemaname = 'public' > ) to stdout with delimiter as '|'; >************************** > >2019-02-26 17:06:35,860+0100 Saving custom users permissions on database objects... >********* QUERY ********** >copy ( > select count(*) > from pg_available_extensions > where > name = 'uuid-ossp' and > installed_version IS NOT NULL > ) to stdout with delimiter as '|'; >************************** > >2019-02-26 17:06:36,875+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/upgrade/04_00_0000_set_version.sql >********* QUERY ********** >select 4000000; >************************** > > 4000000 > >2019-02-26 17:06:37,540+0100 upgrade script detected a change in Config, View or Stored Procedure... >2019-02-26 17:06:37,542+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/common_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_column ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_column_def TEXT > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > > EXECUTE v_sql; > END; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_drop_column ( > v_table VARCHAR(128), > v_column VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % or Column % does not exist.', > v_table, > v_column; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_change_column_type ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_type VARCHAR(128), > v_new_type VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > AND ( > udt_name ilike v_type > OR data_type ilike v_type > ) > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > END; > > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_rename_column ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_new_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % or Column % does not exist.', > v_table, > v_column; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_rename_table ( > v_table VARCHAR(128), > v_new_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' RENAME TO ' || v_new_name; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % does not exist.', > v_table; >END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_config_value ( > v_option_name VARCHAR(100), > v_option_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_option_value, > v_version, > v_option_value > ); > END; > ELSE > BEGIN > -- We need to set default value to not have it empty after upgrade from previous versions > UPDATE vdc_options SET > default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version > AND default_value IS NULL; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_value_all_versions (v_option_name VARCHAR(100)) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > ) > ) THEN > BEGIN > DELETE > FROM vdc_options > WHERE option_name ilike v_option_name; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_value ( > v_option_name VARCHAR(100), > v_version TEXT > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version IN ( > SELECT ID > FROM fnSplitter(v_version) > ) > ) > ) THEN > BEGIN > DELETE > FROM vdc_options > WHERE option_name ilike v_option_name > AND version IN ( > SELECT ID > FROM fnSplitter(v_version) > ); > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_for_version (v_version TEXT) >RETURNS void AS $PROCEDURE$ >BEGIN > DELETE > FROM vdc_options > WHERE version IN ( > SELECT ID > FROM fnSplitter(v_version) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_config_value ( > v_option_name VARCHAR(100), > v_option_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > UPDATE vdc_options > SET option_value = v_option_value, > default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_default_config_value ( > v_option_name VARCHAR(100), > v_default_option_value VARCHAR(4000), > v_option_value VARCHAR(4000), > v_version VARCHAR(40), > v_ignore_default_value_case boolean > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > IF (v_ignore_default_value_case) THEN > UPDATE vdc_options > SET option_value = v_option_value > WHERE option_name ilike v_option_name > AND option_value ilike v_default_option_value > AND version = v_version; > ELSE > UPDATE vdc_options > SET option_value = v_option_value > WHERE option_name ilike v_option_name > AND option_value = v_default_option_value > AND version = v_version; > END IF; > > -- We need to update default value regardless of user changes > UPDATE vdc_options > SET default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version; > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_rename_config_key ( > v_old_option_name VARCHAR(100), > v_new_option_name VARCHAR(100), > v_version VARCHAR(40) > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_current_option_value VARCHAR(4000); > > BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_old_option_name > AND version = v_version > ) > ) THEN > v_current_option_value:= option_value > FROM vdc_options > WHERE option_name ilike v_old_option_name > AND version = v_version; > > UPDATE vdc_options > SET option_name = v_new_option_name, > option_value = v_current_option_value > WHERE option_name ilike v_old_option_name > AND version = v_version; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_create_constraint ( > v_table VARCHAR(128), > v_constraint VARCHAR(128), > v_constraint_sql TEXT > ) > RETURNS void AS $PROCEDURE$ > > BEGIN > IF NOT EXISTS ( > SELECT 1 > FROM pg_constraint > WHERE conname ilike v_constraint > ) THEN > EXECUTE 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_drop_constraint ( > v_table VARCHAR(128), > v_constraint VARCHAR(128) > ) > RETURNS void AS $PROCEDURE$ > > BEGIN > IF EXISTS ( > SELECT 1 > FROM pg_constraint > WHERE conname ilike v_constraint > ) THEN > EXECUTE 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION CheckDBConnection () > RETURNS SETOF INT IMMUTABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 1; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_functions_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' > FROM pg_proc > INNER JOIN pg_namespace ns > ON (pg_proc.pronamespace = ns.oid) > WHERE > ns.nspname = 'public' > AND ( > probin IS NULL > OR > -- prevent dropping installed extension functions > probin NOT IN (SELECT '$libdir/' || extname from pg_extension) > ) > ORDER BY proname; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_views_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP VIEW if exists ' || table_name || ' CASCADE;' > FROM information_schema.VIEWS > WHERE table_schema = 'public' > AND table_name NOT ILIKE 'pg_%' > ORDER BY table_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_tables_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP TABLE if exists ' || table_name || ' CASCADE;' > FROM information_schema.tables > WHERE table_schema = 'public' > AND table_type = 'BASE TABLE' > ORDER BY table_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_seq_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP SEQUENCE if exists ' || sequence_name || ' CASCADE;' > FROM information_schema.sequences > WHERE sequence_schema = 'public' > ORDER BY sequence_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_user_types_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, > pg_class c, > pg_type t > WHERE n.oid = c.relnamespace > AND t.typrelid = c.oid > AND c.relkind = 'c'::"char" > AND n.nspname = 'public' > ORDER BY c.relname::information_schema.sql_identifier; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_get_column_size ( > v_table VARCHAR(64), > v_column VARCHAR(64) > ) > RETURNS INT STABLE AS $PROCEDURE$ > > DECLARE retvalue INT; > > BEGIN > retvalue := character_maximum_length > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > AND table_schema = 'public' > AND udt_name IN ( > 'char', > 'varchar' > ); > > RETURN retvalue; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION attach_user_to_role ( > v_user_name VARCHAR(255), > v_domain VARCHAR(255), > v_namespace VARCHAR(255), > v_domain_entry_id TEXT, > v_role_name VARCHAR(255) > ) > RETURNS void AS $BODY$ > > DECLARE selected_user_id uuid; > > input_role_id uuid; > > BEGIN > SELECT roles.id > INTO input_role_id > FROM roles > WHERE roles.name = v_role_name; > > -- The external identifier is the user identifier converted to an array of > -- bytes: > INSERT INTO users ( > user_id, > external_id, > namespace, > name, > domain, > username, > last_admin_check_status > ) > SELECT uuid_generate_v1(), > v_domain_entry_id, > v_namespace, > v_user_name, > v_domain, > v_user_name, > true > WHERE NOT EXISTS ( > SELECT 1 > FROM users > WHERE domain = v_domain > AND external_id = v_domain_entry_id > ); > > SELECT user_id > FROM users > WHERE domain = v_domain > AND external_id = v_domain_entry_id > INTO selected_user_id; > > PERFORM InsertPermission(selected_user_id, uuid_generate_v1(), input_role_id, getGlobalIds('system'), 1); > > END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION attach_group_to_role ( > v_group_name VARCHAR(255), > v_role_name VARCHAR(255) > ) > RETURNS void AS $BODY$ > DECLARE selected_group_id uuid; > input_role_id uuid; > BEGIN > SELECT roles.id > INTO input_role_id > FROM roles > WHERE roles.name = v_role_name; > -- The external identifier is the user identifier converted to an array of > -- bytes: > INSERT INTO ad_groups ( > id, > name, > external_id > ) > SELECT uuid_generate_v1(), > v_group_name, > uuid_generate_v1() > WHERE NOT EXISTS ( > SELECT 1 > FROM ad_groups > WHERE name = v_group_name > ); > SELECT id > FROM ad_groups > WHERE name = v_group_name > INTO selected_group_id; > IF NOT EXISTS ( > SELECT 1 > FROM permissions > WHERE ad_element_id = selected_group_id > AND role_id = input_role_id > ) THEN > PERFORM InsertPermission( > selected_group_id, > uuid_generate_v1(), > input_role_id, > getGlobalIds('system'), > 1); > END IF; > END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_add_action_group_to_role ( > v_role_id UUID, > v_action_group_id INT > ) > RETURNS VOID AS $PROCEDURE$ > > BEGIN > INSERT INTO roles_groups ( > role_id, > action_group_id > ) > SELECT v_role_id, > v_action_group_id > WHERE NOT EXISTS ( > SELECT 1 > FROM roles_groups > WHERE role_id = v_role_id > AND action_group_id = v_action_group_id > ); > > RETURN; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_split_config_value ( > v_option_name VARCHAR, > v_old_option_value VARCHAR, > v_new_option_value VARCHAR, > v_update_from_version VARCHAR > ) > RETURNS void AS $BODY$ > > DECLARE v_old_value VARCHAR(4000); > > v_cur CURSOR > FOR > > SELECT DISTINCT version > FROM vdc_options > WHERE version <> 'general' > ORDER BY version; > > v_version VARCHAR(40); > > v_index INT; > > v_count INT; > > v_total_count INT; > > v_version_count INT; > > BEGIN > v_total_count := count(version) > FROM vdc_options > WHERE option_name = v_option_name; > > v_old_value := option_value > FROM vdc_options > WHERE option_name = v_option_name > AND version = 'general'; > > v_version_count := count(DISTINCT version) > FROM vdc_options > WHERE version <> 'general'; > > IF (v_total_count <= v_version_count) THEN > BEGIN > IF (v_old_value IS NULL) THEN > v_old_value := v_old_option_value; > END IF; > v_count := count(DISTINCT version) > FROM vdc_options > WHERE version <> 'general'; > > v_index := 1; > > OPEN v_cur; > > LOOP > > FETCH v_cur > INTO v_version; > > EXIT when NOT found; > > -- We shouldn't update if already exists > IF ( > NOT EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name = v_option_name > AND version = v_version > ) > ) THEN > -- Might not work well for versions such as 3.10, but we currently don't have any > IF (v_version >= v_update_from_version) THEN > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_new_option_value, > v_version, > v_new_option_value > ); > ELSE > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_old_value, > v_version, > v_old_value > ); > END IF; > > END IF; > v_index := v_index + 1; > END LOOP; > > CLOSE v_cur; > > DELETE > FROM vdc_options > WHERE option_name = v_option_name > AND version = 'general'; > END; >END IF; > >END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_grant_action_group_to_all_roles_filter ( > v_action_group_id INT, > uuid [] > ) >RETURNS void AS $BODY$ > >DECLARE v_role_id_to_filter alias >FOR $2; > >BEGIN > INSERT INTO roles_groups ( > role_id, > action_group_id > ) > SELECT DISTINCT role_id, > v_action_group_id > FROM roles_groups rg > WHERE NOT ARRAY [role_id] <@ v_role_id_to_filter > AND NOT EXISTS ( > SELECT 1 > FROM roles_groups > WHERE role_id = rg.role_id > AND action_group_id = v_action_group_id > ); >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object (v_object regclass) >RETURNS setof record AS $BODY$ > >DECLARE v_sql TEXT; > >v_table record; > >v_table_name TEXT; > >temprec record; > >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > SELECT c.relname, > n.nspname > INTO v_table > FROM pg_class c > INNER JOIN pg_namespace n > ON c.relnamespace = n.oid > WHERE c.oid = v_object; > > -- try to get filtered query syntax from previous execution > IF EXISTS ( > SELECT 1 > FROM object_column_white_list_sql > WHERE object_name = v_table.relname > ) THEN > SELECT sql > INTO v_sql > FROM object_column_white_list_sql > WHERE object_name = v_table.relname; > ELSE > v_table_name := quote_ident(v_table.nspname) || '.' || quote_ident(v_table.relname); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > FOR temprec IN > SELECT a.attname, > t.typname > FROM pg_attribute a > INNER JOIN pg_type t > ON a.atttypid = t.oid > WHERE a.attrelid = v_object > AND a.attnum > 0 > AND NOT a.attisdropped > ORDER BY a.attnum LOOP v_sql := coalesce(v_sql || ', ', 'SELECT '); > > IF EXISTS ( > SELECT 1 > FROM object_column_white_list > WHERE object_name = v_table.relname > AND column_name = temprec.attname > ) THEN v_sql := v_sql || quote_ident(temprec.attname); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident(temprec.typname) || ' as ' || quote_ident(temprec.attname); > END IF; > > END LOOP; > > v_sql := v_sql || ' FROM ' || v_table_name; > > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > > -- save generated query for further use > INSERT INTO object_column_white_list_sql ( > object_name, > sql > ) > VALUES ( > v_table.relname, > v_sql > ); > END IF; > > RETURN QUERY > > EXECUTE v_sql; >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_column_to_object_white_list ( > v_object_name VARCHAR(128), > v_column_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM object_column_white_list > WHERE object_name = v_object_name > AND column_name = v_column_name > ) > ) THEN > BEGIN > -- verify that there is such object in db > IF EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name = v_object_name > AND column_name = v_column_name > ) THEN > INSERT INTO object_column_white_list ( > object_name, > column_name > ) > VALUES ( > v_object_name, > v_column_name > ); > END IF; > > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_is_table_exists (v_table VARCHAR(64)) > RETURNS boolean STABLE AS $PROCEDURE$ > > DECLARE retvalue boolean; > > BEGIN > retvalue := EXISTS ( > SELECT * > FROM information_schema.tables > WHERE table_schema = 'public' > AND table_name ILIKE v_table > ); > > RETURN retvalue; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_create_index ( > v_index_name VARCHAR(128), > v_table_name VARCHAR(128), > v_column_names TEXT, > v_where_predicate TEXT, > v_unique boolean > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_sql TEXT; > unique_modifier varchar(6); > > BEGIN > unique_modifier = CASE WHEN v_unique THEN 'UNIQUE' > ELSE '' > END; > > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || '; CREATE ' || unique_modifier || ' INDEX ' || v_index_name || ' ON ' || v_table_name || '(' || v_column_names || ')'; > > IF v_where_predicate = '' THEN v_sql := v_sql || ';';ELSE > v_sql := v_sql || ' WHERE ' || v_where_predicate || ';'; > END IF; > > EXECUTE v_sql; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR replace FUNCTION fn_db_drop_index ( > v_index_name VARCHAR(128) > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_sql TEXT; > > BEGIN > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || ';' ; > EXECUTE v_sql; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_disk (v_id UUID) >RETURNS void AS $PROCEDURE$ >DECLARE OK INT; > >LOCKED INT; > >BEGIN > OK:= 1; > > LOCKED:= 2; > > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED > AND image_group_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_snapshot (v_id UUID) >RETURNS void AS $PROCEDURE$ >DECLARE OK VARCHAR; > >LOCKED VARCHAR; > >BEGIN > OK:= 'OK'; > > LOCKED:= 'LOCKED'; > > UPDATE snapshots > SET status = OK > WHERE status = LOCKED > AND snapshot_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_entity ( > v_object_type VARCHAR(10), > v_name VARCHAR(255), > v_recursive boolean > ) >RETURNS void AS $PROCEDURE$ >DECLARE DOWN INT; > >OK INT; > >LOCKED INT; > >TEMPLATE_OK INT; > >TEMPLATE_LOCKED INT; > >IMAGE_LOCKED INT; > >SNAPSHOT_OK VARCHAR; > >SNAPSHOT_LOCKED VARCHAR; > >v_id UUID; > >BEGIN > DOWN:= 0; > > OK:= 1; > > LOCKED:= 2; > > TEMPLATE_OK:= 0; > > TEMPLATE_LOCKED:= 1; > > IMAGE_LOCKED:= 15; > > SNAPSHOT_OK:= 'OK'; > > SNAPSHOT_LOCKED:= 'LOCKED'; > > v_id := vm_guid > FROM vm_static > WHERE vm_name = v_name > AND entity_type ilike v_object_type; > > -- set VM status to DOWN > IF (v_object_type = 'vm') THEN > UPDATE vm_dynamic > SET status = DOWN > WHERE status = IMAGE_LOCKED > AND vm_guid = v_id; > -- set Template status to OK > ELSE IF (v_object_type = 'template') THEN > UPDATE vm_static > SET template_status = TEMPLATE_OK > WHERE template_status = TEMPLATE_LOCKED > AND vm_guid = v_id; > END IF; > >END IF; > --unlock images and snapshots if recursive flag is set >IF (v_recursive) THEN > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED > AND image_group_id IN ( > SELECT device_id > FROM vm_device > WHERE vm_id = v_id > AND is_plugged > ); > > UPDATE snapshots > SET status = SNAPSHOT_OK > WHERE status ilike SNAPSHOT_LOCKED > AND vm_id = v_id; >END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_all () >RETURNS void AS $PROCEDURE$ >DECLARE DOWN INT; > >OK INT; > >LOCKED INT; > >TEMPLATE_OK INT; > >TEMPLATE_LOCKED INT; > >IMAGE_LOCKED INT; > >SNAPSHOT_OK VARCHAR; > >SNAPSHOT_LOCKED VARCHAR; > >BEGIN > DOWN:= 0; > > OK:= 1; > > LOCKED:= 2; > > TEMPLATE_OK:= 0; > > TEMPLATE_LOCKED:= 1; > > IMAGE_LOCKED:= 15; > > SNAPSHOT_OK:= 'OK'; > > SNAPSHOT_LOCKED:= 'LOCKED'; > > UPDATE vm_static > SET template_status = TEMPLATE_OK > WHERE template_status = TEMPLATE_LOCKED; > > UPDATE vm_dynamic > SET status = DOWN > WHERE status = IMAGE_LOCKED; > > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED; > > UPDATE snapshots > SET status = SNAPSHOT_OK > WHERE status ilike SNAPSHOT_LOCKED; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/* Displays DC id , DC name, SPM Host id , SPM Host name and number of async tasks awaiting. > >1) create a record type with DC name, DC id, SPM host id, SPM host name, count > >2) get all distinct DC ids from async_tasks table > >3) Run a cursor for each result in 2) > > a) get DC name > b) get SPM Host id & name if available > c) get count of tasks > > return current record > >4) return set of generated records >*/ >DROP TYPE IF EXISTS async_tasks_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE async_tasks_info_rs AS ( > dc_id uuid, > dc_name VARCHAR, > spm_host_id uuid, > spm_host_name VARCHAR, > task_count INT > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_get_async_tasks () >RETURNS SETOF async_tasks_info_rs STABLE AS $PROCEDURE$ >DECLARE v_record async_tasks_info_rs; > >-- selects storage_pool_id uuid found in async_tasks >v_tasks_cursor CURSOR >FOR > >SELECT DISTINCT storage_pool_id >FROM async_tasks; > >BEGIN > OPEN v_tasks_cursor; > > FETCH v_tasks_cursor > INTO v_record.dc_id; > > WHILE FOUND > LOOP > -- get dc_name and SPM Host id > v_record.dc_name := name FROM storage_pool WHERE id = v_record.dc_id; > v_record.spm_host_id := spm_vds_id > FROM storage_pool > WHERE id = v_record.dc_id; > > -- get Host name if we have non NULL SPM Host > IF (v_record.spm_host_id IS NOT NULL) THEN > v_record.spm_host_name := vds_name > FROM vds_static > WHERE vds_id = v_record.spm_host_id; > ELSE > v_record.spm_host_name:= ''; > END IF; > -- get tasks count for this DC > v_record.task_count := count(*) > FROM async_tasks > WHERE position(cast(v_record.dc_id AS VARCHAR) IN action_parameters) > 0; > > -- return the record > RETURN NEXT v_record; > > FETCH v_tasks_cursor > INTO v_record.dc_id; > > END LOOP; > >CLOSE v_tasks_cursor; > >-- return full set of generated records >RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_remove_csv_config_value ( > v_option_name VARCHAR(100), > v_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v VARCHAR []; > >e VARCHAR; > >v_result VARCHAR; > >v_sep VARCHAR(1); > >BEGIN > v_result := ''; > > v_sep := ''; > > v := string_to_array(option_value, ',') > FROM vdc_options > WHERE option_name = v_option_name > AND version = v_version; > FOR > > e IN > > SELECT unnest(v) LOOP > > IF (e != v_value) THEN v_result := v_result || v_sep || e; > v_sep := ','; > END IF; > >END >LOOP; > > UPDATE vdc_options > SET option_value = v_result > WHERE option_name = v_option_name > AND version = v_version; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_remove_uuid_from_csv ( > v_csv_text TEXT, > v_uuid uuid > ) >RETURNS TEXT STABLE AS $PROCEDURE$ >DECLARE v uuid []; > >e uuid; > >v_result TEXT; > >v_sep VARCHAR(1); > >BEGIN > v_result := ''; > > v_sep := ''; > > v := string_to_array(v_csv_text, ','); > FOR > > e IN > > SELECT unnest(v) LOOP > > IF (e != v_uuid) THEN v_result := v_result || v_sep || e; > v_sep := ','; > END IF; > > END LOOP; > > IF (v_result = '') THEN v_result := NULL; > END IF; > RETURN v_result; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_config_value_for_versions_up_to ( > v_option_name VARCHAR(100), > v_val VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >DECLARE i INT; > >arr VARCHAR [] := array ['4.1', '4.2', '4.3']; > >BEGIN > FOR i IN array_lower(arr, 1)..array_upper(arr, 1) LOOP PERFORM fn_db_add_config_value(v_option_name, v_val, arr [i]); > EXIT WHEN arr [i] = v_version; > END LOOP; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_varchar_to_jsonb(v_text VARCHAR, v_default_value JSONB) >RETURNS JSONB IMMUTABLE AS $PROCEDURE$ >BEGIN > RETURN v_text::jsonb; > EXCEPTION > WHEN SQLSTATE '22P02' THEN -- '22P02' stands for 'invalid_text_representation', 'invalid input syntax for type json' in this case > RETURN v_default_value; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_column_to_jsonb_compatible_values( > v_table VARCHAR, > v_column VARCHAR, > v_default_value JSONB > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE > default_value_string VARCHAR; >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name = v_table > AND column_name = v_column > AND data_type = 'character varying' > ) > ) THEN > BEGIN > default_value_string := CASE > WHEN v_default_value IS NULL THEN 'NULL' > ELSE '''' || v_default_value::VARCHAR || '''' > END; > EXECUTE 'UPDATE ' || v_table || ' SET ' || v_column || ' = (SELECT fn_db_varchar_to_jsonb(' || v_column || ', ' || default_value_string || '))'; > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_change_table_string_columns_to_empty_string ( > v_table VARCHAR(128), > v_column VARCHAR[] > ) >RETURNS void AS $PROCEDURE$ >DECLARE > v_sql TEXT; > v_num integer := array_length(v_column, 1); > v_index integer := 1; > >BEGIN > WHILE v_index <= v_num > LOOP > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column[v_index] > ) > ) THEN > BEGIN > v_sql := 'UPDATE ' || v_table || ' SET ' || v_column[v_index] || ' = '''' WHERE ' || v_column[v_index] || ' IS NULL' ; > EXECUTE v_sql; > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column[v_index] || ' SET DEFAULT '''''; > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'No column named % exists in table %', v_column[v_index] , v_table; > END IF; > v_index = v_index + 1; > END LOOP; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >select * from generate_drop_all_views_syntax(); >************************** > > DROP VIEW if exists active_migration_network_interfaces CASCADE; > DROP VIEW if exists affinity_groups_view CASCADE; > DROP VIEW if exists all_disks CASCADE; > DROP VIEW if exists all_disks_for_vms CASCADE; > DROP VIEW if exists all_disks_including_snapshots CASCADE; > DROP VIEW if exists all_disks_including_snapshots_and_memory CASCADE; > DROP VIEW if exists cluster_storage_domain CASCADE; > DROP VIEW if exists cluster_view CASCADE; > DROP VIEW if exists desktop_vms CASCADE; > DROP VIEW if exists disk_vm_element_extended CASCADE; > DROP VIEW if exists domains_with_unregistered_entities_view CASCADE; > DROP VIEW if exists dwh_add_tags_relations_history_view CASCADE; > DROP VIEW if exists dwh_cluster_configuration_history_view CASCADE; > DROP VIEW if exists dwh_datacenter_configuration_history_view CASCADE; > DROP VIEW if exists dwh_datacenter_storage_map_history_view CASCADE; > DROP VIEW if exists dwh_host_configuration_full_check_view CASCADE; > DROP VIEW if exists dwh_host_configuration_history_view CASCADE; > DROP VIEW if exists dwh_host_history_view CASCADE; > DROP VIEW if exists dwh_host_interface_configuration_history_view CASCADE; > DROP VIEW if exists dwh_host_interface_history_view CASCADE; > DROP VIEW if exists dwh_remove_tags_relations_history_view CASCADE; > DROP VIEW if exists dwh_storage_domain_configuration_history_view CASCADE; > DROP VIEW if exists dwh_storage_domain_history_view CASCADE; > DROP VIEW if exists dwh_tags_details_history_view CASCADE; > DROP VIEW if exists dwh_users_history_view CASCADE; > DROP VIEW if exists dwh_vm_configuration_history_view CASCADE; > DROP VIEW if exists dwh_vm_device_history_view CASCADE; > DROP VIEW if exists dwh_vm_disk_configuration_history_view CASCADE; > DROP VIEW if exists dwh_vm_disks_history_view CASCADE; > DROP VIEW if exists dwh_vm_history_view CASCADE; > DROP VIEW if exists dwh_vm_interface_configuration_history_view CASCADE; > DROP VIEW if exists dwh_vm_interface_history_view CASCADE; > DROP VIEW if exists engine_session_user_flat_groups CASCADE; > DROP VIEW if exists entity_step_progress CASCADE; > DROP VIEW if exists gluster_geo_rep_config_view CASCADE; > DROP VIEW if exists gluster_georep_sessions_view CASCADE; > DROP VIEW if exists gluster_server_hooks_view CASCADE; > DROP VIEW if exists gluster_server_services_view CASCADE; > DROP VIEW if exists gluster_volume_bricks_view CASCADE; > DROP VIEW if exists gluster_volume_snapshot_schedules_view CASCADE; > DROP VIEW if exists gluster_volume_snapshots_view CASCADE; > DROP VIEW if exists gluster_volumes_view CASCADE; > DROP VIEW if exists gluster_volume_task_steps CASCADE; > DROP VIEW if exists host_device_view CASCADE; > DROP VIEW if exists hosted_engine_storage_domains_ids_view CASCADE; > DROP VIEW if exists host_network_qos_of_migration_network_by_cluster CASCADE; > DROP VIEW if exists images_storage_domain_view CASCADE; > DROP VIEW if exists image_types_storage_domain CASCADE; > DROP VIEW if exists image_types_view CASCADE; > DROP VIEW if exists instance_types_storage_domain CASCADE; > DROP VIEW if exists instance_types_view CASCADE; > DROP VIEW if exists internal_permissions_view CASCADE; > DROP VIEW if exists iso_disks_as_repo_images CASCADE; > DROP VIEW if exists labels_map_view CASCADE; > DROP VIEW if exists luns_view CASCADE; > DROP VIEW if exists network_cluster_view CASCADE; > DROP VIEW if exists network_vds_view CASCADE; > DROP VIEW if exists network_view CASCADE; > DROP VIEW if exists numa_node_assignment_view CASCADE; > DROP VIEW if exists numa_node_cpus_view CASCADE; > DROP VIEW if exists numa_node_with_cluster_view CASCADE; > DROP VIEW if exists permissions_view CASCADE; > DROP VIEW if exists qos_for_disk_profile_view CASCADE; > DROP VIEW if exists qos_for_vm_view CASCADE; > DROP VIEW if exists quota_cluster_view CASCADE; > DROP VIEW if exists quota_global_view CASCADE; > DROP VIEW if exists quota_limitations_view CASCADE; > DROP VIEW if exists quota_storage_view CASCADE; > DROP VIEW if exists quota_view CASCADE; > DROP VIEW if exists server_vms CASCADE; > DROP VIEW if exists step_progress CASCADE; > DROP VIEW if exists storage_domain_file_repos CASCADE; > DROP VIEW if exists storage_domains CASCADE; > DROP VIEW if exists storage_domains_for_search CASCADE; > DROP VIEW if exists storage_domain_shared_status CASCADE; > DROP VIEW if exists storage_domains_image_sizes CASCADE; > DROP VIEW if exists storage_domains_with_hosts_view CASCADE; > DROP VIEW if exists storage_domains_without_storage_pools CASCADE; > DROP VIEW if exists storage_for_image_view CASCADE; > DROP VIEW if exists storage_pool_with_storage_domain CASCADE; > DROP VIEW if exists supported_cluster_features_view CASCADE; > DROP VIEW if exists tags_user_group_map_view CASCADE; > DROP VIEW if exists tags_user_map_view CASCADE; > DROP VIEW if exists tags_vds_map_view CASCADE; > DROP VIEW if exists tags_vm_map_view CASCADE; > DROP VIEW if exists tags_vm_pool_map_view CASCADE; > DROP VIEW if exists user_cluster_permissions_view CASCADE; > DROP VIEW if exists user_cluster_permissions_view_base CASCADE; > DROP VIEW if exists user_db_users_permissions_view CASCADE; > DROP VIEW if exists user_disk_permissions_view CASCADE; > DROP VIEW if exists user_disk_permissions_view_base CASCADE; > DROP VIEW if exists user_disk_profile_permissions_view CASCADE; > DROP VIEW if exists user_disk_profile_permissions_view_base CASCADE; > DROP VIEW if exists user_network_permissions_view CASCADE; > DROP VIEW if exists user_network_permissions_view_base CASCADE; > DROP VIEW if exists user_object_permissions_view CASCADE; > DROP VIEW if exists user_permissions_permissions_view CASCADE; > DROP VIEW if exists user_profiles_view CASCADE; > DROP VIEW if exists users_and_groups_to_vm_pool_map_view CASCADE; > DROP VIEW if exists user_storage_domain_permissions_view CASCADE; > DROP VIEW if exists user_storage_domain_permissions_view_base CASCADE; > DROP VIEW if exists user_storage_pool_permissions_view CASCADE; > DROP VIEW if exists user_storage_pool_permissions_view_base CASCADE; > DROP VIEW if exists user_vds_permissions_view CASCADE; > DROP VIEW if exists user_vds_permissions_view_base CASCADE; > DROP VIEW if exists user_vm_permissions_view CASCADE; > DROP VIEW if exists user_vm_pool_permissions_view CASCADE; > DROP VIEW if exists user_vm_pool_permissions_view_base CASCADE; > DROP VIEW if exists user_vm_template_permissions_view CASCADE; > DROP VIEW if exists user_vm_template_permissions_view_base CASCADE; > DROP VIEW if exists user_vnic_profile_permissions_view CASCADE; > DROP VIEW if exists user_vnic_profile_permissions_view_base CASCADE; > DROP VIEW if exists vdc_users CASCADE; > DROP VIEW if exists vdc_users_with_tags CASCADE; > DROP VIEW if exists vds CASCADE; > DROP VIEW if exists vds_interface_view CASCADE; > DROP VIEW if exists vds_with_tags CASCADE; > DROP VIEW if exists vg_discard_support_view CASCADE; > DROP VIEW if exists vm_device_view CASCADE; > DROP VIEW if exists vm_host_device_view CASCADE; > DROP VIEW if exists vm_host_pinning_view CASCADE; > DROP VIEW if exists vm_images_storage_domains_view CASCADE; > DROP VIEW if exists vm_images_view CASCADE; > DROP VIEW if exists vm_interface_monitoring_view CASCADE; > DROP VIEW if exists vm_interface_view CASCADE; > DROP VIEW if exists vm_permissions_view CASCADE; > DROP VIEW if exists vm_permissions_view_base CASCADE; > DROP VIEW if exists vm_pool_map_view CASCADE; > DROP VIEW if exists vm_pools_full_view CASCADE; > DROP VIEW if exists vm_pools_view CASCADE; > DROP VIEW if exists vms CASCADE; > DROP VIEW if exists vms_for_disk_view CASCADE; > DROP VIEW if exists vms_monitoring_view CASCADE; > DROP VIEW if exists vms_with_plug_info CASCADE; > DROP VIEW if exists vms_with_tags CASCADE; > DROP VIEW if exists vm_templates_based_storage_domain CASCADE; > DROP VIEW if exists vm_templates_based_view CASCADE; > DROP VIEW if exists vm_templates_based_with_plug_info CASCADE; > DROP VIEW if exists vm_templates_storage_domain CASCADE; > DROP VIEW if exists vm_templates_view CASCADE; > DROP VIEW if exists vnic_profiles_view CASCADE; > >2019-02-26 17:06:37,584+0100 dbfunc_psql_die --command= DROP VIEW if exists active_migration_network_interfaces CASCADE; > DROP VIEW if exists affinity_groups_view CASCADE; > DROP VIEW if exists all_disks CASCADE; > DROP VIEW if exists all_disks_for_vms CASCADE; > DROP VIEW if exists all_disks_including_snapshots CASCADE; > DROP VIEW if exists all_disks_including_snapshots_and_memory CASCADE; > DROP VIEW if exists cluster_storage_domain CASCADE; > DROP VIEW if exists cluster_view CASCADE; > DROP VIEW if exists desktop_vms CASCADE; > DROP VIEW if exists disk_vm_element_extended CASCADE; > DROP VIEW if exists domains_with_unregistered_entities_view CASCADE; > DROP VIEW if exists dwh_add_tags_relations_history_view CASCADE; > DROP VIEW if exists dwh_cluster_configuration_history_view CASCADE; > DROP VIEW if exists dwh_datacenter_configuration_history_view CASCADE; > DROP VIEW if exists dwh_datacenter_storage_map_history_view CASCADE; > DROP VIEW if exists dwh_host_configuration_full_check_view CASCADE; > DROP VIEW if exists dwh_host_configuration_history_view CASCADE; > DROP VIEW if exists dwh_host_history_view CASCADE; > DROP VIEW if exists dwh_host_interface_configuration_history_view CASCADE; > DROP VIEW if exists dwh_host_interface_history_view CASCADE; > DROP VIEW if exists dwh_remove_tags_relations_history_view CASCADE; > DROP VIEW if exists dwh_storage_domain_configuration_history_view CASCADE; > DROP VIEW if exists dwh_storage_domain_history_view CASCADE; > DROP VIEW if exists dwh_tags_details_history_view CASCADE; > DROP VIEW if exists dwh_users_history_view CASCADE; > DROP VIEW if exists dwh_vm_configuration_history_view CASCADE; > DROP VIEW if exists dwh_vm_device_history_view CASCADE; > DROP VIEW if exists dwh_vm_disk_configuration_history_view CASCADE; > DROP VIEW if exists dwh_vm_disks_history_view CASCADE; > DROP VIEW if exists dwh_vm_history_view CASCADE; > DROP VIEW if exists dwh_vm_interface_configuration_history_view CASCADE; > DROP VIEW if exists dwh_vm_interface_history_view CASCADE; > DROP VIEW if exists engine_session_user_flat_groups CASCADE; > DROP VIEW if exists entity_step_progress CASCADE; > DROP VIEW if exists gluster_geo_rep_config_view CASCADE; > DROP VIEW if exists gluster_georep_sessions_view CASCADE; > DROP VIEW if exists gluster_server_hooks_view CASCADE; > DROP VIEW if exists gluster_server_services_view CASCADE; > DROP VIEW if exists gluster_volume_bricks_view CASCADE; > DROP VIEW if exists gluster_volume_snapshot_schedules_view CASCADE; > DROP VIEW if exists gluster_volume_snapshots_view CASCADE; > DROP VIEW if exists gluster_volumes_view CASCADE; > DROP VIEW if exists gluster_volume_task_steps CASCADE; > DROP VIEW if exists host_device_view CASCADE; > DROP VIEW if exists hosted_engine_storage_domains_ids_view CASCADE; > DROP VIEW if exists host_network_qos_of_migration_network_by_cluster CASCADE; > DROP VIEW if exists images_storage_domain_view CASCADE; > DROP VIEW if exists image_types_storage_domain CASCADE; > DROP VIEW if exists image_types_view CASCADE; > DROP VIEW if exists instance_types_storage_domain CASCADE; > DROP VIEW if exists instance_types_view CASCADE; > DROP VIEW if exists internal_permissions_view CASCADE; > DROP VIEW if exists iso_disks_as_repo_images CASCADE; > DROP VIEW if exists labels_map_view CASCADE; > DROP VIEW if exists luns_view CASCADE; > DROP VIEW if exists network_cluster_view CASCADE; > DROP VIEW if exists network_vds_view CASCADE; > DROP VIEW if exists network_view CASCADE; > DROP VIEW if exists numa_node_assignment_view CASCADE; > DROP VIEW if exists numa_node_cpus_view CASCADE; > DROP VIEW if exists numa_node_with_cluster_view CASCADE; > DROP VIEW if exists permissions_view CASCADE; > DROP VIEW if exists qos_for_disk_profile_view CASCADE; > DROP VIEW if exists qos_for_vm_view CASCADE; > DROP VIEW if exists quota_cluster_view CASCADE; > DROP VIEW if exists quota_global_view CASCADE; > DROP VIEW if exists quota_limitations_view CASCADE; > DROP VIEW if exists quota_storage_view CASCADE; > DROP VIEW if exists quota_view CASCADE; > DROP VIEW if exists server_vms CASCADE; > DROP VIEW if exists step_progress CASCADE; > DROP VIEW if exists storage_domain_file_repos CASCADE; > DROP VIEW if exists storage_domains CASCADE; > DROP VIEW if exists storage_domains_for_search CASCADE; > DROP VIEW if exists storage_domain_shared_status CASCADE; > DROP VIEW if exists storage_domains_image_sizes CASCADE; > DROP VIEW if exists storage_domains_with_hosts_view CASCADE; > DROP VIEW if exists storage_domains_without_storage_pools CASCADE; > DROP VIEW if exists storage_for_image_view CASCADE; > DROP VIEW if exists storage_pool_with_storage_domain CASCADE; > DROP VIEW if exists supported_cluster_features_view CASCADE; > DROP VIEW if exists tags_user_group_map_view CASCADE; > DROP VIEW if exists tags_user_map_view CASCADE; > DROP VIEW if exists tags_vds_map_view CASCADE; > DROP VIEW if exists tags_vm_map_view CASCADE; > DROP VIEW if exists tags_vm_pool_map_view CASCADE; > DROP VIEW if exists user_cluster_permissions_view CASCADE; > DROP VIEW if exists user_cluster_permissions_view_base CASCADE; > DROP VIEW if exists user_db_users_permissions_view CASCADE; > DROP VIEW if exists user_disk_permissions_view CASCADE; > DROP VIEW if exists user_disk_permissions_view_base CASCADE; > DROP VIEW if exists user_disk_profile_permissions_view CASCADE; > DROP VIEW if exists user_disk_profile_permissions_view_base CASCADE; > DROP VIEW if exists user_network_permissions_view CASCADE; > DROP VIEW if exists user_network_permissions_view_base CASCADE; > DROP VIEW if exists user_object_permissions_view CASCADE; > DROP VIEW if exists user_permissions_permissions_view CASCADE; > DROP VIEW if exists user_profiles_view CASCADE; > DROP VIEW if exists users_and_groups_to_vm_pool_map_view CASCADE; > DROP VIEW if exists user_storage_domain_permissions_view CASCADE; > DROP VIEW if exists user_storage_domain_permissions_view_base CASCADE; > DROP VIEW if exists user_storage_pool_permissions_view CASCADE; > DROP VIEW if exists user_storage_pool_permissions_view_base CASCADE; > DROP VIEW if exists user_vds_permissions_view CASCADE; > DROP VIEW if exists user_vds_permissions_view_base CASCADE; > DROP VIEW if exists user_vm_permissions_view CASCADE; > DROP VIEW if exists user_vm_pool_permissions_view CASCADE; > DROP VIEW if exists user_vm_pool_permissions_view_base CASCADE; > DROP VIEW if exists user_vm_template_permissions_view CASCADE; > DROP VIEW if exists user_vm_template_permissions_view_base CASCADE; > DROP VIEW if exists user_vnic_profile_permissions_view CASCADE; > DROP VIEW if exists user_vnic_profile_permissions_view_base CASCADE; > DROP VIEW if exists vdc_users CASCADE; > DROP VIEW if exists vdc_users_with_tags CASCADE; > DROP VIEW if exists vds CASCADE; > DROP VIEW if exists vds_interface_view CASCADE; > DROP VIEW if exists vds_with_tags CASCADE; > DROP VIEW if exists vg_discard_support_view CASCADE; > DROP VIEW if exists vm_device_view CASCADE; > DROP VIEW if exists vm_host_device_view CASCADE; > DROP VIEW if exists vm_host_pinning_view CASCADE; > DROP VIEW if exists vm_images_storage_domains_view CASCADE; > DROP VIEW if exists vm_images_view CASCADE; > DROP VIEW if exists vm_interface_monitoring_view CASCADE; > DROP VIEW if exists vm_interface_view CASCADE; > DROP VIEW if exists vm_permissions_view CASCADE; > DROP VIEW if exists vm_permissions_view_base CASCADE; > DROP VIEW if exists vm_pool_map_view CASCADE; > DROP VIEW if exists vm_pools_full_view CASCADE; > DROP VIEW if exists vm_pools_view CASCADE; > DROP VIEW if exists vms CASCADE; > DROP VIEW if exists vms_for_disk_view CASCADE; > DROP VIEW if exists vms_monitoring_view CASCADE; > DROP VIEW if exists vms_with_plug_info CASCADE; > DROP VIEW if exists vms_with_tags CASCADE; > DROP VIEW if exists vm_templates_based_storage_domain CASCADE; > DROP VIEW if exists vm_templates_based_view CASCADE; > DROP VIEW if exists vm_templates_based_with_plug_info CASCADE; > DROP VIEW if exists vm_templates_storage_domain CASCADE; > DROP VIEW if exists vm_templates_view CASCADE; > DROP VIEW if exists vnic_profiles_view CASCADE; >********* QUERY ********** > DROP VIEW if exists active_migration_network_interfaces CASCADE; > DROP VIEW if exists affinity_groups_view CASCADE; > DROP VIEW if exists all_disks CASCADE; > DROP VIEW if exists all_disks_for_vms CASCADE; > DROP VIEW if exists all_disks_including_snapshots CASCADE; > DROP VIEW if exists all_disks_including_snapshots_and_memory CASCADE; > DROP VIEW if exists cluster_storage_domain CASCADE; > DROP VIEW if exists cluster_view CASCADE; > DROP VIEW if exists desktop_vms CASCADE; > DROP VIEW if exists disk_vm_element_extended CASCADE; > DROP VIEW if exists domains_with_unregistered_entities_view CASCADE; > DROP VIEW if exists dwh_add_tags_relations_history_view CASCADE; > DROP VIEW if exists dwh_cluster_configuration_history_view CASCADE; > DROP VIEW if exists dwh_datacenter_configuration_history_view CASCADE; > DROP VIEW if exists dwh_datacenter_storage_map_history_view CASCADE; > DROP VIEW if exists dwh_host_configuration_full_check_view CASCADE; > DROP VIEW if exists dwh_host_configuration_history_view CASCADE; > DROP VIEW if exists dwh_host_history_view CASCADE; > DROP VIEW if exists dwh_host_interface_configuration_history_view CASCADE; > DROP VIEW if exists dwh_host_interface_history_view CASCADE; > DROP VIEW if exists dwh_remove_tags_relations_history_view CASCADE; > DROP VIEW if exists dwh_storage_domain_configuration_history_view CASCADE; > DROP VIEW if exists dwh_storage_domain_history_view CASCADE; > DROP VIEW if exists dwh_tags_details_history_view CASCADE; > DROP VIEW if exists dwh_users_history_view CASCADE; > DROP VIEW if exists dwh_vm_configuration_history_view CASCADE; > DROP VIEW if exists dwh_vm_device_history_view CASCADE; > DROP VIEW if exists dwh_vm_disk_configuration_history_view CASCADE; > DROP VIEW if exists dwh_vm_disks_history_view CASCADE; > DROP VIEW if exists dwh_vm_history_view CASCADE; > DROP VIEW if exists dwh_vm_interface_configuration_history_view CASCADE; > DROP VIEW if exists dwh_vm_interface_history_view CASCADE; > DROP VIEW if exists engine_session_user_flat_groups CASCADE; > DROP VIEW if exists entity_step_progress CASCADE; > DROP VIEW if exists gluster_geo_rep_config_view CASCADE; > DROP VIEW if exists gluster_georep_sessions_view CASCADE; > DROP VIEW if exists gluster_server_hooks_view CASCADE; > DROP VIEW if exists gluster_server_services_view CASCADE; > DROP VIEW if exists gluster_volume_bricks_view CASCADE; > DROP VIEW if exists gluster_volume_snapshot_schedules_view CASCADE; > DROP VIEW if exists gluster_volume_snapshots_view CASCADE; > DROP VIEW if exists gluster_volumes_view CASCADE; > DROP VIEW if exists gluster_volume_task_steps CASCADE; > DROP VIEW if exists host_device_view CASCADE; > DROP VIEW if exists hosted_engine_storage_domains_ids_view CASCADE; > DROP VIEW if exists host_network_qos_of_migration_network_by_cluster CASCADE; > DROP VIEW if exists images_storage_domain_view CASCADE; > DROP VIEW if exists image_types_storage_domain CASCADE; > DROP VIEW if exists image_types_view CASCADE; > DROP VIEW if exists instance_types_storage_domain CASCADE; > DROP VIEW if exists instance_types_view CASCADE; > DROP VIEW if exists internal_permissions_view CASCADE; > DROP VIEW if exists iso_disks_as_repo_images CASCADE; > DROP VIEW if exists labels_map_view CASCADE; > DROP VIEW if exists luns_view CASCADE; > DROP VIEW if exists network_cluster_view CASCADE; > DROP VIEW if exists network_vds_view CASCADE; > DROP VIEW if exists network_view CASCADE; > DROP VIEW if exists numa_node_assignment_view CASCADE; > DROP VIEW if exists numa_node_cpus_view CASCADE; > DROP VIEW if exists numa_node_with_cluster_view CASCADE; > DROP VIEW if exists permissions_view CASCADE; > DROP VIEW if exists qos_for_disk_profile_view CASCADE; > DROP VIEW if exists qos_for_vm_view CASCADE; > DROP VIEW if exists quota_cluster_view CASCADE; > DROP VIEW if exists quota_global_view CASCADE; > DROP VIEW if exists quota_limitations_view CASCADE; > DROP VIEW if exists quota_storage_view CASCADE; > DROP VIEW if exists quota_view CASCADE; > DROP VIEW if exists server_vms CASCADE; > DROP VIEW if exists step_progress CASCADE; > DROP VIEW if exists storage_domain_file_repos CASCADE; > DROP VIEW if exists storage_domains CASCADE; > DROP VIEW if exists storage_domains_for_search CASCADE; > DROP VIEW if exists storage_domain_shared_status CASCADE; > DROP VIEW if exists storage_domains_image_sizes CASCADE; > DROP VIEW if exists storage_domains_with_hosts_view CASCADE; > DROP VIEW if exists storage_domains_without_storage_pools CASCADE; > DROP VIEW if exists storage_for_image_view CASCADE; > DROP VIEW if exists storage_pool_with_storage_domain CASCADE; > DROP VIEW if exists supported_cluster_features_view CASCADE; > DROP VIEW if exists tags_user_group_map_view CASCADE; > DROP VIEW if exists tags_user_map_view CASCADE; > DROP VIEW if exists tags_vds_map_view CASCADE; > DROP VIEW if exists tags_vm_map_view CASCADE; > DROP VIEW if exists tags_vm_pool_map_view CASCADE; > DROP VIEW if exists user_cluster_permissions_view CASCADE; > DROP VIEW if exists user_cluster_permissions_view_base CASCADE; > DROP VIEW if exists user_db_users_permissions_view CASCADE; > DROP VIEW if exists user_disk_permissions_view CASCADE; > DROP VIEW if exists user_disk_permissions_view_base CASCADE; > DROP VIEW if exists user_disk_profile_permissions_view CASCADE; > DROP VIEW if exists user_disk_profile_permissions_view_base CASCADE; > DROP VIEW if exists user_network_permissions_view CASCADE; > DROP VIEW if exists user_network_permissions_view_base CASCADE; > DROP VIEW if exists user_object_permissions_view CASCADE; > DROP VIEW if exists user_permissions_permissions_view CASCADE; > DROP VIEW if exists user_profiles_view CASCADE; > DROP VIEW if exists users_and_groups_to_vm_pool_map_view CASCADE; > DROP VIEW if exists user_storage_domain_permissions_view CASCADE; > DROP VIEW if exists user_storage_domain_permissions_view_base CASCADE; > DROP VIEW if exists user_storage_pool_permissions_view CASCADE; > DROP VIEW if exists user_storage_pool_permissions_view_base CASCADE; > DROP VIEW if exists user_vds_permissions_view CASCADE; > DROP VIEW if exists user_vds_permissions_view_base CASCADE; > DROP VIEW if exists user_vm_permissions_view CASCADE; > DROP VIEW if exists user_vm_pool_permissions_view CASCADE; > DROP VIEW if exists user_vm_pool_permissions_view_base CASCADE; > DROP VIEW if exists user_vm_template_permissions_view CASCADE; > DROP VIEW if exists user_vm_template_permissions_view_base CASCADE; > DROP VIEW if exists user_vnic_profile_permissions_view CASCADE; > DROP VIEW if exists user_vnic_profile_permissions_view_base CASCADE; > DROP VIEW if exists vdc_users CASCADE; > DROP VIEW if exists vdc_users_with_tags CASCADE; > DROP VIEW if exists vds CASCADE; > DROP VIEW if exists vds_interface_view CASCADE; > DROP VIEW if exists vds_with_tags CASCADE; > DROP VIEW if exists vg_discard_support_view CASCADE; > DROP VIEW if exists vm_device_view CASCADE; > DROP VIEW if exists vm_host_device_view CASCADE; > DROP VIEW if exists vm_host_pinning_view CASCADE; > DROP VIEW if exists vm_images_storage_domains_view CASCADE; > DROP VIEW if exists vm_images_view CASCADE; > DROP VIEW if exists vm_interface_monitoring_view CASCADE; > DROP VIEW if exists vm_interface_view CASCADE; > DROP VIEW if exists vm_permissions_view CASCADE; > DROP VIEW if exists vm_permissions_view_base CASCADE; > DROP VIEW if exists vm_pool_map_view CASCADE; > DROP VIEW if exists vm_pools_full_view CASCADE; > DROP VIEW if exists vm_pools_view CASCADE; > DROP VIEW if exists vms CASCADE; > DROP VIEW if exists vms_for_disk_view CASCADE; > DROP VIEW if exists vms_monitoring_view CASCADE; > DROP VIEW if exists vms_with_plug_info CASCADE; > DROP VIEW if exists vms_with_tags CASCADE; > DROP VIEW if exists vm_templates_based_storage_domain CASCADE; > DROP VIEW if exists vm_templates_based_view CASCADE; > DROP VIEW if exists vm_templates_based_with_plug_info CASCADE; > DROP VIEW if exists vm_templates_storage_domain CASCADE; > DROP VIEW if exists vm_templates_view CASCADE; > DROP VIEW if exists vnic_profiles_view CASCADE; >************************** > >DROP VIEW >2019-02-26 17:06:37,659+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/common_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_column ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_column_def TEXT > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > > EXECUTE v_sql; > END; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_drop_column ( > v_table VARCHAR(128), > v_column VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % or Column % does not exist.', > v_table, > v_column; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_change_column_type ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_type VARCHAR(128), > v_new_type VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > AND ( > udt_name ilike v_type > OR data_type ilike v_type > ) > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > END; > > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_rename_column ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_new_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % or Column % does not exist.', > v_table, > v_column; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_rename_table ( > v_table VARCHAR(128), > v_new_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' RENAME TO ' || v_new_name; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % does not exist.', > v_table; >END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_config_value ( > v_option_name VARCHAR(100), > v_option_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_option_value, > v_version, > v_option_value > ); > END; > ELSE > BEGIN > -- We need to set default value to not have it empty after upgrade from previous versions > UPDATE vdc_options SET > default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version > AND default_value IS NULL; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_value_all_versions (v_option_name VARCHAR(100)) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > ) > ) THEN > BEGIN > DELETE > FROM vdc_options > WHERE option_name ilike v_option_name; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_value ( > v_option_name VARCHAR(100), > v_version TEXT > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version IN ( > SELECT ID > FROM fnSplitter(v_version) > ) > ) > ) THEN > BEGIN > DELETE > FROM vdc_options > WHERE option_name ilike v_option_name > AND version IN ( > SELECT ID > FROM fnSplitter(v_version) > ); > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_for_version (v_version TEXT) >RETURNS void AS $PROCEDURE$ >BEGIN > DELETE > FROM vdc_options > WHERE version IN ( > SELECT ID > FROM fnSplitter(v_version) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_config_value ( > v_option_name VARCHAR(100), > v_option_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > UPDATE vdc_options > SET option_value = v_option_value, > default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_default_config_value ( > v_option_name VARCHAR(100), > v_default_option_value VARCHAR(4000), > v_option_value VARCHAR(4000), > v_version VARCHAR(40), > v_ignore_default_value_case boolean > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > IF (v_ignore_default_value_case) THEN > UPDATE vdc_options > SET option_value = v_option_value > WHERE option_name ilike v_option_name > AND option_value ilike v_default_option_value > AND version = v_version; > ELSE > UPDATE vdc_options > SET option_value = v_option_value > WHERE option_name ilike v_option_name > AND option_value = v_default_option_value > AND version = v_version; > END IF; > > -- We need to update default value regardless of user changes > UPDATE vdc_options > SET default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version; > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_rename_config_key ( > v_old_option_name VARCHAR(100), > v_new_option_name VARCHAR(100), > v_version VARCHAR(40) > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_current_option_value VARCHAR(4000); > > BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_old_option_name > AND version = v_version > ) > ) THEN > v_current_option_value:= option_value > FROM vdc_options > WHERE option_name ilike v_old_option_name > AND version = v_version; > > UPDATE vdc_options > SET option_name = v_new_option_name, > option_value = v_current_option_value > WHERE option_name ilike v_old_option_name > AND version = v_version; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_create_constraint ( > v_table VARCHAR(128), > v_constraint VARCHAR(128), > v_constraint_sql TEXT > ) > RETURNS void AS $PROCEDURE$ > > BEGIN > IF NOT EXISTS ( > SELECT 1 > FROM pg_constraint > WHERE conname ilike v_constraint > ) THEN > EXECUTE 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_drop_constraint ( > v_table VARCHAR(128), > v_constraint VARCHAR(128) > ) > RETURNS void AS $PROCEDURE$ > > BEGIN > IF EXISTS ( > SELECT 1 > FROM pg_constraint > WHERE conname ilike v_constraint > ) THEN > EXECUTE 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION CheckDBConnection () > RETURNS SETOF INT IMMUTABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 1; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_functions_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' > FROM pg_proc > INNER JOIN pg_namespace ns > ON (pg_proc.pronamespace = ns.oid) > WHERE > ns.nspname = 'public' > AND ( > probin IS NULL > OR > -- prevent dropping installed extension functions > probin NOT IN (SELECT '$libdir/' || extname from pg_extension) > ) > ORDER BY proname; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_views_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP VIEW if exists ' || table_name || ' CASCADE;' > FROM information_schema.VIEWS > WHERE table_schema = 'public' > AND table_name NOT ILIKE 'pg_%' > ORDER BY table_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_tables_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP TABLE if exists ' || table_name || ' CASCADE;' > FROM information_schema.tables > WHERE table_schema = 'public' > AND table_type = 'BASE TABLE' > ORDER BY table_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_seq_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP SEQUENCE if exists ' || sequence_name || ' CASCADE;' > FROM information_schema.sequences > WHERE sequence_schema = 'public' > ORDER BY sequence_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_user_types_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, > pg_class c, > pg_type t > WHERE n.oid = c.relnamespace > AND t.typrelid = c.oid > AND c.relkind = 'c'::"char" > AND n.nspname = 'public' > ORDER BY c.relname::information_schema.sql_identifier; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_get_column_size ( > v_table VARCHAR(64), > v_column VARCHAR(64) > ) > RETURNS INT STABLE AS $PROCEDURE$ > > DECLARE retvalue INT; > > BEGIN > retvalue := character_maximum_length > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > AND table_schema = 'public' > AND udt_name IN ( > 'char', > 'varchar' > ); > > RETURN retvalue; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION attach_user_to_role ( > v_user_name VARCHAR(255), > v_domain VARCHAR(255), > v_namespace VARCHAR(255), > v_domain_entry_id TEXT, > v_role_name VARCHAR(255) > ) > RETURNS void AS $BODY$ > > DECLARE selected_user_id uuid; > > input_role_id uuid; > > BEGIN > SELECT roles.id > INTO input_role_id > FROM roles > WHERE roles.name = v_role_name; > > -- The external identifier is the user identifier converted to an array of > -- bytes: > INSERT INTO users ( > user_id, > external_id, > namespace, > name, > domain, > username, > last_admin_check_status > ) > SELECT uuid_generate_v1(), > v_domain_entry_id, > v_namespace, > v_user_name, > v_domain, > v_user_name, > true > WHERE NOT EXISTS ( > SELECT 1 > FROM users > WHERE domain = v_domain > AND external_id = v_domain_entry_id > ); > > SELECT user_id > FROM users > WHERE domain = v_domain > AND external_id = v_domain_entry_id > INTO selected_user_id; > > PERFORM InsertPermission(selected_user_id, uuid_generate_v1(), input_role_id, getGlobalIds('system'), 1); > > END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION attach_group_to_role ( > v_group_name VARCHAR(255), > v_role_name VARCHAR(255) > ) > RETURNS void AS $BODY$ > DECLARE selected_group_id uuid; > input_role_id uuid; > BEGIN > SELECT roles.id > INTO input_role_id > FROM roles > WHERE roles.name = v_role_name; > -- The external identifier is the user identifier converted to an array of > -- bytes: > INSERT INTO ad_groups ( > id, > name, > external_id > ) > SELECT uuid_generate_v1(), > v_group_name, > uuid_generate_v1() > WHERE NOT EXISTS ( > SELECT 1 > FROM ad_groups > WHERE name = v_group_name > ); > SELECT id > FROM ad_groups > WHERE name = v_group_name > INTO selected_group_id; > IF NOT EXISTS ( > SELECT 1 > FROM permissions > WHERE ad_element_id = selected_group_id > AND role_id = input_role_id > ) THEN > PERFORM InsertPermission( > selected_group_id, > uuid_generate_v1(), > input_role_id, > getGlobalIds('system'), > 1); > END IF; > END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_add_action_group_to_role ( > v_role_id UUID, > v_action_group_id INT > ) > RETURNS VOID AS $PROCEDURE$ > > BEGIN > INSERT INTO roles_groups ( > role_id, > action_group_id > ) > SELECT v_role_id, > v_action_group_id > WHERE NOT EXISTS ( > SELECT 1 > FROM roles_groups > WHERE role_id = v_role_id > AND action_group_id = v_action_group_id > ); > > RETURN; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_split_config_value ( > v_option_name VARCHAR, > v_old_option_value VARCHAR, > v_new_option_value VARCHAR, > v_update_from_version VARCHAR > ) > RETURNS void AS $BODY$ > > DECLARE v_old_value VARCHAR(4000); > > v_cur CURSOR > FOR > > SELECT DISTINCT version > FROM vdc_options > WHERE version <> 'general' > ORDER BY version; > > v_version VARCHAR(40); > > v_index INT; > > v_count INT; > > v_total_count INT; > > v_version_count INT; > > BEGIN > v_total_count := count(version) > FROM vdc_options > WHERE option_name = v_option_name; > > v_old_value := option_value > FROM vdc_options > WHERE option_name = v_option_name > AND version = 'general'; > > v_version_count := count(DISTINCT version) > FROM vdc_options > WHERE version <> 'general'; > > IF (v_total_count <= v_version_count) THEN > BEGIN > IF (v_old_value IS NULL) THEN > v_old_value := v_old_option_value; > END IF; > v_count := count(DISTINCT version) > FROM vdc_options > WHERE version <> 'general'; > > v_index := 1; > > OPEN v_cur; > > LOOP > > FETCH v_cur > INTO v_version; > > EXIT when NOT found; > > -- We shouldn't update if already exists > IF ( > NOT EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name = v_option_name > AND version = v_version > ) > ) THEN > -- Might not work well for versions such as 3.10, but we currently don't have any > IF (v_version >= v_update_from_version) THEN > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_new_option_value, > v_version, > v_new_option_value > ); > ELSE > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_old_value, > v_version, > v_old_value > ); > END IF; > > END IF; > v_index := v_index + 1; > END LOOP; > > CLOSE v_cur; > > DELETE > FROM vdc_options > WHERE option_name = v_option_name > AND version = 'general'; > END; >END IF; > >END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_grant_action_group_to_all_roles_filter ( > v_action_group_id INT, > uuid [] > ) >RETURNS void AS $BODY$ > >DECLARE v_role_id_to_filter alias >FOR $2; > >BEGIN > INSERT INTO roles_groups ( > role_id, > action_group_id > ) > SELECT DISTINCT role_id, > v_action_group_id > FROM roles_groups rg > WHERE NOT ARRAY [role_id] <@ v_role_id_to_filter > AND NOT EXISTS ( > SELECT 1 > FROM roles_groups > WHERE role_id = rg.role_id > AND action_group_id = v_action_group_id > ); >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object (v_object regclass) >RETURNS setof record AS $BODY$ > >DECLARE v_sql TEXT; > >v_table record; > >v_table_name TEXT; > >temprec record; > >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > SELECT c.relname, > n.nspname > INTO v_table > FROM pg_class c > INNER JOIN pg_namespace n > ON c.relnamespace = n.oid > WHERE c.oid = v_object; > > -- try to get filtered query syntax from previous execution > IF EXISTS ( > SELECT 1 > FROM object_column_white_list_sql > WHERE object_name = v_table.relname > ) THEN > SELECT sql > INTO v_sql > FROM object_column_white_list_sql > WHERE object_name = v_table.relname; > ELSE > v_table_name := quote_ident(v_table.nspname) || '.' || quote_ident(v_table.relname); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > FOR temprec IN > SELECT a.attname, > t.typname > FROM pg_attribute a > INNER JOIN pg_type t > ON a.atttypid = t.oid > WHERE a.attrelid = v_object > AND a.attnum > 0 > AND NOT a.attisdropped > ORDER BY a.attnum LOOP v_sql := coalesce(v_sql || ', ', 'SELECT '); > > IF EXISTS ( > SELECT 1 > FROM object_column_white_list > WHERE object_name = v_table.relname > AND column_name = temprec.attname > ) THEN v_sql := v_sql || quote_ident(temprec.attname); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident(temprec.typname) || ' as ' || quote_ident(temprec.attname); > END IF; > > END LOOP; > > v_sql := v_sql || ' FROM ' || v_table_name; > > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > > -- save generated query for further use > INSERT INTO object_column_white_list_sql ( > object_name, > sql > ) > VALUES ( > v_table.relname, > v_sql > ); > END IF; > > RETURN QUERY > > EXECUTE v_sql; >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_column_to_object_white_list ( > v_object_name VARCHAR(128), > v_column_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM object_column_white_list > WHERE object_name = v_object_name > AND column_name = v_column_name > ) > ) THEN > BEGIN > -- verify that there is such object in db > IF EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name = v_object_name > AND column_name = v_column_name > ) THEN > INSERT INTO object_column_white_list ( > object_name, > column_name > ) > VALUES ( > v_object_name, > v_column_name > ); > END IF; > > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_is_table_exists (v_table VARCHAR(64)) > RETURNS boolean STABLE AS $PROCEDURE$ > > DECLARE retvalue boolean; > > BEGIN > retvalue := EXISTS ( > SELECT * > FROM information_schema.tables > WHERE table_schema = 'public' > AND table_name ILIKE v_table > ); > > RETURN retvalue; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_create_index ( > v_index_name VARCHAR(128), > v_table_name VARCHAR(128), > v_column_names TEXT, > v_where_predicate TEXT, > v_unique boolean > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_sql TEXT; > unique_modifier varchar(6); > > BEGIN > unique_modifier = CASE WHEN v_unique THEN 'UNIQUE' > ELSE '' > END; > > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || '; CREATE ' || unique_modifier || ' INDEX ' || v_index_name || ' ON ' || v_table_name || '(' || v_column_names || ')'; > > IF v_where_predicate = '' THEN v_sql := v_sql || ';';ELSE > v_sql := v_sql || ' WHERE ' || v_where_predicate || ';'; > END IF; > > EXECUTE v_sql; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR replace FUNCTION fn_db_drop_index ( > v_index_name VARCHAR(128) > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_sql TEXT; > > BEGIN > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || ';' ; > EXECUTE v_sql; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_disk (v_id UUID) >RETURNS void AS $PROCEDURE$ >DECLARE OK INT; > >LOCKED INT; > >BEGIN > OK:= 1; > > LOCKED:= 2; > > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED > AND image_group_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_snapshot (v_id UUID) >RETURNS void AS $PROCEDURE$ >DECLARE OK VARCHAR; > >LOCKED VARCHAR; > >BEGIN > OK:= 'OK'; > > LOCKED:= 'LOCKED'; > > UPDATE snapshots > SET status = OK > WHERE status = LOCKED > AND snapshot_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_entity ( > v_object_type VARCHAR(10), > v_name VARCHAR(255), > v_recursive boolean > ) >RETURNS void AS $PROCEDURE$ >DECLARE DOWN INT; > >OK INT; > >LOCKED INT; > >TEMPLATE_OK INT; > >TEMPLATE_LOCKED INT; > >IMAGE_LOCKED INT; > >SNAPSHOT_OK VARCHAR; > >SNAPSHOT_LOCKED VARCHAR; > >v_id UUID; > >BEGIN > DOWN:= 0; > > OK:= 1; > > LOCKED:= 2; > > TEMPLATE_OK:= 0; > > TEMPLATE_LOCKED:= 1; > > IMAGE_LOCKED:= 15; > > SNAPSHOT_OK:= 'OK'; > > SNAPSHOT_LOCKED:= 'LOCKED'; > > v_id := vm_guid > FROM vm_static > WHERE vm_name = v_name > AND entity_type ilike v_object_type; > > -- set VM status to DOWN > IF (v_object_type = 'vm') THEN > UPDATE vm_dynamic > SET status = DOWN > WHERE status = IMAGE_LOCKED > AND vm_guid = v_id; > -- set Template status to OK > ELSE IF (v_object_type = 'template') THEN > UPDATE vm_static > SET template_status = TEMPLATE_OK > WHERE template_status = TEMPLATE_LOCKED > AND vm_guid = v_id; > END IF; > >END IF; > --unlock images and snapshots if recursive flag is set >IF (v_recursive) THEN > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED > AND image_group_id IN ( > SELECT device_id > FROM vm_device > WHERE vm_id = v_id > AND is_plugged > ); > > UPDATE snapshots > SET status = SNAPSHOT_OK > WHERE status ilike SNAPSHOT_LOCKED > AND vm_id = v_id; >END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_all () >RETURNS void AS $PROCEDURE$ >DECLARE DOWN INT; > >OK INT; > >LOCKED INT; > >TEMPLATE_OK INT; > >TEMPLATE_LOCKED INT; > >IMAGE_LOCKED INT; > >SNAPSHOT_OK VARCHAR; > >SNAPSHOT_LOCKED VARCHAR; > >BEGIN > DOWN:= 0; > > OK:= 1; > > LOCKED:= 2; > > TEMPLATE_OK:= 0; > > TEMPLATE_LOCKED:= 1; > > IMAGE_LOCKED:= 15; > > SNAPSHOT_OK:= 'OK'; > > SNAPSHOT_LOCKED:= 'LOCKED'; > > UPDATE vm_static > SET template_status = TEMPLATE_OK > WHERE template_status = TEMPLATE_LOCKED; > > UPDATE vm_dynamic > SET status = DOWN > WHERE status = IMAGE_LOCKED; > > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED; > > UPDATE snapshots > SET status = SNAPSHOT_OK > WHERE status ilike SNAPSHOT_LOCKED; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/* Displays DC id , DC name, SPM Host id , SPM Host name and number of async tasks awaiting. > >1) create a record type with DC name, DC id, SPM host id, SPM host name, count > >2) get all distinct DC ids from async_tasks table > >3) Run a cursor for each result in 2) > > a) get DC name > b) get SPM Host id & name if available > c) get count of tasks > > return current record > >4) return set of generated records >*/ >DROP TYPE IF EXISTS async_tasks_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE async_tasks_info_rs AS ( > dc_id uuid, > dc_name VARCHAR, > spm_host_id uuid, > spm_host_name VARCHAR, > task_count INT > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_get_async_tasks () >RETURNS SETOF async_tasks_info_rs STABLE AS $PROCEDURE$ >DECLARE v_record async_tasks_info_rs; > >-- selects storage_pool_id uuid found in async_tasks >v_tasks_cursor CURSOR >FOR > >SELECT DISTINCT storage_pool_id >FROM async_tasks; > >BEGIN > OPEN v_tasks_cursor; > > FETCH v_tasks_cursor > INTO v_record.dc_id; > > WHILE FOUND > LOOP > -- get dc_name and SPM Host id > v_record.dc_name := name FROM storage_pool WHERE id = v_record.dc_id; > v_record.spm_host_id := spm_vds_id > FROM storage_pool > WHERE id = v_record.dc_id; > > -- get Host name if we have non NULL SPM Host > IF (v_record.spm_host_id IS NOT NULL) THEN > v_record.spm_host_name := vds_name > FROM vds_static > WHERE vds_id = v_record.spm_host_id; > ELSE > v_record.spm_host_name:= ''; > END IF; > -- get tasks count for this DC > v_record.task_count := count(*) > FROM async_tasks > WHERE position(cast(v_record.dc_id AS VARCHAR) IN action_parameters) > 0; > > -- return the record > RETURN NEXT v_record; > > FETCH v_tasks_cursor > INTO v_record.dc_id; > > END LOOP; > >CLOSE v_tasks_cursor; > >-- return full set of generated records >RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_remove_csv_config_value ( > v_option_name VARCHAR(100), > v_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v VARCHAR []; > >e VARCHAR; > >v_result VARCHAR; > >v_sep VARCHAR(1); > >BEGIN > v_result := ''; > > v_sep := ''; > > v := string_to_array(option_value, ',') > FROM vdc_options > WHERE option_name = v_option_name > AND version = v_version; > FOR > > e IN > > SELECT unnest(v) LOOP > > IF (e != v_value) THEN v_result := v_result || v_sep || e; > v_sep := ','; > END IF; > >END >LOOP; > > UPDATE vdc_options > SET option_value = v_result > WHERE option_name = v_option_name > AND version = v_version; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_remove_uuid_from_csv ( > v_csv_text TEXT, > v_uuid uuid > ) >RETURNS TEXT STABLE AS $PROCEDURE$ >DECLARE v uuid []; > >e uuid; > >v_result TEXT; > >v_sep VARCHAR(1); > >BEGIN > v_result := ''; > > v_sep := ''; > > v := string_to_array(v_csv_text, ','); > FOR > > e IN > > SELECT unnest(v) LOOP > > IF (e != v_uuid) THEN v_result := v_result || v_sep || e; > v_sep := ','; > END IF; > > END LOOP; > > IF (v_result = '') THEN v_result := NULL; > END IF; > RETURN v_result; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_config_value_for_versions_up_to ( > v_option_name VARCHAR(100), > v_val VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >DECLARE i INT; > >arr VARCHAR [] := array ['4.1', '4.2', '4.3']; > >BEGIN > FOR i IN array_lower(arr, 1)..array_upper(arr, 1) LOOP PERFORM fn_db_add_config_value(v_option_name, v_val, arr [i]); > EXIT WHEN arr [i] = v_version; > END LOOP; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_varchar_to_jsonb(v_text VARCHAR, v_default_value JSONB) >RETURNS JSONB IMMUTABLE AS $PROCEDURE$ >BEGIN > RETURN v_text::jsonb; > EXCEPTION > WHEN SQLSTATE '22P02' THEN -- '22P02' stands for 'invalid_text_representation', 'invalid input syntax for type json' in this case > RETURN v_default_value; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_column_to_jsonb_compatible_values( > v_table VARCHAR, > v_column VARCHAR, > v_default_value JSONB > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE > default_value_string VARCHAR; >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name = v_table > AND column_name = v_column > AND data_type = 'character varying' > ) > ) THEN > BEGIN > default_value_string := CASE > WHEN v_default_value IS NULL THEN 'NULL' > ELSE '''' || v_default_value::VARCHAR || '''' > END; > EXECUTE 'UPDATE ' || v_table || ' SET ' || v_column || ' = (SELECT fn_db_varchar_to_jsonb(' || v_column || ', ' || default_value_string || '))'; > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_change_table_string_columns_to_empty_string ( > v_table VARCHAR(128), > v_column VARCHAR[] > ) >RETURNS void AS $PROCEDURE$ >DECLARE > v_sql TEXT; > v_num integer := array_length(v_column, 1); > v_index integer := 1; > >BEGIN > WHILE v_index <= v_num > LOOP > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column[v_index] > ) > ) THEN > BEGIN > v_sql := 'UPDATE ' || v_table || ' SET ' || v_column[v_index] || ' = '''' WHERE ' || v_column[v_index] || ' IS NULL' ; > EXECUTE v_sql; > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column[v_index] || ' SET DEFAULT '''''; > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'No column named % exists in table %', v_column[v_index] , v_table; > END IF; > v_index = v_index + 1; > END LOOP; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >select * from generate_drop_all_functions_syntax(); >************************** > > drop function if exists public.addconnectiontoiscsibond(uuid, character varying) cascade; > drop function if exists public.addglusterserverknownaddress(uuid, character varying) cascade; > drop function if exists public.addhosttolabels(uuid, uuid[]) cascade; > drop function if exists public.addnetworktoiscsibond(uuid, uuid) cascade; > drop function if exists public.addvmtolabels(uuid, uuid[]) cascade; > drop function if exists public.attach_group_to_role(character varying, character varying) cascade; > drop function if exists public.attach_user_to_role(character varying, character varying, character varying, text, character varying) cascade; > drop function if exists public.boundvmpoolprestartedvms(uuid) cascade; > drop function if exists public.calculateallclusterusage() cascade; > drop function if exists public.calculateallstorageusage() cascade; > drop function if exists public.calculateclusterusage(uuid, uuid) cascade; > drop function if exists public.calculatestorageusage(uuid, uuid) cascade; > drop function if exists public.checkdbconnection() cascade; > drop function if exists public.checkifexistshostthatmissesnetworkincluster(uuid, character varying, integer) cascade; > drop function if exists public.checkifexistshostwithstatusincluster(uuid, integer) cascade; > drop function if exists public.checkifjobhastasks(uuid) cascade; > drop function if exists public.checkifsnapshotexistsbyvmidandsnapshotid(uuid, uuid) cascade; > drop function if exists public.checkifsnapshotexistsbyvmidandstatus(uuid, character varying) cascade; > drop function if exists public.checkifsnapshotexistsbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.checkvmhostdeviceavailability(uuid, uuid) cascade; > drop function if exists public.cleandownvms() cascade; > drop function if exists public.clear_network_from_nics(uuid) cascade; > drop function if exists public.clear_osinfo() cascade; > drop function if exists public.clearallauditlogevents(integer) cascade; > drop function if exists public.clearalldeviceaddressesbyvmid(uuid) cascade; > drop function if exists public.clearmigratingtovds(uuid) cascade; > drop function if exists public.clearvmdeviceaddress(uuid) cascade; > drop function if exists public.createlabel(uuid, character varying, boolean, uuid[], uuid[]) cascade; > drop function if exists public.delete_entity_snapshot_by_command_id(uuid) cascade; > drop function if exists public.delete_roles_groups(integer, uuid) cascade; > drop function if exists public.deleteaffinitygroup(uuid) cascade; > drop function if exists public.deleteallcommandentities() cascade; > drop function if exists public.deleteallcommandentitiesbycommandid(uuid) cascade; > drop function if exists public.deleteallfromenginesessions() cascade; > drop function if exists public.deleteallfromvmicondefaults() cascade; > drop function if exists public.deleteallglusterhooks(uuid) cascade; > drop function if exists public.deleteallunusedvmicons() cascade; > drop function if exists public.deleteallvfsconfiglabels(uuid) cascade; > drop function if exists public.deleteallvfsconfignetworks(uuid) cascade; > drop function if exists public.deleteallvmbackupdiskmapbyvmbackupid(uuid) cascade; > drop function if exists public.deleteallvmcheckpointdiskmapbyvmcheckpointid(uuid) cascade; > drop function if exists public.deleteasync_tasks(uuid) cascade; > drop function if exists public.deleteasynctasksbyvdsmtaskid(uuid) cascade; > drop function if exists public.deleteauditalertlogbyvdsidandtype(uuid, integer) cascade; > drop function if exists public.deleteauditalertlogbyvolumeidandtype(uuid, integer) cascade; > drop function if exists public.deleteauditlog(bigint) cascade; > drop function if exists public.deleteauditlogalertsbyvdsid(uuid, boolean) cascade; > drop function if exists public.deleteauditlogolderthendate(timestamp with time zone) cascade; > drop function if exists public.deletebackuprelatedalerts() cascade; > drop function if exists public.deletebasedisk(uuid) cascade; > drop function if exists public.deletebookmark(uuid) cascade; > drop function if exists public.deletebypoolvds_spm_id_map(uuid, uuid) cascade; > drop function if exists public.deletecinderstorage(uuid) cascade; > drop function if exists public.deletecluster(uuid) cascade; > drop function if exists public.deleteclusterpolicy(uuid) cascade; > drop function if exists public.deleteclusterpolicyunitsbyclusterpolicyid(uuid) cascade; > drop function if exists public.deletecommandentitiesbycommandid(uuid) cascade; > drop function if exists public.deletecommandentitiesolderthandate(timestamp with time zone) cascade; > drop function if exists public.deletecommandentity(uuid) cascade; > drop function if exists public.deletecompletedjobsolderthandate(timestamp with time zone, timestamp with time zone) cascade; > drop function if exists public.deletecpuprofile(uuid) cascade; > drop function if exists public.deletecustom_actions(integer) cascade; > drop function if exists public.deletedisk_image_dynamic(uuid) cascade; > drop function if exists public.deletedisklunmap(uuid, character varying) cascade; > drop function if exists public.deletediskprofile(uuid) cascade; > drop function if exists public.deletediskvmelement(uuid, uuid) cascade; > drop function if exists public.deletednsresolverconfiguration(uuid) cascade; > drop function if exists public.deletednsresolverconfigurationbynetworkattachmentid(uuid) cascade; > drop function if exists public.deletednsresolverconfigurationbynetworkid(uuid) cascade; > drop function if exists public.deletednsresolverconfigurationbyvdsdynamicid(uuid) cascade; > drop function if exists public.deleteenginesession(integer) cascade; > drop function if exists public.deleteentitysnapshotbycommandid(uuid) cascade; > drop function if exists public.deleteevent_notification_hist(timestamp without time zone) cascade; > drop function if exists public.deleteevent_subscriber(character varying, character varying, uuid, character varying) cascade; > drop function if exists public.deleteexternalvariable(character varying) cascade; > drop function if exists public.deletefenceagent(uuid) cascade; > drop function if exists public.deletefenceagentsbyvdsid(uuid) cascade; > drop function if exists public.deleteglustergeorepsession(uuid) cascade; > drop function if exists public.deleteglusterhook(uuid, character varying, character varying, character varying) cascade; > drop function if exists public.deleteglusterhookbyid(uuid) cascade; > drop function if exists public.deleteglusterhooksbyids(text) cascade; > drop function if exists public.deleteglusterserver(uuid) cascade; > drop function if exists public.deleteglusterserverbyglusterserveruuid(uuid) cascade; > drop function if exists public.deleteglusterserverhook(uuid, uuid) cascade; > drop function if exists public.deleteglusterserverhookbyid(uuid) cascade; > drop function if exists public.deleteglusterserverhooksbyids(text) cascade; > drop function if exists public.deleteglusterserverservice(uuid) cascade; > drop function if exists public.deleteglustervolumeaccessprotocol(uuid, character varying) cascade; > drop function if exists public.deleteglustervolumebrick(uuid) cascade; > drop function if exists public.deleteglustervolumebricks(character varying) cascade; > drop function if exists public.deleteglustervolumebyguid(uuid) cascade; > drop function if exists public.deleteglustervolumebyname(uuid, character varying) cascade; > drop function if exists public.deleteglustervolumeoption(uuid) cascade; > drop function if exists public.deleteglustervolumeoptions(character varying) cascade; > drop function if exists public.deleteglustervolumesbyclusterid(uuid) cascade; > drop function if exists public.deleteglustervolumesbyguids(character varying) cascade; > drop function if exists public.deleteglustervolumesnapshotbyguid(uuid) cascade; > drop function if exists public.deleteglustervolumesnapshotbyname(uuid, character varying) cascade; > drop function if exists public.deleteglustervolumesnapshotsbyvolumeid(uuid) cascade; > drop function if exists public.deleteglustervolumesnapshotschedulebyvolumeid(uuid) cascade; > drop function if exists public.deleteglustervolumessnapshotbyids(character varying) cascade; > drop function if exists public.deleteglustervolumetransporttype(uuid, character varying) cascade; > drop function if exists public.deletegroup(uuid) cascade; > drop function if exists public.deletehostdevice(uuid, character varying) cascade; > drop function if exists public.deletehostnicvfsconfig(uuid) cascade; > drop function if exists public.deleteimage(uuid) cascade; > drop function if exists public.deleteimage_storage_domain_map(uuid, uuid) cascade; > drop function if exists public.deleteimage_storage_domain_map_by_image_id(uuid) cascade; > drop function if exists public.deleteimageuploads(uuid) cascade; > drop function if exists public.deleteiscsibond(uuid) cascade; > drop function if exists public.deletejob(uuid) cascade; > drop function if exists public.deletejobolderthandatewithstatus(timestamp with time zone, text) cascade; > drop function if exists public.deletelabel(uuid) cascade; > drop function if exists public.deletelibvirtsecret(uuid) cascade; > drop function if exists public.deletelun(character varying) cascade; > drop function if exists public.deletelun_storage_server_connection_map(character varying, character varying) cascade; > drop function if exists public.deletemacpool(uuid) cascade; > drop function if exists public.deletemacpoolrangesbymacpoolid(uuid) cascade; > drop function if exists public.deletenameserversbydnsresolverconfigurationid(uuid) cascade; > drop function if exists public.deletenetwork(uuid) cascade; > drop function if exists public.deletenetwork_cluster(uuid, uuid) cascade; > drop function if exists public.deletenetworkattachment(uuid) cascade; > drop function if exists public.deletenumanode(uuid) cascade; > drop function if exists public.deletenumanodecpubynumanodeid(uuid) cascade; > drop function if exists public.deletenumanodemapbyvmnumanodeid(uuid) cascade; > drop function if exists public.deleteorphanjobs() cascade; > drop function if exists public.deleteovfgenerations(character varying) cascade; > drop function if exists public.deletepermission(uuid) cascade; > drop function if exists public.deletepermissionsbyentityid(uuid) cascade; > drop function if exists public.deletepermissionsbyentityids(uuid[]) cascade; > drop function if exists public.deletepolicyunit(uuid) cascade; > drop function if exists public.deleteprovider(uuid) cascade; > drop function if exists public.deleteqos(uuid) cascade; > drop function if exists public.deletequotabyquotaguid(uuid) cascade; > drop function if exists public.deletequotalimitationbyquotaguid(uuid) cascade; > drop function if exists public.deleterepo_domain_file_list(uuid, integer) cascade; > drop function if exists public.deleterole(uuid) cascade; > drop function if exists public.deleterunningjobsoftasklesscommands() cascade; > drop function if exists public.deletesnapshot(uuid) cascade; > drop function if exists public.deletestep(uuid) cascade; > drop function if exists public.deletestepsubjectentity(uuid, uuid) cascade; > drop function if exists public.deletestorage_domain_dynamic(uuid) cascade; > drop function if exists public.deletestorage_domain_static(uuid) cascade; > drop function if exists public.deletestorage_pool(uuid) cascade; > drop function if exists public.deletestorage_pool_iso_map(uuid, uuid) cascade; > drop function if exists public.deletestorage_server_connections(character varying) cascade; > drop function if exists public.deletestoragedevicebyid(uuid) cascade; > drop function if exists public.deletestoragedomaindr(uuid, uuid) cascade; > drop function if exists public.deletestoragedomainovfinfo(uuid) cascade; > drop function if exists public.deletestorageserverconnectionextension(uuid) cascade; > drop function if exists public.deletesupportedclusterfeature(uuid, uuid) cascade; > drop function if exists public.deletetags(uuid) cascade; > drop function if exists public.deletetags_user_group_map(uuid, uuid) cascade; > drop function if exists public.deletetags_user_map(uuid, uuid) cascade; > drop function if exists public.deletetags_vds_map(uuid, uuid) cascade; > drop function if exists public.deletetags_vm_map(uuid, uuid) cascade; > drop function if exists public.deletetags_vm_pool_map(uuid, uuid) cascade; > drop function if exists public.deleteuser(uuid) cascade; > drop function if exists public.deleteuserprofile(uuid) cascade; > drop function if exists public.deletevdcoption(integer) cascade; > drop function if exists public.deletevds(uuid) cascade; > drop function if exists public.deletevds_interface(uuid) cascade; > drop function if exists public.deletevds_interface_statistics(uuid) cascade; > drop function if exists public.deletevds_spm_id_map(uuid) cascade; > drop function if exists public.deletevdsdynamic(uuid) cascade; > drop function if exists public.deletevdsstatic(uuid) cascade; > drop function if exists public.deletevdsstatistics(uuid) cascade; > drop function if exists public.deletevfsconfiglabel(uuid, text) cascade; > drop function if exists public.deletevfsconfignetwork(uuid, uuid) cascade; > drop function if exists public.deletevm(uuid) cascade; > drop function if exists public.deletevm_interface_statistics(uuid) cascade; > drop function if exists public.deletevm_pool_map(uuid) cascade; > drop function if exists public.deletevm_pools(uuid) cascade; > drop function if exists public.deletevmbackup(uuid) cascade; > drop function if exists public.deletevmcheckpoint(uuid) cascade; > drop function if exists public.deletevmdevice(uuid, uuid) cascade; > drop function if exists public.deletevmdevicesbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.deletevmdynamic(uuid) cascade; > drop function if exists public.deletevmguestagentinterfacesbyvmids(uuid[]) cascade; > drop function if exists public.deletevmicon(uuid) cascade; > drop function if exists public.deletevmicondefault(uuid) cascade; > drop function if exists public.deletevmiconifunused(uuid) cascade; > drop function if exists public.deletevminit(uuid) cascade; > drop function if exists public.deletevminterface(uuid) cascade; > drop function if exists public.deletevminterfacefilterparameter(uuid) cascade; > drop function if exists public.deletevmjobs(uuid) cascade; > drop function if exists public.deletevmstatic(uuid, boolean) cascade; > drop function if exists public.deletevmstatistics(uuid) cascade; > drop function if exists public.deletevmtemplates(uuid) cascade; > drop function if exists public.deletevnicprofile(uuid) cascade; > drop function if exists public.displayallauditlogevents(integer) cascade; > drop function if exists public.existsvmdevicebyvmidandtype(uuid, character varying) cascade; > drop function if exists public.fn_authz_entry_info(uuid) cascade; > drop function if exists public.fn_db_add_action_group_to_role(uuid, integer) cascade; > drop function if exists public.fn_db_add_column(character varying, character varying, text) cascade; > drop function if exists public.fn_db_add_column_to_object_white_list(character varying, character varying) cascade; > drop function if exists public.fn_db_add_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_add_config_value_for_versions_up_to(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_change_column_type(character varying, character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_change_table_string_columns_to_empty_string(character varying, character varying[]) cascade; > drop function if exists public.fn_db_create_constraint(character varying, character varying, text) cascade; > drop function if exists public.fn_db_create_index(character varying, character varying, text, text, boolean) cascade; > drop function if exists public.fn_db_delete_config_for_version(text) cascade; > drop function if exists public.fn_db_delete_config_value(character varying, text) cascade; > drop function if exists public.fn_db_delete_config_value_all_versions(character varying) cascade; > drop function if exists public.fn_db_drop_column(character varying, character varying) cascade; > drop function if exists public.fn_db_drop_constraint(character varying, character varying) cascade; > drop function if exists public.fn_db_drop_index(character varying) cascade; > drop function if exists public.fn_db_get_async_tasks() cascade; > drop function if exists public.fn_db_grant_action_group_to_all_roles_filter(integer, uuid[]) cascade; > drop function if exists public.fn_db_is_table_exists(character varying) cascade; > drop function if exists public.fn_db_mask_object(regclass) cascade; > drop function if exists public.fn_db_remove_csv_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_remove_uuid_from_csv(text, uuid) cascade; > drop function if exists public.fn_db_rename_column(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_rename_config_key(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_rename_table(character varying, character varying) cascade; > drop function if exists public.fn_db_split_config_value(character varying, character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_unlock_all() cascade; > drop function if exists public.fn_db_unlock_disk(uuid) cascade; > drop function if exists public.fn_db_unlock_entity(character varying, character varying, boolean) cascade; > drop function if exists public.fn_db_unlock_snapshot(uuid) cascade; > drop function if exists public.fn_db_update_column_to_jsonb_compatible_values(character varying, character varying, jsonb) cascade; > drop function if exists public.fn_db_update_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_update_default_config_value(character varying, character varying, character varying, character varying, boolean) cascade; > drop function if exists public.fn_db_varchar_to_jsonb(character varying, jsonb) cascade; > drop function if exists public.fn_get_ad_element_name(uuid) cascade; > drop function if exists public.fn_get_column_size(character varying, character varying) cascade; > drop function if exists public.fn_get_comparable_ip_list(text) cascade; > drop function if exists public.fn_get_dedicated_hosts_ids_by_vm_id(uuid) cascade; > drop function if exists public.fn_get_entity_name(uuid, integer) cascade; > drop function if exists public.fn_get_entity_parents(uuid, integer) cascade; > drop function if exists public.fn_get_num_of_vcpus(vm_static) cascade; > drop function if exists public.fn_image_deleted() cascade; > drop function if exists public.fn_perms_get_storage_pools_with_permitted_action_on_clusters(uuid, integer, boolean, boolean) cascade; > drop function if exists public.fn_user_permissions(uuid) cascade; > drop function if exists public.fnsplitter(text) cascade; > drop function if exists public.fnsplitterinteger(text) cascade; > drop function if exists public.fnsplitteruuid(text) cascade; > drop function if exists public.fnsplitterwithseperator(text, character varying) cascade; > drop function if exists public.force_delete_storage_domain(uuid) cascade; > drop function if exists public.freehostdevicesusedbyvmid(uuid) cascade; > drop function if exists public.generate_drop_all_functions_syntax() cascade; > drop function if exists public.generate_drop_all_seq_syntax() cascade; > drop function if exists public.generate_drop_all_tables_syntax() cascade; > drop function if exists public.generate_drop_all_user_types_syntax() cascade; > drop function if exists public.generate_drop_all_views_syntax() cascade; > drop function if exists public.get_all_commands() cascade; > drop function if exists public.get_entity_permissions(uuid, integer, uuid, integer) cascade; > drop function if exists public.get_entity_permissions_for_user_and_groups(uuid, text, integer, uuid, integer, boolean) cascade; > drop function if exists public.get_entity_snapshot_by_command_id(uuid) cascade; > drop function if exists public.get_entity_snapshot_by_id(uuid) cascade; > drop function if exists public.get_oauth_client(character varying) cascade; > drop function if exists public.get_role_groups_by_role_id(uuid) cascade; > drop function if exists public.get_roles_groups_by_action_group_id_and_by_role_id(integer, uuid) cascade; > drop function if exists public.get_seconds_to_wait_before_pm_operation(character varying, character varying, integer) cascade; > drop function if exists public.getaccessprotocolsbyglustervolumeguid(uuid) cascade; > drop function if exists public.getactivevmnameswithisoattached(uuid) cascade; > drop function if exists public.getactivevmnameswithisoonstoragedomain(uuid) cascade; > drop function if exists public.getactivevmswithleaseonstoragedomain(uuid) cascade; > drop function if exists public.getallbystatus(integer) cascade; > drop function if exists public.getallfromasync_tasks() cascade; > drop function if exists public.getallfromauditlog(uuid, boolean) cascade; > drop function if exists public.getallfrombasedisks() cascade; > drop function if exists public.getallfrombookmarks() cascade; > drop function if exists public.getallfromclusterpolicys() cascade; > drop function if exists public.getallfromclusterpolicyunits() cascade; > drop function if exists public.getallfromcommandentities() cascade; > drop function if exists public.getallfromcpuprofiles() cascade; > drop function if exists public.getallfromcustom_actions() cascade; > drop function if exists public.getallfromdisk_image_dynamic() cascade; > drop function if exists public.getallfromdisklunmaps() cascade; > drop function if exists public.getallfromdiskprofiles() cascade; > drop function if exists public.getallfromdnsresolverconfigurations() cascade; > drop function if exists public.getallfromglusterservices() cascade; > drop function if exists public.getallfromhostdevices() cascade; > drop function if exists public.getallfromhostnicvfsconfigs() cascade; > drop function if exists public.getallfromimages() cascade; > drop function if exists public.getallfromimageuploads() cascade; > drop function if exists public.getallfromiscsibonds() cascade; > drop function if exists public.getallfromlibvirtsecrets() cascade; > drop function if exists public.getallfromlun_storage_server_connection_map() cascade; > drop function if exists public.getallfrommacpools() cascade; > drop function if exists public.getallfromnetwork(uuid, boolean) cascade; > drop function if exists public.getallfromnetwork_cluster() cascade; > drop function if exists public.getallfromnetwork_clusterbyclusterid(uuid) cascade; > drop function if exists public.getallfromnetwork_clusterbynetworkid(uuid) cascade; > drop function if exists public.getallfromnetworkattachments() cascade; > drop function if exists public.getallfromnumanodecpumap() cascade; > drop function if exists public.getallfrompolicyunits() cascade; > drop function if exists public.getallfromproviders() cascade; > drop function if exists public.getallfromprovidersbytypes(character varying[]) cascade; > drop function if exists public.getallfromrole(integer) cascade; > drop function if exists public.getallfromsnapshots() cascade; > drop function if exists public.getallfromsnapshotsbyvmid(uuid, uuid, boolean, boolean) cascade; > drop function if exists public.getallfromstorage_domain_dynamic() cascade; > drop function if exists public.getallfromstorage_domain_static() cascade; > drop function if exists public.getallfromstorage_pool(uuid, boolean) cascade; > drop function if exists public.getallfromstorage_pool_iso_map() cascade; > drop function if exists public.getallfromstorageserverconnectionextensions() cascade; > drop function if exists public.getallfromtags() cascade; > drop function if exists public.getallfromtags_user_group_map() cascade; > drop function if exists public.getallfromtags_user_map() cascade; > drop function if exists public.getallfromtags_vds_map() cascade; > drop function if exists public.getallfromtags_vm_map() cascade; > drop function if exists public.getallfromtags_vm_pool_map() cascade; > drop function if exists public.getallfromusers(uuid, boolean) cascade; > drop function if exists public.getallfromvdcoption() cascade; > drop function if exists public.getallfromvds_spm_id_map() cascade; > drop function if exists public.getallfromvdsdynamic() cascade; > drop function if exists public.getallfromvdsstatic() cascade; > drop function if exists public.getallfromvdsstatistics() cascade; > drop function if exists public.getallfromvm_pool_map() cascade; > drop function if exists public.getallfromvm_pools() cascade; > drop function if exists public.getallfromvmbackups() cascade; > drop function if exists public.getallfromvmcheckpoints() cascade; > drop function if exists public.getallfromvmdynamic() cascade; > drop function if exists public.getallfromvmicondefaults() cascade; > drop function if exists public.getallfromvmicons() cascade; > drop function if exists public.getallfromvmiconsfiltered(uuid, boolean) cascade; > drop function if exists public.getallfromvminterfacefilterparameters() cascade; > drop function if exists public.getallfromvminterfaces() cascade; > drop function if exists public.getallfromvmstatic() cascade; > drop function if exists public.getallfromvmstaticbystoragepoolid(uuid) cascade; > drop function if exists public.getallfromvmstatistics() cascade; > drop function if exists public.getallfromvnicprofiles() cascade; > drop function if exists public.getallgroups() cascade; > drop function if exists public.getallhashesfromvmdynamic() cascade; > drop function if exists public.getalljobidsbyentityid(uuid) cascade; > drop function if exists public.getalljobs() cascade; > drop function if exists public.getalllibvirtsecretsbyproviderid(uuid) cascade; > drop function if exists public.getallmacpoolrangesbymacpoolid(uuid) cascade; > drop function if exists public.getallmacsbymacpoolid(uuid) cascade; > drop function if exists public.getallmanagementnetworksbydatacenterid(uuid) cascade; > drop function if exists public.getallnetworkbyclusterid(uuid, uuid, boolean) cascade; > drop function if exists public.getallnetworkbystoragepoolid(uuid, uuid, boolean) cascade; > drop function if exists public.getallnetworkfilters() cascade; > drop function if exists public.getallnetworklabelsbydatacenterid(uuid) cascade; > drop function if exists public.getallnetworksbynetworkproviderid(uuid) cascade; > drop function if exists public.getallnetworksbyproviderphysicalnetworkid(uuid) cascade; > drop function if exists public.getallnetworksbyqosid(uuid) cascade; > drop function if exists public.getallnonadminroles(integer) cascade; > drop function if exists public.getallovfentitiesforstoragedomainbyentitytype(uuid, character varying) cascade; > drop function if exists public.getallqosbyqostype(smallint) cascade; > drop function if exists public.getallqosforstoragepool(uuid) cascade; > drop function if exists public.getallqosforstoragepoolbyqostype(uuid, smallint) cascade; > drop function if exists public.getallsnapshotsbymemorydisk(uuid) cascade; > drop function if exists public.getallsnapshotsbystoragedomainid(uuid) cascade; > drop function if exists public.getallsteps() cascade; > drop function if exists public.getallstorage_server_connections() cascade; > drop function if exists public.getallsupportednetworkfiltersbyversion(character varying) cascade; > drop function if exists public.getallunfinishedvdskdumpstatus() cascade; > drop function if exists public.getallvfsconfigbyhostid(uuid) cascade; > drop function if exists public.getallvmjobs() cascade; > drop function if exists public.getanyadminrolebyuseridandgroupids(uuid, text, integer) cascade; > drop function if exists public.getasync_tasksbytask_id(uuid) cascade; > drop function if exists public.getasynctaskentitiesbytaskid(uuid) cascade; > drop function if exists public.getasynctasksbyentityid(uuid) cascade; > drop function if exists public.getasynctasksbystoragepoolid(uuid) cascade; > drop function if exists public.getasynctasksbyvdsmtaskid(uuid) cascade; > drop function if exists public.getasynctasksidsbyentityid(uuid) cascade; > drop function if exists public.getauditlogbyauditlogid(bigint) cascade; > drop function if exists public.getauditlogbyoriginandcustomeventid(character varying, integer) cascade; > drop function if exists public.getauditlogbyvmid(uuid, uuid, boolean) cascade; > drop function if exists public.getauditlogbyvmtemplateid(uuid, uuid, boolean) cascade; > drop function if exists public.getauditlogbyvolumeidandtype(uuid, integer) cascade; > drop function if exists public.getauditloglaterthendate(timestamp with time zone) cascade; > drop function if exists public.getbasediskbybasediskid(uuid) cascade; > drop function if exists public.getbasedisksbyalias(character varying) cascade; > drop function if exists public.getbookmarkbybookmark_id(uuid) cascade; > drop function if exists public.getbookmarkbybookmark_name(character varying) cascade; > drop function if exists public.getbrickdetailsbyid(uuid) cascade; > drop function if exists public.getcinderstorage(uuid) cascade; > drop function if exists public.getcinderstoragebydrivers(jsonb) cascade; > drop function if exists public.getclusterfeaturesbyversionandcategory(character varying, integer) cascade; > drop function if exists public.getclusterpolicybyclusterpolicyid(uuid) cascade; > drop function if exists public.getclusterpolicyunitsbyclusterpolicyid(uuid) cascade; > drop function if exists public.getcommandassociatedentities(uuid) cascade; > drop function if exists public.getcommandentitiesbyparentcmdid(uuid) cascade; > drop function if exists public.getcommandentitybycommandentityid(uuid) cascade; > drop function if exists public.getcommandidsbyentityid(uuid) cascade; > drop function if exists public.getconnectionsbyiscsibondid(uuid) cascade; > drop function if exists public.getcpuprofilebycpuprofileid(uuid) cascade; > drop function if exists public.getcpuprofilesbyclusterid(uuid, uuid, boolean, integer) cascade; > drop function if exists public.getcpuprofilesbyqosid(uuid) cascade; > drop function if exists public.getcustom_actionsbyaction_id(integer) cascade; > drop function if exists public.getcustom_actionsbynameandtab(character varying, integer) cascade; > drop function if exists public.getcustom_actionsbytab_id(integer) cascade; > drop function if exists public.getdbgeneration(uuid) cascade; > drop function if exists public.getdcidbyexternalnetworkid(text) cascade; > drop function if exists public.getdefaultmacpool() cascade; > drop function if exists public.getdisk_image_dynamicbyimage_id(uuid) cascade; > drop function if exists public.getdiskbydiskidandstoragedomainid(uuid, uuid) cascade; > drop function if exists public.getdisklunmapbydiskid(uuid) cascade; > drop function if exists public.getdisklunmapbydisklunmapid(uuid, character varying) cascade; > drop function if exists public.getdisklunmapbylunid(character varying) cascade; > drop function if exists public.getdisklunmapsforvmsinpool(uuid) cascade; > drop function if exists public.getdiskprofilebydiskprofileid(uuid) cascade; > drop function if exists public.getdiskprofilesbyqosid(uuid) cascade; > drop function if exists public.getdiskprofilesbystoragedomainid(uuid, uuid, boolean) cascade; > drop function if exists public.getdisksvmguidbasicview(uuid, boolean, uuid, boolean) cascade; > drop function if exists public.getdnsresolverconfigurationbydnsresolverconfigurationid(uuid) cascade; > drop function if exists public.getdwhhistorytimekeepingbyvarname(character varying) cascade; > drop function if exists public.getelementidsbyidandgroups(uuid, text) cascade; > drop function if exists public.getenginesession(integer) cascade; > drop function if exists public.getenginesessionbysessionid(text) cascade; > drop function if exists public.getentitiesbydiskid(uuid) cascade; > drop function if exists public.getentitiesnamemap() cascade; > drop function if exists public.getevent_subscriberbysubscriber_id(uuid) cascade; > drop function if exists public.getexternalidsfromsteps(character varying, character varying) cascade; > drop function if exists public.getexternalvariablebyname(character varying) cascade; > drop function if exists public.getfenceagentbyid(uuid) cascade; > drop function if exists public.getfenceagentsbyvdsid(uuid) cascade; > drop function if exists public.getglobalids(character varying) cascade; > drop function if exists public.getglusterclusterservicesbyclusterid(uuid) cascade; > drop function if exists public.getglusterclusterservicesbyclusteridandservicetype(uuid, character varying) cascade; > drop function if exists public.getglustergeorepsessiondetails(uuid) cascade; > drop function if exists public.getglustergeorepsessiondetailsforbrick(uuid, uuid) cascade; > drop function if exists public.getglustergeorepsessionunsetconfig(uuid) cascade; > drop function if exists public.getglusterhook(uuid, character varying, character varying, character varying, boolean) cascade; > drop function if exists public.getglusterhookbyid(uuid, boolean) cascade; > drop function if exists public.getglusterhookcontentbyid(uuid) cascade; > drop function if exists public.getglusterhooksbyclusterid(uuid) cascade; > drop function if exists public.getglusteroptionbyid(uuid) cascade; > drop function if exists public.getglusterserverbyglusterserveruuid(uuid) cascade; > drop function if exists public.getglusterserverbyserverid(uuid) cascade; > drop function if exists public.getglusterservicebyglusterserviceid(uuid) cascade; > drop function if exists public.getglusterservicebytypeandname(character varying, character varying) cascade; > drop function if exists public.getglusterservicesbytype(character varying) cascade; > drop function if exists public.getglusterservicetypes() cascade; > drop function if exists public.getglustervolumedetailsbyid(uuid) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyclusterid(uuid) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyclusteridandname(uuid, character varying) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyvolumeid(uuid, uuid) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyvolumeidandname(uuid, uuid, character varying) cascade; > drop function if exists public.getgroupbyexternalid(character varying, text) cascade; > drop function if exists public.getgroupbyid(uuid) cascade; > drop function if exists public.getgroupbyname(character varying) cascade; > drop function if exists public.getgroupbynameanddomain(character varying, character varying) cascade; > drop function if exists public.gethostdevicebyhostidanddevicename(uuid, character varying) cascade; > drop function if exists public.gethostdevicesbyhostid(uuid) cascade; > drop function if exists public.gethostdevicesbyhostidandiommugroup(uuid, integer) cascade; > drop function if exists public.gethostedenginestoragedomainids() cascade; > drop function if exists public.gethostnetworksbycluster(uuid) cascade; > drop function if exists public.gethostnicvfsconfigbyid(uuid) cascade; > drop function if exists public.gethostproviderbinding(uuid, character varying) cascade; > drop function if exists public.gethostsandvmsforclusters(uuid[]) cascade; > drop function if exists public.getidsforovfdeletion(uuid) cascade; > drop function if exists public.getidsofhostswithstatus(integer) cascade; > drop function if exists public.getimage_storage_domain_mapbyimage_id(uuid) cascade; > drop function if exists public.getimage_storage_domain_mapbystorage_domain_id(uuid) cascade; > drop function if exists public.getimagebyimageid(uuid) cascade; > drop function if exists public.getimagetransfersbyvdsid(uuid) cascade; > drop function if exists public.getimageuploadsbycommandid(uuid, uuid, boolean) cascade; > drop function if exists public.getimageuploadsbydiskid(uuid) cascade; > drop function if exists public.getisclusterempty(uuid) cascade; > drop function if exists public.getiscsibondbyiscsibondid(uuid) cascade; > drop function if exists public.getiscsibondsbynetworkid(uuid) cascade; > drop function if exists public.getiscsibondsbystoragepoolid(uuid) cascade; > drop function if exists public.getisodisksbystoragepool(uuid) cascade; > drop function if exists public.getjobbyjobid(uuid) cascade; > drop function if exists public.getjobsbycorrelationid(character varying) cascade; > drop function if exists public.getjobsbyenginesessionseqidandstatus(bigint, character varying) cascade; > drop function if exists public.getjobsbyoffsetandpagesize(integer, integer) cascade; > drop function if exists public.getjobsubjectentitybyjobid(uuid) cascade; > drop function if exists public.getkdumpstatusforvds(uuid) cascade; > drop function if exists public.getlabelsbyvfsconfigid(uuid) cascade; > drop function if exists public.getlastsuccessfulenginebackup(character varying) cascade; > drop function if exists public.getlibvirtsecretbylibvirtsecretid(uuid) cascade; > drop function if exists public.getlibvirtsecretsbypoolidonactivedomains(uuid) cascade; > drop function if exists public.getlun_storage_server_connection_mapbylun(character varying) cascade; > drop function if exists public.getlun_storage_server_connection_mapbylunbystorage_server_conn(character varying, character varying) cascade; > drop function if exists public.getmacpoolbyclusterid(uuid) cascade; > drop function if exists public.getmacpoolbymacpoolid(uuid) cascade; > drop function if exists public.getmacsbyclusterid(uuid) cascade; > drop function if exists public.getmacsbydatacenterid(uuid) cascade; > drop function if exists public.getmanagementnetworkbycluster(uuid) cascade; > drop function if exists public.getnameserversbydnsresolverconfigurationid(uuid) cascade; > drop function if exists public.getnamesofhostsdedicatedtovm(uuid) cascade; > drop function if exists public.getnamesofvmstaticdedicatedtovds(uuid) cascade; > drop function if exists public.getnetwork_clusterbycluster_idandbynetwork_id(uuid, uuid) cascade; > drop function if exists public.getnetworkattachmentbynetworkattachmentid(uuid) cascade; > drop function if exists public.getnetworkattachmentbynicidandnetworkid(uuid, uuid) cascade; > drop function if exists public.getnetworkattachmentsbyhostid(uuid) cascade; > drop function if exists public.getnetworkattachmentsbynetworkid(uuid) cascade; > drop function if exists public.getnetworkattachmentsbynicid(uuid) cascade; > drop function if exists public.getnetworkbyid(uuid, uuid, boolean) cascade; > drop function if exists public.getnetworkbynameandcluster(character varying, uuid) cascade; > drop function if exists public.getnetworkbynameanddatacenter(character varying, uuid) cascade; > drop function if exists public.getnetworkbyvdsmnameanddatacenterid(character varying, uuid) cascade; > drop function if exists public.getnetworkfilterbyid(uuid) cascade; > drop function if exists public.getnetworkfilterbyname(character varying) cascade; > drop function if exists public.getnetworksbyiscsibondid(uuid) cascade; > drop function if exists public.getnetworksbyvfsconfigid(uuid) cascade; > drop function if exists public.getnoncountablequtoavmstatuses() cascade; > drop function if exists public.getnumberofimagesinstoragedomain(uuid) cascade; > drop function if exists public.getnumberofvmsincluster(uuid) cascade; > drop function if exists public.getnumofsnapshotsbymemoryvolume(uuid[]) cascade; > drop function if exists public.getnvmtagsbyvmid(uuid) cascade; > drop function if exists public.getnvmtagsbyvmidanddefaulttag(uuid) cascade; > drop function if exists public.getoptionsbyglustervolumeguid(uuid) cascade; > drop function if exists public.getorderedvmguidsforrunmultipleactions(character varying) cascade; > drop function if exists public.getovfdatabyentityidandstoragedomain(uuid, uuid) cascade; > drop function if exists public.getovfgeneration(uuid) cascade; > drop function if exists public.getpermissionbyroleid(uuid) cascade; > drop function if exists public.getpolicyunitbypolicyunitid(uuid) cascade; > drop function if exists public.getproviderbyname(character varying) cascade; > drop function if exists public.getproviderbyproviderid(uuid) cascade; > drop function if exists public.getqosbyqosid(uuid) cascade; > drop function if exists public.getquotacount() cascade; > drop function if exists public.getrepo_files_by_storage_domain(uuid, integer) cascade; > drop function if exists public.getrequirednetworksbydatacenterid(uuid) cascade; > drop function if exists public.getroleactiongroupsbyroleid(uuid) cascade; > drop function if exists public.getrolebyname(character varying) cascade; > drop function if exists public.getrolsbyid(uuid) cascade; > drop function if exists public.getsessionuserandgroupsbyid(uuid, integer) cascade; > drop function if exists public.getsnapshotbysnapshotid(uuid, uuid, boolean) cascade; > drop function if exists public.getsnapshotbyvmidandstatus(uuid, character varying) cascade; > drop function if exists public.getsnapshotbyvmidandtype(uuid, character varying, uuid, boolean) cascade; > drop function if exists public.getsnapshotbyvmidandtypeandstatus(uuid, character varying, character varying) cascade; > drop function if exists public.getsnapshotidsbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.getsnapshotidsbyvmidandtypeandstatus(uuid, character varying, character varying) cascade; > drop function if exists public.getstepbystepid(uuid) cascade; > drop function if exists public.getstepsbyexternaltaskid(uuid) cascade; > drop function if exists public.getstepsbyjobid(uuid) cascade; > drop function if exists public.getstepsbyparentstepid(uuid) cascade; > drop function if exists public.getstepsforentitybystatus(character varying, uuid, character varying) cascade; > drop function if exists public.getstepsubjectentitiesbystepid(uuid) cascade; > drop function if exists public.getstorage_domain_dynamicbyid(uuid) cascade; > drop function if exists public.getstorage_domain_staticbyid(uuid) cascade; > drop function if exists public.getstorage_domain_staticbyname(character varying) cascade; > drop function if exists public.getstorage_domain_staticbynamefiltered(character varying, uuid, boolean) cascade; > drop function if exists public.getstorage_domain_staticbystorage_pool_id(uuid) cascade; > drop function if exists public.getstorage_pool_iso_mapbystorage_idandbystorage_pool_id(uuid, uuid) cascade; > drop function if exists public.getstorage_pool_iso_mapsbybystorage_pool_id(uuid, uuid) cascade; > drop function if exists public.getstorage_pool_iso_mapsbystorage_id(uuid) cascade; > drop function if exists public.getstorage_poolbyid(uuid, uuid, boolean) cascade; > drop function if exists public.getstorage_poolbyname(character varying, boolean) cascade; > drop function if exists public.getstorage_poolsbyclusterid(uuid) cascade; > drop function if exists public.getstorage_poolsbystoragedomainid(uuid) cascade; > drop function if exists public.getstorage_poolsbyvdsid(uuid) cascade; > drop function if exists public.getstorage_server_connectionsbyconnection(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbyid(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbyiqn(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbyiqnandconnection(character varying, character varying) cascade; > drop function if exists public.getstorage_server_connectionsbykey(character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.getstorage_server_connectionsbylunid(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbystoragetype(integer) cascade; > drop function if exists public.getstorage_server_connectionsbyvolumegroupid(character varying) cascade; > drop function if exists public.getstorageconnectionsbystoragetypeandstatus(uuid, integer, character varying) cascade; > drop function if exists public.getstoragedevicebyid(uuid) cascade; > drop function if exists public.getstoragedevicesbyvdsid(uuid) cascade; > drop function if exists public.getstoragedomaindr(uuid, uuid) cascade; > drop function if exists public.getstoragedomaindrlist(uuid) cascade; > drop function if exists public.getstoragedomaindrwithgeorep(uuid) cascade; > drop function if exists public.getstoragedomainidsbystoragepoolidandstatus(uuid, integer) cascade; > drop function if exists public.getstoragepoolsbyclusterservice(boolean, boolean) cascade; > drop function if exists public.getstorageserverconnectionextensionbyid(uuid) cascade; > drop function if exists public.getstorageserverconnectionextensionsbyhostid(uuid) cascade; > drop function if exists public.getstorageserverconnectionextensionsbyhostidandtarget(uuid, character varying) cascade; > drop function if exists public.getstorageserverconnectionsbyids(text) cascade; > drop function if exists public.getstorageserverconnectionsfordomain(uuid) cascade; > drop function if exists public.getsupportedhostfeaturesbyhostid(uuid) cascade; > drop function if exists public.getsystem_statistics(character varying, character varying) cascade; > drop function if exists public.gettags_vm_pool_mapbytag_idandbyvm_pool_id(uuid, uuid) cascade; > drop function if exists public.gettagsbyparent_id(uuid) cascade; > drop function if exists public.gettagsbytag_id(uuid) cascade; > drop function if exists public.gettagsbytag_name(character varying) cascade; > drop function if exists public.gettaguserbytagidandbyuserid(uuid, uuid) cascade; > drop function if exists public.gettagusergroupbygroupidandbytagid(uuid, uuid) cascade; > drop function if exists public.gettagvdsbytagidandbyvdsid(uuid, uuid) cascade; > drop function if exists public.gettagvmbytagidandbyvmid(uuid, uuid) cascade; > drop function if exists public.gettemplatecount() cascade; > drop function if exists public.gettransporttypesbyglustervolumeguid(uuid) cascade; > drop function if exists public.getuserandgroupsbyid(uuid) cascade; > drop function if exists public.getuserbyexternalid(character varying, text) cascade; > drop function if exists public.getuserbyuserid(uuid, boolean) cascade; > drop function if exists public.getuserbyusernameanddomain(character varying, character varying) cascade; > drop function if exists public.getusersbytemplateguid(uuid) cascade; > drop function if exists public.getusersbyvmguid(uuid) cascade; > drop function if exists public.getvdcoptionbyid(integer) cascade; > drop function if exists public.getvdcoptionbyname(character varying, character varying) cascade; > drop function if exists public.getvds_spm_id_mapbystorage_pool_id(uuid) cascade; > drop function if exists public.getvds_spm_id_mapbystorage_pool_idandbyvds_spm_id(uuid, integer) cascade; > drop function if exists public.getvds_spm_id_mapbyvds_id(uuid) cascade; > drop function if exists public.getvdsdynamicbyvdsid(uuid) cascade; > drop function if exists public.getvdsstaticbyclusterid(uuid) cascade; > drop function if exists public.getvdsstaticbyhostname(character varying) cascade; > drop function if exists public.getvdsstaticbyip(character varying) cascade; > drop function if exists public.getvdsstaticbyvdsid(uuid) cascade; > drop function if exists public.getvdsstaticbyvdsids(uuid[]) cascade; > drop function if exists public.getvdsstaticbyvdsname(character varying) cascade; > drop function if exists public.getvdsstatisticsbyvdsid(uuid) cascade; > drop function if exists public.getvfsconfigbynicid(uuid) cascade; > drop function if exists public.getvm_interface_statisticsbyid(uuid) cascade; > drop function if exists public.getvm_pool_mapbyvm_pool_id(uuid) cascade; > drop function if exists public.getvmandtemplatesidsbystoragedomainid(uuid, boolean, boolean) cascade; > drop function if exists public.getvmbackupbyvmbackupid(uuid) cascade; > drop function if exists public.getvmbackupsbyvmid(uuid) cascade; > drop function if exists public.getvmcheckpointbyvmcheckpointid(uuid) cascade; > drop function if exists public.getvmcheckpointsbyvmid(uuid) cascade; > drop function if exists public.getvmdevicesattachedtohost(uuid) cascade; > drop function if exists public.getvmdynamicbyvmguid(uuid) cascade; > drop function if exists public.getvmguestagentinterfacesbyvmid(uuid, uuid, boolean) cascade; > drop function if exists public.getvmiconbyvmicondataurl(text) cascade; > drop function if exists public.getvmiconbyvmiconid(uuid) cascade; > drop function if exists public.getvmicondefaultbyvmicondefaultid(uuid) cascade; > drop function if exists public.getvmicondefaultbyvmicondefaultlargeiconid(uuid) cascade; > drop function if exists public.getvmicondefaultbyvmicondefaultosid(integer) cascade; > drop function if exists public.getvmidsforversionupdate(uuid) cascade; > drop function if exists public.getvmidswithspecificisoattached(uuid) cascade; > drop function if exists public.getvminitbyids(text) cascade; > drop function if exists public.getvminitbyvmid(uuid) cascade; > drop function if exists public.getvminterfacebytemplateid(uuid) cascade; > drop function if exists public.getvminterfacebyvminterfaceid(uuid) cascade; > drop function if exists public.getvminterfacefilterparameterbyvminterfacefilterparameterid(uuid) cascade; > drop function if exists public.getvminterfacefilterparametersbyvminterfaceid(uuid) cascade; > drop function if exists public.getvminterfacesbynetworkid(uuid) cascade; > drop function if exists public.getvminterfacesbyvmid(uuid) cascade; > drop function if exists public.getvmmapsinvmpoolbyvmpoolidandstatus(uuid, integer) cascade; > drop function if exists public.getvmnameswithspecificisoattached(uuid) cascade; > drop function if exists public.getvmsandtemplatesidswithoutattachedimagedisks(uuid, boolean) cascade; > drop function if exists public.getvmsdynamicrunningonvds(uuid) cascade; > drop function if exists public.getvmsidsforovfupdate(uuid) cascade; > drop function if exists public.getvmsmigratingtovds(uuid) cascade; > drop function if exists public.getvmsstaticrunningonvds(uuid) cascade; > drop function if exists public.getvmstaticbycluster(uuid) cascade; > drop function if exists public.getvmstaticbygroupidandnetwork(uuid, character varying) cascade; > drop function if exists public.getvmstaticbyname(character varying) cascade; > drop function if exists public.getvmstaticbyvmguid(uuid) cascade; > drop function if exists public.getvmstaticbyvmguids(uuid[]) cascade; > drop function if exists public.getvmstaticwithouticon() cascade; > drop function if exists public.getvmstatisticsbyvmguid(uuid) cascade; > drop function if exists public.getvmswithleaseonstoragedomain(uuid) cascade; > drop function if exists public.getvmtemplateinterfacesbynetworkid(uuid) cascade; > drop function if exists public.getvmtemplatesidsforovfupdate(uuid) cascade; > drop function if exists public.getvnicprofilebyvnicprofileid(uuid) cascade; > drop function if exists public.getvnicprofilesbynetworkid(uuid) cascade; > drop function if exists public.increasestoragepoolmasterversion(uuid) cascade; > drop function if exists public.incrementdbgeneration(uuid) cascade; > drop function if exists public.incrementdbgenerationforallinstoragepool(uuid) cascade; > drop function if exists public.incrementdbgenerationforvms(uuid[]) cascade; > drop function if exists public.insert_entity_snapshot(uuid, uuid, character varying, character varying, character varying, text, character varying, integer, integer) cascade; > drop function if exists public.insert_osinfo(integer, character varying) cascade; > drop function if exists public.insert_roles_groups(integer, uuid) cascade; > drop function if exists public.insertaffinitygroupwithmembers(uuid, character varying, character varying, uuid, boolean, boolean, boolean, boolean, boolean, boolean, uuid[], uuid[]) cascade; > drop function if exists public.insertasync_tasks(integer, integer, integer, uuid, uuid, uuid, uuid, uuid, uuid, timestamp with time zone, uuid, integer) cascade; > drop function if exists public.insertasynctaskentities(uuid, uuid, character varying) cascade; > drop function if exists public.insertauditlog(bigint, timestamp with time zone, integer, character varying, integer, text, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, character varying, uuid, uuid, character varying, text, boolean, uuid, text, character varying, integer, integer, text) cascade; > drop function if exists public.insertbasedisk(uuid, boolean, character varying, character varying, character varying, boolean, integer, smallint, character varying, smallint, character varying) cascade; > drop function if exists public.insertbookmark(uuid, character varying, character varying) cascade; > drop function if exists public.insertcinderstorage(uuid, jsonb, text) cascade; > drop function if exists public.insertcluster(uuid, character varying, text, character varying, character varying, uuid, integer, boolean, character varying, boolean, integer, boolean, boolean, boolean, character varying, boolean, boolean, boolean, uuid, text, boolean, integer, smallint, character varying, boolean, smallint, character varying, character varying, boolean, boolean, smallint, boolean, boolean, boolean, character varying, boolean, character varying, integer, uuid, uuid, character varying, boolean, boolean, integer, uuid, integer, smallint, boolean) cascade; > drop function if exists public.insertclusterfeature(uuid, character varying, character varying, integer, text) cascade; > drop function if exists public.insertclusterpolicy(uuid, character varying, character varying, boolean, boolean, text) cascade; > drop function if exists public.insertclusterpolicyunit(uuid, uuid, integer, integer) cascade; > drop function if exists public.insertcommandassociatedentities(uuid, uuid, character varying) cascade; > drop function if exists public.insertcommandentity(uuid, bigint, uuid, integer, uuid, uuid, text, text, character varying, timestamp with time zone, character varying, boolean, boolean, text, character varying, text) cascade; > drop function if exists public.insertcpuprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.insertcpuqos(uuid, smallint, character varying, text, uuid, integer) cascade; > drop function if exists public.insertcustom_actions(integer, character varying, character varying, integer, character varying) cascade; > drop function if exists public.insertdedicatedhoststovm(uuid, text) cascade; > drop function if exists public.insertdisk_image_dynamic(uuid, integer, integer, bigint, numeric, numeric, numeric) cascade; > drop function if exists public.insertdisklunmap(uuid, character varying) cascade; > drop function if exists public.insertdiskprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.insertdiskvmelement(uuid, uuid, boolean, boolean, character varying, boolean) cascade; > drop function if exists public.insertdnsresolverconfiguration(uuid) cascade; > drop function if exists public.insertenginesession(integer, text, uuid, character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.insertevent_notification_hist(bigint, character varying, character, character, timestamp with time zone, boolean) cascade; > drop function if exists public.insertevent_subscriber(character varying, character varying, character varying, uuid, character varying) cascade; > drop function if exists public.insertexternalvariable(character varying, character varying) cascade; > drop function if exists public.insertfenceagent(uuid, uuid, integer, character varying, character varying, character varying, text, text, boolean, integer) cascade; > drop function if exists public.insertglusterclusterservice(uuid, character varying, character varying) cascade; > drop function if exists public.insertglustergeorepsession(uuid, uuid, character varying, character varying, uuid, character varying, uuid, character varying, character varying) cascade; > drop function if exists public.insertglustergeorepsessionconfig(uuid, character varying, character varying) cascade; > drop function if exists public.insertglustergeorepsessiondetail(uuid, uuid, character varying, uuid, character varying, character varying, character varying, bigint, bigint, bigint, bigint, timestamp without time zone, timestamp without time zone, timestamp without time zone, boolean) cascade; > drop function if exists public.insertglusterhook(uuid, uuid, character varying, character varying, character varying, character varying, character varying, character varying, text, integer) cascade; > drop function if exists public.insertglusterserver(uuid, uuid, character varying) cascade; > drop function if exists public.insertglusterserverhook(uuid, uuid, character varying, character varying, character varying) cascade; > drop function if exists public.insertglusterserverservice(uuid, uuid, uuid, integer, character varying, character varying) cascade; > drop function if exists public.insertglustervolume(uuid, uuid, character varying, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.insertglustervolumeaccessprotocol(uuid, character varying) cascade; > drop function if exists public.insertglustervolumebrick(uuid, uuid, uuid, character varying, integer, character varying, uuid, boolean) cascade; > drop function if exists public.insertglustervolumebrickdetails(uuid, bigint, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.insertglustervolumedetails(uuid, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.insertglustervolumeoption(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.insertglustervolumesnapshot(uuid, character varying, uuid, character varying, character varying, timestamp with time zone) cascade; > drop function if exists public.insertglustervolumesnapshotconfig(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.insertglustervolumesnapshotschedule(uuid, character varying, character varying, character varying, character varying, character varying, integer, timestamp with time zone, time without time zone, character varying, timestamp with time zone) cascade; > drop function if exists public.insertglustervolumetransporttype(uuid, character varying) cascade; > drop function if exists public.insertgroup(uuid, character varying, character varying, character varying, text, character varying) cascade; > drop function if exists public.inserthostdevice(uuid, character varying, character varying, character varying, integer, character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying, boolean, character varying, text) cascade; > drop function if exists public.inserthostnetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer) cascade; > drop function if exists public.inserthostnicvfsconfig(uuid, uuid, boolean) cascade; > drop function if exists public.insertimage(timestamp with time zone, uuid, uuid, bigint, uuid, integer, timestamp with time zone, uuid, integer, integer, uuid, boolean, smallint) cascade; > drop function if exists public.insertimage_storage_domain_map(uuid, uuid, uuid, uuid) cascade; > drop function if exists public.insertimageuploads(uuid, integer, integer, integer, boolean, timestamp without time zone, character varying, uuid, uuid, uuid, character varying, character varying, character varying, bigint, bigint, integer) cascade; > drop function if exists public.insertiscsibond(uuid, character varying, character varying, uuid) cascade; > drop function if exists public.insertjob(uuid, character varying, text, character varying, uuid, bigint, boolean, timestamp with time zone, timestamp with time zone, timestamp with time zone, character varying, boolean, boolean) cascade; > drop function if exists public.insertjobsubjectentity(uuid, uuid, character varying) cascade; > drop function if exists public.insertlibvirtsecret(uuid, text, integer, text, uuid, timestamp with time zone) cascade; > drop function if exists public.insertlun_storage_server_connection_map(character varying, character varying) cascade; > drop function if exists public.insertluns(character varying, character varying, character varying, character varying, integer, character varying, character varying, integer, bigint) cascade; > drop function if exists public.insertmacpool(uuid, character varying, boolean, character varying) cascade; > drop function if exists public.insertmacpoolrange(uuid, character varying, character varying) cascade; > drop function if exists public.insertnameserver(uuid, character varying, smallint) cascade; > drop function if exists public.insertnetwork(character varying, character varying, text, uuid, character varying, character varying, character varying, character varying, integer, integer, boolean, uuid, integer, boolean, uuid, text, uuid, uuid, text, uuid) cascade; > drop function if exists public.insertnetwork_cluster(uuid, uuid, integer, boolean, boolean, boolean, boolean, boolean, boolean) cascade; > drop function if exists public.insertnetworkattachment(uuid, uuid, uuid, character varying, character varying, character varying, character varying, character varying, character varying, integer, character varying, text, uuid) cascade; > drop function if exists public.insertnetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.insertnumanode(uuid, uuid, uuid, smallint, bigint, smallint, bigint, integer, numeric, numeric, numeric, integer, text) cascade; > drop function if exists public.insertnumanodecpu(uuid, uuid, integer) cascade; > drop function if exists public.insertnumanodemap(uuid, uuid, smallint) cascade; > drop function if exists public.insertorupdateasynctasks(integer, integer, integer, uuid, uuid, uuid, uuid, uuid, uuid, timestamp with time zone, uuid, integer) cascade; > drop function if exists public.insertorupdatecommandentity(uuid, bigint, uuid, integer, uuid, uuid, text, text, character varying, timestamp with time zone, character varying, boolean, boolean, text, character varying, text) cascade; > drop function if exists public.insertorupdateuser(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, text, character varying) cascade; > drop function if exists public.insertovfdataforentities(uuid, character varying, character varying, integer, character varying, uuid, text, text, integer) cascade; > drop function if exists public.insertpermission(uuid, uuid, uuid, uuid, integer) cascade; > drop function if exists public.insertpolicyunit(uuid, character varying, text, boolean, smallint, text, boolean) cascade; > drop function if exists public.insertprovider(uuid, character varying, character varying, character varying, character varying, boolean, character varying, text, text, character varying, character varying, text, text, text, boolean, boolean, boolean, character varying, character varying, character varying) cascade; > drop function if exists public.insertquota(uuid, uuid, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.insertquotalimitation(uuid, uuid, uuid, uuid, integer, bigint, bigint) cascade; > drop function if exists public.insertrepo_domain_file_meta_data(uuid, character varying, character varying, bigint, timestamp with time zone, bigint, integer) cascade; > drop function if exists public.insertrole(character varying, uuid, character varying, boolean, integer, boolean, integer) cascade; > drop function if exists public.insertsnapshot(uuid, uuid, character varying, character varying, character varying, timestamp with time zone, text, text, uuid, uuid) cascade; > drop function if exists public.insertstep(uuid, uuid, uuid, character varying, text, integer, character varying, smallint, timestamp with time zone, timestamp with time zone, character varying, uuid, character varying, boolean) cascade; > drop function if exists public.insertstepsubjectentity(uuid, uuid, character varying, smallint) cascade; > drop function if exists public.insertstorage_domain_dynamic(integer, uuid, integer) cascade; > drop function if exists public.insertstorage_domain_static(uuid, character varying, character varying, character varying, text, integer, integer, character varying, bigint, boolean, boolean, character varying, character varying, integer, integer, integer, boolean, integer) cascade; > drop function if exists public.insertstorage_pool(character varying, text, uuid, character varying, integer, boolean, integer, uuid, character varying, integer) cascade; > drop function if exists public.insertstorage_pool_iso_map(uuid, uuid, integer) cascade; > drop function if exists public.insertstorage_server_connections(character varying, character varying, character varying, character varying, character varying, text, integer, text, character varying, character varying, character varying, smallint, smallint, uuid) cascade; > drop function if exists public.insertstoragedevice(uuid, text, character varying, character varying, uuid, text, character varying, text, character varying, text, bigint, boolean, boolean) cascade; > drop function if exists public.insertstoragedomaindr(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.insertstoragedomainovfinfo(uuid, integer, uuid, text) cascade; > drop function if exists public.insertstorageqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.insertstorageserverconnectionextension(uuid, uuid, character varying, text, text) cascade; > drop function if exists public.insertsupportedclusterfeature(uuid, uuid, boolean) cascade; > drop function if exists public.insertsupportedhostfeature(uuid, character varying) cascade; > drop function if exists public.inserttags(character varying, uuid, character varying, uuid, boolean, integer) cascade; > drop function if exists public.inserttags_user_group_map(uuid, uuid) cascade; > drop function if exists public.inserttags_user_map(uuid, uuid) cascade; > drop function if exists public.inserttags_vds_map(uuid, uuid) cascade; > drop function if exists public.inserttags_vm_map(uuid, uuid, integer) cascade; > drop function if exists public.inserttags_vm_pool_map(uuid, uuid) cascade; > drop function if exists public.insertunregistereddisk(uuid, uuid, character varying, character varying, uuid, timestamp with time zone, timestamp with time zone, integer, integer, bigint, bigint) cascade; > drop function if exists public.insertunregistereddiskstovms(uuid, uuid, character varying, uuid) cascade; > drop function if exists public.insertuser(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, text, character varying) cascade; > drop function if exists public.insertuserprofile(uuid, uuid, uuid, text) cascade; > drop function if exists public.insertvdcoption(character varying, character varying, character varying, integer) cascade; > drop function if exists public.insertvds_interface(character varying, character varying, integer, character varying, boolean, uuid, boolean, character varying, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, uuid, character varying, integer, integer, boolean, text, integer, character varying, integer, character varying, character varying, integer, character varying) cascade; > drop function if exists public.insertvds_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.insertvds_spm_id_map(uuid, uuid, integer) cascade; > drop function if exists public.insertvdsdynamic(integer, integer, character varying, numeric, character varying, boolean, integer, integer, integer, uuid, integer, integer, integer, integer, integer, integer, integer, integer, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, integer, boolean, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, integer, text, character varying, character varying, character varying, character varying, character varying, character varying, text, text, boolean, smallint, integer, smallint, boolean, character varying, text, boolean, boolean, text, boolean, boolean, jsonb, boolean, jsonb) cascade; > drop function if exists public.insertvdsstatic(text, uuid, character varying, character varying, integer, uuid, character varying, boolean, integer, boolean, character varying, boolean, integer, character varying, character varying, integer, character varying, boolean, uuid, uuid, text, text, integer) cascade; > drop function if exists public.insertvdsstatistics(numeric, numeric, numeric, numeric, integer, integer, integer, uuid, bigint, bigint, bigint, bigint, bigint, integer, bigint, boolean, integer, bigint, integer, boolean, boolean, boolean, boolean, timestamp with time zone, text) cascade; > drop function if exists public.insertvfsconfiglabel(uuid, text) cascade; > drop function if exists public.insertvfsconfignetwork(uuid, uuid) cascade; > drop function if exists public.insertvm_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.insertvm_pool_map(uuid, uuid) cascade; > drop function if exists public.insertvm_pools(character varying, text, uuid, character varying, integer, boolean, character varying, integer, uuid, smallint, character varying, boolean) cascade; > drop function if exists public.insertvmbackup(uuid, uuid, uuid, uuid, text, timestamp with time zone) cascade; > drop function if exists public.insertvmbackupdiskmap(uuid, uuid) cascade; > drop function if exists public.insertvmcheckpoint(uuid, uuid, uuid, timestamp with time zone) cascade; > drop function if exists public.insertvmcheckpointdiskmap(uuid, uuid) cascade; > drop function if exists public.insertvmdevice(uuid, uuid, character varying, character varying, character varying, text, boolean, boolean, boolean, character varying, text, uuid, character varying, character varying) cascade; > drop function if exists public.insertvmdynamic(text, character varying, character varying, character varying, uuid, character varying, uuid, uuid, integer, uuid, character varying, character varying, character varying, timestamp with time zone, timestamp with time zone, bigint, timestamp with time zone, boolean, integer, integer, integer, character varying, integer, integer, integer, character varying, integer, numeric, character varying, boolean, boolean, character varying, character varying, character varying, integer, integer, integer, integer, character varying, integer, character varying, integer, integer, integer, character varying, integer, character varying, character varying, character varying, character varying, character varying, text) cascade; > drop function if exists public.insertvmguestagentinterface(uuid, character varying, character varying, text, text) cascade; > drop function if exists public.insertvmicon(uuid, text) cascade; > drop function if exists public.insertvmicondefault(uuid, integer, uuid, uuid) cascade; > drop function if exists public.insertvminit(uuid, text, text, text, boolean, character varying, text, text, text, text, character varying, text, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.insertvminterface(uuid, character varying, character varying, integer, uuid, uuid, uuid, integer, boolean) cascade; > drop function if exists public.insertvminterfacefilterparameter(uuid, character varying, character varying, uuid) cascade; > drop function if exists public.insertvmjobs(uuid, uuid, integer, integer, integer, integer, bigint, bigint, uuid) cascade; > drop function if exists public.insertvmstatic(character varying, text, integer, integer, integer, integer, uuid, uuid, character varying, uuid, timestamp with time zone, integer, boolean, boolean, boolean, integer, integer, integer, integer, character varying, boolean, boolean, boolean, boolean, character varying, text, integer, integer, integer, integer, integer, integer, character varying, integer, character varying, character varying, character varying, integer, character varying, character varying, integer, uuid, character varying, boolean, boolean, character varying, boolean, uuid, uuid, uuid, uuid, character varying, integer, integer, smallint, character varying, boolean, character varying, boolean, boolean, uuid, boolean, boolean, character varying, integer, character varying, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.insertvmstatistics(numeric, numeric, numeric, integer, integer, integer, text, uuid, bigint, bigint) cascade; > drop function if exists public.insertvmtemplate(integer, timestamp with time zone, character varying, text, integer, integer, integer, character varying, integer, integer, integer, integer, uuid, uuid, integer, boolean, boolean, integer, integer, character varying, integer, integer, integer, integer, integer, integer, boolean, boolean, boolean, boolean, character varying, boolean, character varying, integer, character varying, character varying, character varying, uuid, integer, text, boolean, character varying, integer, boolean, uuid, character varying, integer, uuid, character varying, smallint, character varying, boolean, boolean, boolean, uuid, character varying, boolean, boolean, character varying, character varying, character varying, integer, character varying, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.insertvnicprofile(uuid, character varying, uuid, uuid, boolean, boolean, boolean, text, text, uuid) cascade; > drop function if exists public.inst_add_glance_provider(uuid, character varying, character varying, character varying, uuid, boolean, character varying, text, text, character varying) cascade; > drop function if exists public.inst_add_iso_storage_domain(uuid, character varying, uuid, character varying, integer, integer) cascade; > drop function if exists public.inst_update_default_storage_pool_type(boolean) cascade; > drop function if exists public.inst_update_service_type(uuid, boolean, boolean) cascade; > drop function if exists public.isanyvmrunonvds(uuid) cascade; > drop function if exists public.ismemballoonenabled(uuid) cascade; > drop function if exists public.isquotainuse(uuid) cascade; > drop function if exists public.isvmiconexist(uuid) cascade; > drop function if exists public.loadovfdataforids(character varying) cascade; > drop function if exists public.loadstoragedomaininfobydiskid(uuid) cascade; > drop function if exists public.loadstoragedomaininfobydomainid(uuid) cascade; > drop function if exists public.loadstoragedomainsforovfids(text) cascade; > drop function if exists public.logenginebackupevent(character varying, timestamp with time zone, integer, text, character varying, text) cascade; > drop function if exists public.markhostdevicesusedbyvmid(uuid, uuid) cascade; > drop function if exists public.nullifyqosforstoragedomain(uuid) cascade; > drop function if exists public.remove_entities_from_storage_domain(uuid) cascade; > drop function if exists public.removeallunmanageddevicesbyvmid(uuid) cascade; > drop function if exists public.removeallvmtagsbyvmid(uuid) cascade; > drop function if exists public.removeauditlogbybrickidlogtype(uuid, integer) cascade; > drop function if exists public.removeconnectionfromiscsibond(uuid, character varying) cascade; > drop function if exists public.removediskfromunregistered(uuid, uuid) cascade; > drop function if exists public.removediskfromunregisteredrelatedtovm(uuid, uuid) cascade; > drop function if exists public.removeentityfromunregistered(uuid, uuid) cascade; > drop function if exists public.removefinishedkdumpstatusforvds(uuid) cascade; > drop function if exists public.removememoryfromsnapshotbysnapshotid(uuid) cascade; > drop function if exists public.removememoryfromsnapshotbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.removenetworkattachmentbynetworkid(uuid) cascade; > drop function if exists public.removenetworkfromiscsibond(uuid, uuid) cascade; > drop function if exists public.removesupportedhostfeature(uuid, character varying) cascade; > drop function if exists public.removevdsfromaffinitygroups(uuid) cascade; > drop function if exists public.removevmfromaffinitygroups(uuid) cascade; > drop function if exists public.set_network_exclusively_as_default_role_network(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_display(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_gluster(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_management(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_migration(uuid, uuid) cascade; > drop function if exists public.setallauditlogalerts(integer, boolean) cascade; > drop function if exists public.sethashbyvmguid(uuid, character varying) cascade; > drop function if exists public.settounknown(uuid[], integer) cascade; > drop function if exists public.setvmidonhostdevice(uuid, character varying, uuid) cascade; > drop function if exists public.setvmpoolbeingdestroyed(uuid, boolean) cascade; > drop function if exists public.sso_oauth_client_exists(character varying) cascade; > drop function if exists public.sso_oauth_register_client(character varying, character varying, character varying, character varying, character varying, text, character varying, boolean, character varying, character varying, boolean, boolean) cascade; > drop function if exists public.sso_oauth_unregister_client(character varying) cascade; > drop function if exists public.update_oauth_client(character varying, character varying, character varying, character varying, text, character varying, boolean, character varying) cascade; > drop function if exists public.update_oauth_client_callback_prefix(character varying, character varying) cascade; > drop function if exists public.updateaffinitygroupwithmembers(uuid, character varying, character varying, uuid, boolean, boolean, boolean, boolean, boolean, boolean, uuid[], uuid[]) cascade; > drop function if exists public.updateasync_tasks(integer, integer, integer, uuid, uuid, uuid, uuid, uuid, uuid, uuid) cascade; > drop function if exists public.updatebasedisk(uuid, boolean, character varying, character varying, character varying, boolean, integer, smallint, character varying, smallint, character varying) cascade; > drop function if exists public.updatebookmark(uuid, character varying, character varying) cascade; > drop function if exists public.updatecinderstorage(uuid, jsonb, text) cascade; > drop function if exists public.updatecluster(character varying, text, character varying, uuid, character varying, uuid, integer, boolean, character varying, boolean, integer, boolean, boolean, boolean, boolean, character varying, boolean, boolean, boolean, uuid, text, boolean, integer, smallint, character varying, boolean, smallint, character varying, character varying, boolean, boolean, smallint, boolean, boolean, boolean, character varying, boolean, character varying, integer, uuid, uuid, character varying, boolean, boolean, integer, uuid, integer, smallint, boolean) cascade; > drop function if exists public.updateclusteremulatedmachine(uuid, character varying, boolean) cascade; > drop function if exists public.updateclusterfeature(uuid, character varying, character varying, integer, text) cascade; > drop function if exists public.updateclusterpolicy(uuid, character varying, character varying, boolean, boolean, text) cascade; > drop function if exists public.updatecommandentity(uuid, bigint, uuid, integer, uuid, uuid, text, text, character varying, character varying, boolean, boolean, text, character varying, text) cascade; > drop function if exists public.updatecommandentityexecuted(uuid, boolean) cascade; > drop function if exists public.updatecommandentitynotified(uuid, boolean) cascade; > drop function if exists public.updatecommandentitystatus(uuid, character varying) cascade; > drop function if exists public.updateconfigbyclusteridandname(uuid, character varying, character varying) cascade; > drop function if exists public.updateconfigbyvolumeididandname(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updateconsoleuserwithoptimisticlocking(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updatecpuflags(uuid, character varying) cascade; > drop function if exists public.updatecpuprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.updatecpuqos(uuid, smallint, character varying, text, uuid, integer) cascade; > drop function if exists public.updatecustom_actions(integer, character varying, character varying, integer, character varying) cascade; > drop function if exists public.updatededicatedhoststovm(uuid, text) cascade; > drop function if exists public.updatedisk_image_dynamic(uuid, integer, integer, bigint, numeric, numeric, numeric) cascade; > drop function if exists public.updatedisk_image_dynamic_by_disk_id_and_vm_id(uuid, uuid, integer, integer, bigint, numeric, numeric, numeric) cascade; > drop function if exists public.updatediskprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.updatediskprofilebyimagegroupid(uuid, uuid, uuid) cascade; > drop function if exists public.updatediskvmelement(uuid, uuid, boolean, boolean, character varying, boolean) cascade; > drop function if exists public.updatednsresolverconfiguration(uuid) cascade; > drop function if exists public.updatedwhhistorytimekeeping(character varying, character varying, timestamp with time zone) cascade; > drop function if exists public.updateexternalvariable(character varying, character varying) cascade; > drop function if exists public.updatefenceagent(uuid, uuid, integer, character varying, character varying, character varying, text, text, boolean, integer) cascade; > drop function if exists public.updateglusterbricktaskbyserveridbrickdir(uuid, character varying, uuid) cascade; > drop function if exists public.updateglusterclusterservice(uuid, character varying, character varying) cascade; > drop function if exists public.updateglustergeorepsession(uuid, character varying, uuid, uuid) cascade; > drop function if exists public.updateglustergeorepsessionconfig(uuid, character varying, character varying) cascade; > drop function if exists public.updateglustergeorepsessiondetail(uuid, uuid, character varying, uuid, character varying, character varying, character varying, bigint, bigint, bigint, bigint, timestamp without time zone, timestamp without time zone, timestamp without time zone, boolean) cascade; > drop function if exists public.updateglusterhook(uuid, character varying, character varying, character varying, text, integer) cascade; > drop function if exists public.updateglusterhookconflictstatus(uuid, integer) cascade; > drop function if exists public.updateglusterhookcontent(uuid, character varying, text) cascade; > drop function if exists public.updateglusterhookcontenttype(uuid, character varying) cascade; > drop function if exists public.updateglusterhookstatus(uuid, character varying) cascade; > drop function if exists public.updateglusterserver(uuid, uuid) cascade; > drop function if exists public.updateglusterserverhook(uuid, uuid, character varying, character varying, character varying) cascade; > drop function if exists public.updateglusterserverhookchecksum(uuid, uuid, character varying) cascade; > drop function if exists public.updateglusterserverhookstatus(uuid, uuid, character varying) cascade; > drop function if exists public.updateglusterserverknownaddresses(uuid, character varying) cascade; > drop function if exists public.updateglusterserverpeerstatus(uuid, character varying) cascade; > drop function if exists public.updateglusterserverservice(uuid, integer, character varying, character varying) cascade; > drop function if exists public.updateglusterserverservicebyserveridandservicetype(uuid, uuid, integer, character varying, character varying) cascade; > drop function if exists public.updateglustervolume(uuid, uuid, character varying, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.updateglustervolumeasynctask(uuid, uuid) cascade; > drop function if exists public.updateglustervolumebrick(uuid, uuid, uuid, character varying, character varying, uuid, boolean) cascade; > drop function if exists public.updateglustervolumebrickasynctask(uuid, uuid) cascade; > drop function if exists public.updateglustervolumebrickdetails(uuid, bigint, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.updateglustervolumebricknetworkid(uuid, uuid) cascade; > drop function if exists public.updateglustervolumebrickorder(uuid, integer) cascade; > drop function if exists public.updateglustervolumebrickstatus(uuid, character varying) cascade; > drop function if exists public.updateglustervolumebrickunsyncedentries(uuid, integer, text) cascade; > drop function if exists public.updateglustervolumedetails(uuid, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.updateglustervolumeoption(uuid, character varying) cascade; > drop function if exists public.updateglustervolumesnapshotschedulebyvolumeid(uuid, character varying, character varying, character varying, character varying, character varying, integer, timestamp with time zone, time without time zone, character varying, timestamp with time zone) cascade; > drop function if exists public.updateglustervolumesnapshotstatus(uuid, character varying) cascade; > drop function if exists public.updateglustervolumesnapshotstatusbyname(uuid, character varying, character varying) cascade; > drop function if exists public.updateglustervolumestatus(uuid, character varying) cascade; > drop function if exists public.updateglustervolumestatusbyname(uuid, character varying, character varying) cascade; > drop function if exists public.updategroup(uuid, character varying, character varying, character varying, text, character varying) cascade; > drop function if exists public.updatehostdevice(uuid, character varying, character varying, character varying, integer, character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying, boolean, character varying, text) cascade; > drop function if exists public.updatehostexternalstatus(uuid, integer) cascade; > drop function if exists public.updatehostnetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer) cascade; > drop function if exists public.updatehostnicvfsconfig(uuid, uuid, boolean) cascade; > drop function if exists public.updatehostproviderbinding(uuid, character varying[], character varying[]) cascade; > drop function if exists public.updateimage(timestamp with time zone, uuid, uuid, bigint, uuid, integer, timestamp with time zone, uuid, integer, integer, uuid, boolean, smallint, integer) cascade; > drop function if exists public.updateimagesize(uuid, bigint, timestamp with time zone) cascade; > drop function if exists public.updateimagestatus(uuid, integer) cascade; > drop function if exists public.updateimageuploads(uuid, integer, integer, integer, boolean, timestamp without time zone, character varying, uuid, uuid, uuid, character varying, character varying, character varying, bigint, bigint, integer) cascade; > drop function if exists public.updateimagevmsnapshotid(uuid, uuid) cascade; > drop function if exists public.updateiscsibond(uuid, character varying, character varying) cascade; > drop function if exists public.updateisfreeflagbyid(uuid, boolean) cascade; > drop function if exists public.updateisinitialized(uuid, boolean) cascade; > drop function if exists public.updatejob(uuid, character varying, text, character varying, uuid, bigint, boolean, timestamp with time zone, timestamp with time zone, timestamp with time zone, character varying, boolean, boolean) cascade; > drop function if exists public.updatejoblastupdatetime(uuid, timestamp with time zone) cascade; > drop function if exists public.updatejobstepscompleted(uuid, character varying, timestamp with time zone) cascade; > drop function if exists public.updatelabel(uuid, character varying, boolean, uuid[], uuid[]) cascade; > drop function if exists public.updatelabelsforhost(uuid, uuid[]) cascade; > drop function if exists public.updatelabelsforvm(uuid, uuid[]) cascade; > drop function if exists public.updatelastadmincheckstatus(character varying) cascade; > drop function if exists public.updatelibvirtsecret(uuid, text, integer, text, uuid) cascade; > drop function if exists public.updatelun_storage_server_connection_map(character varying, character varying) cascade; > drop function if exists public.updateluns(character varying, character varying, character varying, character varying, integer, character varying, character varying, integer, bigint) cascade; > drop function if exists public.updatemacpool(uuid, character varying, boolean, character varying) cascade; > drop function if exists public.updatememory(uuid, uuid, uuid, character varying) cascade; > drop function if exists public.updatenetwork(character varying, character varying, text, uuid, character varying, character varying, character varying, character varying, integer, integer, boolean, uuid, integer, boolean, uuid, text, uuid, uuid, text, uuid) cascade; > drop function if exists public.updatenetwork_cluster(uuid, uuid, integer, boolean, boolean, boolean, boolean, boolean, boolean) cascade; > drop function if exists public.updatenetwork_cluster_status(uuid, uuid, integer) cascade; > drop function if exists public.updatenetworkattachment(uuid, uuid, uuid, character varying, character varying, character varying, character varying, character varying, character varying, integer, character varying, text, uuid) cascade; > drop function if exists public.updatenetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.updatenumanode(uuid, smallint, bigint, smallint, text) cascade; > drop function if exists public.updatenumanodestatistics(uuid, bigint, integer, numeric, numeric, numeric, integer) cascade; > drop function if exists public.updateoriginaltemplatename(uuid, character varying) cascade; > drop function if exists public.updateovfgenerations(character varying, character varying, text, character varying) cascade; > drop function if exists public.updateovfupdatedinfo(character varying, integer, integer) cascade; > drop function if exists public.updateovirtguestagentstatus(uuid, integer) cascade; > drop function if exists public.updatepolicyunit(uuid, boolean, text, text) cascade; > drop function if exists public.updateprovider(uuid, character varying, character varying, character varying, character varying, boolean, character varying, text, text, character varying, character varying, text, text, text, boolean, boolean, boolean, character varying, character varying, character varying) cascade; > drop function if exists public.updateqemuguestagentstatus(uuid, integer) cascade; > drop function if exists public.updatequotaforimageandsnapshots(uuid, uuid, uuid) cascade; > drop function if exists public.updatequotametadata(uuid, uuid, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.updatereplicacount(uuid, integer) cascade; > drop function if exists public.updaterole(character varying, uuid, character varying, boolean, integer, boolean) cascade; > drop function if exists public.updatesnapshot(uuid, uuid, character varying, character varying, character varying, timestamp with time zone, text, text, uuid, uuid, boolean) cascade; > drop function if exists public.updatesnapshotcountdec(uuid, integer) cascade; > drop function if exists public.updatesnapshotcountinc(uuid, integer) cascade; > drop function if exists public.updatesnapshotid(uuid, uuid) cascade; > drop function if exists public.updatesnapshotstatus(uuid, character varying) cascade; > drop function if exists public.updatestartedexecutionentitiestounknown(timestamp with time zone) cascade; > drop function if exists public.updatestatusofimagesbyimagegroupid(uuid, integer) cascade; > drop function if exists public.updatestep(uuid, uuid, uuid, character varying, text, integer, character varying, smallint, timestamp with time zone, timestamp with time zone, character varying, uuid, character varying) cascade; > drop function if exists public.updatestepexternalidandtype(uuid, uuid, character varying) cascade; > drop function if exists public.updatestepprogress(uuid, smallint) cascade; > drop function if exists public.updatestepstatusandendtime(uuid, character varying, timestamp with time zone) cascade; > drop function if exists public.updatestorage_domain_dynamic(integer, uuid, integer) cascade; > drop function if exists public.updatestorage_domain_static(uuid, character varying, character varying, character varying, text, integer, integer, integer, bigint, boolean, boolean, character varying, character varying, integer, integer, integer, boolean, integer) cascade; > drop function if exists public.updatestorage_pool(character varying, text, uuid, character varying, integer, boolean, character varying, integer, uuid, character varying, integer) cascade; > drop function if exists public.updatestorage_pool_iso_map_status(uuid, uuid, integer) cascade; > drop function if exists public.updatestorage_pool_partial(character varying, text, uuid, character varying, boolean, character varying, character varying, integer) cascade; > drop function if exists public.updatestorage_pool_status(uuid, integer) cascade; > drop function if exists public.updatestorage_server_connections(character varying, character varying, character varying, text, integer, character varying, character varying, text, character varying, character varying, character varying, smallint, smallint, uuid) cascade; > drop function if exists public.updatestoragedevice(uuid, text, character varying, character varying, text, character varying, text, character varying, text, bigint, boolean) cascade; > drop function if exists public.updatestoragedomainconfirmedsize(integer, integer, uuid) cascade; > drop function if exists public.updatestoragedomaindr(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updatestoragedomainexternalstatus(uuid, integer) cascade; > drop function if exists public.updatestoragedomainovfinfo(uuid, integer, uuid, text, timestamp with time zone) cascade; > drop function if exists public.updatestorageqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.updatestorageserverconnectionextension(uuid, uuid, character varying, text, text) cascade; > drop function if exists public.updatesupportedclusterfeature(uuid, uuid, boolean) cascade; > drop function if exists public.updatetags(character varying, uuid, character varying, uuid, boolean, integer) cascade; > drop function if exists public.updatetags_vm_pool_map(integer, integer) cascade; > drop function if exists public.updateuser(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, boolean, text, character varying) cascade; > drop function if exists public.updateuserimpl(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, text, character varying) cascade; > drop function if exists public.updateuserprofile(uuid, uuid, uuid, text) cascade; > drop function if exists public.updatevdcoption(character varying, character varying, integer, character varying) cascade; > drop function if exists public.updatevds_interface(character varying, character varying, integer, character varying, boolean, uuid, boolean, character varying, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, uuid, character varying, integer, integer, boolean, text, character varying, character varying, integer, integer, character varying, integer, character varying) cascade; > drop function if exists public.updatevds_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.updatevdsdynamic(integer, integer, character varying, numeric, character varying, boolean, integer, integer, integer, uuid, integer, integer, integer, integer, integer, integer, integer, integer, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, integer, boolean, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, integer, text, integer, character varying, character varying, character varying, character varying, character varying, character varying, text, text, smallint, integer, smallint, boolean, character varying, text, text, boolean, boolean, text, character varying, boolean, boolean, jsonb, boolean, jsonb) cascade; > drop function if exists public.updatevdsdynamicisupdateavailable(uuid, boolean) cascade; > drop function if exists public.updatevdsdynamicnetconfigdirty(uuid, boolean) cascade; > drop function if exists public.updatevdsdynamicpowermanagementpolicyflag(uuid, boolean) cascade; > drop function if exists public.updatevdsdynamicstatus(uuid, integer) cascade; > drop function if exists public.updatevdsdynamicstatusandreasons(uuid, integer, integer, text) cascade; > drop function if exists public.updatevdsreinstallrequired(uuid, boolean) cascade; > drop function if exists public.updatevdsstatic(character varying, text, character varying, integer, uuid, uuid, character varying, boolean, integer, boolean, character varying, boolean, bigint, integer, character varying, character varying, integer, character varying, boolean, uuid, uuid, text, boolean, integer) cascade; > drop function if exists public.updatevdsstaticlaststoredkernelcmdline(uuid, text) cascade; > drop function if exists public.updatevdsstatistics(numeric, numeric, numeric, numeric, integer, integer, integer, uuid, bigint, bigint, bigint, bigint, bigint, integer, bigint, boolean, integer, bigint, integer, boolean, boolean, boolean, boolean, timestamp with time zone, text) cascade; > drop function if exists public.updatevm_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.updatevm_pool_map(uuid, uuid) cascade; > drop function if exists public.updatevm_pools(character varying, text, uuid, character varying, integer, boolean, character varying, integer, uuid, smallint, character varying, boolean) cascade; > drop function if exists public.updatevmbackup(uuid, uuid, uuid, uuid, text) cascade; > drop function if exists public.updatevmbackupdiskmap(uuid, uuid, text) cascade; > drop function if exists public.updatevmcpuprofileidforclusterid(uuid, uuid) cascade; > drop function if exists public.updatevmdevice(uuid, uuid, character varying, character varying, character varying, text, boolean, boolean, boolean, character varying, text, uuid, character varying, character varying) cascade; > drop function if exists public.updatevmdeviceforhotplugdisk(uuid, uuid, boolean, character varying) cascade; > drop function if exists public.updatevmdeviceruntimeinfo(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updatevmdynamic(text, character varying, character varying, character varying, uuid, character varying, uuid, uuid, integer, uuid, character varying, character varying, character varying, timestamp with time zone, timestamp with time zone, bigint, timestamp with time zone, boolean, integer, integer, integer, character varying, integer, integer, integer, character varying, integer, numeric, character varying, boolean, boolean, character varying, character varying, character varying, character varying, integer, integer, integer, integer, character varying, integer, character varying, integer, integer, integer, character varying, integer, character varying, character varying, character varying, character varying, character varying, text) cascade; > drop function if exists public.updatevmdynamicstatus(uuid, integer) cascade; > drop function if exists public.updatevmicon(uuid, text) cascade; > drop function if exists public.updatevmicondefault(uuid, integer, uuid, uuid) cascade; > drop function if exists public.updatevminit(uuid, text, text, text, boolean, character varying, text, text, text, text, character varying, text, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.updatevminterface(uuid, character varying, character varying, integer, uuid, uuid, uuid, integer, boolean) cascade; > drop function if exists public.updatevminterfacefilterparameter(uuid, character varying, character varying) cascade; > drop function if exists public.updatevmjobs(uuid, uuid, integer, integer, integer, integer, bigint, bigint, uuid) cascade; > drop function if exists public.updatevmleaseinfo(uuid, character varying) cascade; > drop function if exists public.updatevmleasestoragedomainid(uuid, uuid) cascade; > drop function if exists public.updatevmstatic(character varying, text, integer, integer, integer, integer, uuid, uuid, character varying, uuid, timestamp with time zone, integer, boolean, boolean, boolean, integer, integer, integer, integer, character varying, boolean, boolean, boolean, boolean, character varying, text, integer, integer, integer, integer, integer, integer, character varying, integer, character varying, character varying, character varying, integer, character varying, character varying, integer, uuid, character varying, boolean, boolean, character varying, boolean, uuid, uuid, uuid, uuid, character varying, integer, integer, smallint, character varying, boolean, character varying, boolean, boolean, uuid, boolean, boolean, character varying, integer, character varying, uuid, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.updatevmstatistics(numeric, numeric, numeric, integer, integer, integer, text, uuid, bigint, bigint) cascade; > drop function if exists public.updatevmtagsdefaultdisplaytype(uuid, uuid, integer) cascade; > drop function if exists public.updatevmtemplate(integer, timestamp with time zone, character varying, text, integer, integer, integer, character varying, integer, integer, integer, integer, uuid, uuid, integer, boolean, boolean, integer, integer, character varying, integer, integer, integer, integer, integer, integer, boolean, boolean, boolean, boolean, character varying, boolean, character varying, integer, character varying, character varying, character varying, uuid, integer, text, boolean, character varying, integer, boolean, uuid, character varying, integer, character varying, smallint, character varying, boolean, boolean, boolean, uuid, character varying, boolean, boolean, character varying, character varying, character varying, integer, character varying, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.updatevmtemplateshiftbasetemplate(uuid) cascade; > drop function if exists public.updatevmtemplatestatus(uuid, integer) cascade; > drop function if exists public.updatevnicprofile(uuid, character varying, uuid, uuid, boolean, boolean, boolean, text, text, uuid) cascade; > drop function if exists public.upsertexternalvariable(character varying, character varying) cascade; > drop function if exists public.upsertkdumpstatus(uuid, character varying, character varying) cascade; > drop function if exists public.upsertkdumpstatusforip(character varying, character varying, character varying) cascade; > >2019-02-26 17:06:37,724+0100 dbfunc_psql_die --command= drop function if exists public.addconnectiontoiscsibond(uuid, character varying) cascade; > drop function if exists public.addglusterserverknownaddress(uuid, character varying) cascade; > drop function if exists public.addhosttolabels(uuid, uuid[]) cascade; > drop function if exists public.addnetworktoiscsibond(uuid, uuid) cascade; > drop function if exists public.addvmtolabels(uuid, uuid[]) cascade; > drop function if exists public.attach_group_to_role(character varying, character varying) cascade; > drop function if exists public.attach_user_to_role(character varying, character varying, character varying, text, character varying) cascade; > drop function if exists public.boundvmpoolprestartedvms(uuid) cascade; > drop function if exists public.calculateallclusterusage() cascade; > drop function if exists public.calculateallstorageusage() cascade; > drop function if exists public.calculateclusterusage(uuid, uuid) cascade; > drop function if exists public.calculatestorageusage(uuid, uuid) cascade; > drop function if exists public.checkdbconnection() cascade; > drop function if exists public.checkifexistshostthatmissesnetworkincluster(uuid, character varying, integer) cascade; > drop function if exists public.checkifexistshostwithstatusincluster(uuid, integer) cascade; > drop function if exists public.checkifjobhastasks(uuid) cascade; > drop function if exists public.checkifsnapshotexistsbyvmidandsnapshotid(uuid, uuid) cascade; > drop function if exists public.checkifsnapshotexistsbyvmidandstatus(uuid, character varying) cascade; > drop function if exists public.checkifsnapshotexistsbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.checkvmhostdeviceavailability(uuid, uuid) cascade; > drop function if exists public.cleandownvms() cascade; > drop function if exists public.clear_network_from_nics(uuid) cascade; > drop function if exists public.clear_osinfo() cascade; > drop function if exists public.clearallauditlogevents(integer) cascade; > drop function if exists public.clearalldeviceaddressesbyvmid(uuid) cascade; > drop function if exists public.clearmigratingtovds(uuid) cascade; > drop function if exists public.clearvmdeviceaddress(uuid) cascade; > drop function if exists public.createlabel(uuid, character varying, boolean, uuid[], uuid[]) cascade; > drop function if exists public.delete_entity_snapshot_by_command_id(uuid) cascade; > drop function if exists public.delete_roles_groups(integer, uuid) cascade; > drop function if exists public.deleteaffinitygroup(uuid) cascade; > drop function if exists public.deleteallcommandentities() cascade; > drop function if exists public.deleteallcommandentitiesbycommandid(uuid) cascade; > drop function if exists public.deleteallfromenginesessions() cascade; > drop function if exists public.deleteallfromvmicondefaults() cascade; > drop function if exists public.deleteallglusterhooks(uuid) cascade; > drop function if exists public.deleteallunusedvmicons() cascade; > drop function if exists public.deleteallvfsconfiglabels(uuid) cascade; > drop function if exists public.deleteallvfsconfignetworks(uuid) cascade; > drop function if exists public.deleteallvmbackupdiskmapbyvmbackupid(uuid) cascade; > drop function if exists public.deleteallvmcheckpointdiskmapbyvmcheckpointid(uuid) cascade; > drop function if exists public.deleteasync_tasks(uuid) cascade; > drop function if exists public.deleteasynctasksbyvdsmtaskid(uuid) cascade; > drop function if exists public.deleteauditalertlogbyvdsidandtype(uuid, integer) cascade; > drop function if exists public.deleteauditalertlogbyvolumeidandtype(uuid, integer) cascade; > drop function if exists public.deleteauditlog(bigint) cascade; > drop function if exists public.deleteauditlogalertsbyvdsid(uuid, boolean) cascade; > drop function if exists public.deleteauditlogolderthendate(timestamp with time zone) cascade; > drop function if exists public.deletebackuprelatedalerts() cascade; > drop function if exists public.deletebasedisk(uuid) cascade; > drop function if exists public.deletebookmark(uuid) cascade; > drop function if exists public.deletebypoolvds_spm_id_map(uuid, uuid) cascade; > drop function if exists public.deletecinderstorage(uuid) cascade; > drop function if exists public.deletecluster(uuid) cascade; > drop function if exists public.deleteclusterpolicy(uuid) cascade; > drop function if exists public.deleteclusterpolicyunitsbyclusterpolicyid(uuid) cascade; > drop function if exists public.deletecommandentitiesbycommandid(uuid) cascade; > drop function if exists public.deletecommandentitiesolderthandate(timestamp with time zone) cascade; > drop function if exists public.deletecommandentity(uuid) cascade; > drop function if exists public.deletecompletedjobsolderthandate(timestamp with time zone, timestamp with time zone) cascade; > drop function if exists public.deletecpuprofile(uuid) cascade; > drop function if exists public.deletecustom_actions(integer) cascade; > drop function if exists public.deletedisk_image_dynamic(uuid) cascade; > drop function if exists public.deletedisklunmap(uuid, character varying) cascade; > drop function if exists public.deletediskprofile(uuid) cascade; > drop function if exists public.deletediskvmelement(uuid, uuid) cascade; > drop function if exists public.deletednsresolverconfiguration(uuid) cascade; > drop function if exists public.deletednsresolverconfigurationbynetworkattachmentid(uuid) cascade; > drop function if exists public.deletednsresolverconfigurationbynetworkid(uuid) cascade; > drop function if exists public.deletednsresolverconfigurationbyvdsdynamicid(uuid) cascade; > drop function if exists public.deleteenginesession(integer) cascade; > drop function if exists public.deleteentitysnapshotbycommandid(uuid) cascade; > drop function if exists public.deleteevent_notification_hist(timestamp without time zone) cascade; > drop function if exists public.deleteevent_subscriber(character varying, character varying, uuid, character varying) cascade; > drop function if exists public.deleteexternalvariable(character varying) cascade; > drop function if exists public.deletefenceagent(uuid) cascade; > drop function if exists public.deletefenceagentsbyvdsid(uuid) cascade; > drop function if exists public.deleteglustergeorepsession(uuid) cascade; > drop function if exists public.deleteglusterhook(uuid, character varying, character varying, character varying) cascade; > drop function if exists public.deleteglusterhookbyid(uuid) cascade; > drop function if exists public.deleteglusterhooksbyids(text) cascade; > drop function if exists public.deleteglusterserver(uuid) cascade; > drop function if exists public.deleteglusterserverbyglusterserveruuid(uuid) cascade; > drop function if exists public.deleteglusterserverhook(uuid, uuid) cascade; > drop function if exists public.deleteglusterserverhookbyid(uuid) cascade; > drop function if exists public.deleteglusterserverhooksbyids(text) cascade; > drop function if exists public.deleteglusterserverservice(uuid) cascade; > drop function if exists public.deleteglustervolumeaccessprotocol(uuid, character varying) cascade; > drop function if exists public.deleteglustervolumebrick(uuid) cascade; > drop function if exists public.deleteglustervolumebricks(character varying) cascade; > drop function if exists public.deleteglustervolumebyguid(uuid) cascade; > drop function if exists public.deleteglustervolumebyname(uuid, character varying) cascade; > drop function if exists public.deleteglustervolumeoption(uuid) cascade; > drop function if exists public.deleteglustervolumeoptions(character varying) cascade; > drop function if exists public.deleteglustervolumesbyclusterid(uuid) cascade; > drop function if exists public.deleteglustervolumesbyguids(character varying) cascade; > drop function if exists public.deleteglustervolumesnapshotbyguid(uuid) cascade; > drop function if exists public.deleteglustervolumesnapshotbyname(uuid, character varying) cascade; > drop function if exists public.deleteglustervolumesnapshotsbyvolumeid(uuid) cascade; > drop function if exists public.deleteglustervolumesnapshotschedulebyvolumeid(uuid) cascade; > drop function if exists public.deleteglustervolumessnapshotbyids(character varying) cascade; > drop function if exists public.deleteglustervolumetransporttype(uuid, character varying) cascade; > drop function if exists public.deletegroup(uuid) cascade; > drop function if exists public.deletehostdevice(uuid, character varying) cascade; > drop function if exists public.deletehostnicvfsconfig(uuid) cascade; > drop function if exists public.deleteimage(uuid) cascade; > drop function if exists public.deleteimage_storage_domain_map(uuid, uuid) cascade; > drop function if exists public.deleteimage_storage_domain_map_by_image_id(uuid) cascade; > drop function if exists public.deleteimageuploads(uuid) cascade; > drop function if exists public.deleteiscsibond(uuid) cascade; > drop function if exists public.deletejob(uuid) cascade; > drop function if exists public.deletejobolderthandatewithstatus(timestamp with time zone, text) cascade; > drop function if exists public.deletelabel(uuid) cascade; > drop function if exists public.deletelibvirtsecret(uuid) cascade; > drop function if exists public.deletelun(character varying) cascade; > drop function if exists public.deletelun_storage_server_connection_map(character varying, character varying) cascade; > drop function if exists public.deletemacpool(uuid) cascade; > drop function if exists public.deletemacpoolrangesbymacpoolid(uuid) cascade; > drop function if exists public.deletenameserversbydnsresolverconfigurationid(uuid) cascade; > drop function if exists public.deletenetwork(uuid) cascade; > drop function if exists public.deletenetwork_cluster(uuid, uuid) cascade; > drop function if exists public.deletenetworkattachment(uuid) cascade; > drop function if exists public.deletenumanode(uuid) cascade; > drop function if exists public.deletenumanodecpubynumanodeid(uuid) cascade; > drop function if exists public.deletenumanodemapbyvmnumanodeid(uuid) cascade; > drop function if exists public.deleteorphanjobs() cascade; > drop function if exists public.deleteovfgenerations(character varying) cascade; > drop function if exists public.deletepermission(uuid) cascade; > drop function if exists public.deletepermissionsbyentityid(uuid) cascade; > drop function if exists public.deletepermissionsbyentityids(uuid[]) cascade; > drop function if exists public.deletepolicyunit(uuid) cascade; > drop function if exists public.deleteprovider(uuid) cascade; > drop function if exists public.deleteqos(uuid) cascade; > drop function if exists public.deletequotabyquotaguid(uuid) cascade; > drop function if exists public.deletequotalimitationbyquotaguid(uuid) cascade; > drop function if exists public.deleterepo_domain_file_list(uuid, integer) cascade; > drop function if exists public.deleterole(uuid) cascade; > drop function if exists public.deleterunningjobsoftasklesscommands() cascade; > drop function if exists public.deletesnapshot(uuid) cascade; > drop function if exists public.deletestep(uuid) cascade; > drop function if exists public.deletestepsubjectentity(uuid, uuid) cascade; > drop function if exists public.deletestorage_domain_dynamic(uuid) cascade; > drop function if exists public.deletestorage_domain_static(uuid) cascade; > drop function if exists public.deletestorage_pool(uuid) cascade; > drop function if exists public.deletestorage_pool_iso_map(uuid, uuid) cascade; > drop function if exists public.deletestorage_server_connections(character varying) cascade; > drop function if exists public.deletestoragedevicebyid(uuid) cascade; > drop function if exists public.deletestoragedomaindr(uuid, uuid) cascade; > drop function if exists public.deletestoragedomainovfinfo(uuid) cascade; > drop function if exists public.deletestorageserverconnectionextension(uuid) cascade; > drop function if exists public.deletesupportedclusterfeature(uuid, uuid) cascade; > drop function if exists public.deletetags(uuid) cascade; > drop function if exists public.deletetags_user_group_map(uuid, uuid) cascade; > drop function if exists public.deletetags_user_map(uuid, uuid) cascade; > drop function if exists public.deletetags_vds_map(uuid, uuid) cascade; > drop function if exists public.deletetags_vm_map(uuid, uuid) cascade; > drop function if exists public.deletetags_vm_pool_map(uuid, uuid) cascade; > drop function if exists public.deleteuser(uuid) cascade; > drop function if exists public.deleteuserprofile(uuid) cascade; > drop function if exists public.deletevdcoption(integer) cascade; > drop function if exists public.deletevds(uuid) cascade; > drop function if exists public.deletevds_interface(uuid) cascade; > drop function if exists public.deletevds_interface_statistics(uuid) cascade; > drop function if exists public.deletevds_spm_id_map(uuid) cascade; > drop function if exists public.deletevdsdynamic(uuid) cascade; > drop function if exists public.deletevdsstatic(uuid) cascade; > drop function if exists public.deletevdsstatistics(uuid) cascade; > drop function if exists public.deletevfsconfiglabel(uuid, text) cascade; > drop function if exists public.deletevfsconfignetwork(uuid, uuid) cascade; > drop function if exists public.deletevm(uuid) cascade; > drop function if exists public.deletevm_interface_statistics(uuid) cascade; > drop function if exists public.deletevm_pool_map(uuid) cascade; > drop function if exists public.deletevm_pools(uuid) cascade; > drop function if exists public.deletevmbackup(uuid) cascade; > drop function if exists public.deletevmcheckpoint(uuid) cascade; > drop function if exists public.deletevmdevice(uuid, uuid) cascade; > drop function if exists public.deletevmdevicesbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.deletevmdynamic(uuid) cascade; > drop function if exists public.deletevmguestagentinterfacesbyvmids(uuid[]) cascade; > drop function if exists public.deletevmicon(uuid) cascade; > drop function if exists public.deletevmicondefault(uuid) cascade; > drop function if exists public.deletevmiconifunused(uuid) cascade; > drop function if exists public.deletevminit(uuid) cascade; > drop function if exists public.deletevminterface(uuid) cascade; > drop function if exists public.deletevminterfacefilterparameter(uuid) cascade; > drop function if exists public.deletevmjobs(uuid) cascade; > drop function if exists public.deletevmstatic(uuid, boolean) cascade; > drop function if exists public.deletevmstatistics(uuid) cascade; > drop function if exists public.deletevmtemplates(uuid) cascade; > drop function if exists public.deletevnicprofile(uuid) cascade; > drop function if exists public.displayallauditlogevents(integer) cascade; > drop function if exists public.existsvmdevicebyvmidandtype(uuid, character varying) cascade; > drop function if exists public.fn_authz_entry_info(uuid) cascade; > drop function if exists public.fn_db_add_action_group_to_role(uuid, integer) cascade; > drop function if exists public.fn_db_add_column(character varying, character varying, text) cascade; > drop function if exists public.fn_db_add_column_to_object_white_list(character varying, character varying) cascade; > drop function if exists public.fn_db_add_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_add_config_value_for_versions_up_to(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_change_column_type(character varying, character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_change_table_string_columns_to_empty_string(character varying, character varying[]) cascade; > drop function if exists public.fn_db_create_constraint(character varying, character varying, text) cascade; > drop function if exists public.fn_db_create_index(character varying, character varying, text, text, boolean) cascade; > drop function if exists public.fn_db_delete_config_for_version(text) cascade; > drop function if exists public.fn_db_delete_config_value(character varying, text) cascade; > drop function if exists public.fn_db_delete_config_value_all_versions(character varying) cascade; > drop function if exists public.fn_db_drop_column(character varying, character varying) cascade; > drop function if exists public.fn_db_drop_constraint(character varying, character varying) cascade; > drop function if exists public.fn_db_drop_index(character varying) cascade; > drop function if exists public.fn_db_get_async_tasks() cascade; > drop function if exists public.fn_db_grant_action_group_to_all_roles_filter(integer, uuid[]) cascade; > drop function if exists public.fn_db_is_table_exists(character varying) cascade; > drop function if exists public.fn_db_mask_object(regclass) cascade; > drop function if exists public.fn_db_remove_csv_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_remove_uuid_from_csv(text, uuid) cascade; > drop function if exists public.fn_db_rename_column(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_rename_config_key(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_rename_table(character varying, character varying) cascade; > drop function if exists public.fn_db_split_config_value(character varying, character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_unlock_all() cascade; > drop function if exists public.fn_db_unlock_disk(uuid) cascade; > drop function if exists public.fn_db_unlock_entity(character varying, character varying, boolean) cascade; > drop function if exists public.fn_db_unlock_snapshot(uuid) cascade; > drop function if exists public.fn_db_update_column_to_jsonb_compatible_values(character varying, character varying, jsonb) cascade; > drop function if exists public.fn_db_update_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_update_default_config_value(character varying, character varying, character varying, character varying, boolean) cascade; > drop function if exists public.fn_db_varchar_to_jsonb(character varying, jsonb) cascade; > drop function if exists public.fn_get_ad_element_name(uuid) cascade; > drop function if exists public.fn_get_column_size(character varying, character varying) cascade; > drop function if exists public.fn_get_comparable_ip_list(text) cascade; > drop function if exists public.fn_get_dedicated_hosts_ids_by_vm_id(uuid) cascade; > drop function if exists public.fn_get_entity_name(uuid, integer) cascade; > drop function if exists public.fn_get_entity_parents(uuid, integer) cascade; > drop function if exists public.fn_get_num_of_vcpus(vm_static) cascade; > drop function if exists public.fn_image_deleted() cascade; > drop function if exists public.fn_perms_get_storage_pools_with_permitted_action_on_clusters(uuid, integer, boolean, boolean) cascade; > drop function if exists public.fn_user_permissions(uuid) cascade; > drop function if exists public.fnsplitter(text) cascade; > drop function if exists public.fnsplitterinteger(text) cascade; > drop function if exists public.fnsplitteruuid(text) cascade; > drop function if exists public.fnsplitterwithseperator(text, character varying) cascade; > drop function if exists public.force_delete_storage_domain(uuid) cascade; > drop function if exists public.freehostdevicesusedbyvmid(uuid) cascade; > drop function if exists public.generate_drop_all_functions_syntax() cascade; > drop function if exists public.generate_drop_all_seq_syntax() cascade; > drop function if exists public.generate_drop_all_tables_syntax() cascade; > drop function if exists public.generate_drop_all_user_types_syntax() cascade; > drop function if exists public.generate_drop_all_views_syntax() cascade; > drop function if exists public.get_all_commands() cascade; > drop function if exists public.get_entity_permissions(uuid, integer, uuid, integer) cascade; > drop function if exists public.get_entity_permissions_for_user_and_groups(uuid, text, integer, uuid, integer, boolean) cascade; > drop function if exists public.get_entity_snapshot_by_command_id(uuid) cascade; > drop function if exists public.get_entity_snapshot_by_id(uuid) cascade; > drop function if exists public.get_oauth_client(character varying) cascade; > drop function if exists public.get_role_groups_by_role_id(uuid) cascade; > drop function if exists public.get_roles_groups_by_action_group_id_and_by_role_id(integer, uuid) cascade; > drop function if exists public.get_seconds_to_wait_before_pm_operation(character varying, character varying, integer) cascade; > drop function if exists public.getaccessprotocolsbyglustervolumeguid(uuid) cascade; > drop function if exists public.getactivevmnameswithisoattached(uuid) cascade; > drop function if exists public.getactivevmnameswithisoonstoragedomain(uuid) cascade; > drop function if exists public.getactivevmswithleaseonstoragedomain(uuid) cascade; > drop function if exists public.getallbystatus(integer) cascade; > drop function if exists public.getallfromasync_tasks() cascade; > drop function if exists public.getallfromauditlog(uuid, boolean) cascade; > drop function if exists public.getallfrombasedisks() cascade; > drop function if exists public.getallfrombookmarks() cascade; > drop function if exists public.getallfromclusterpolicys() cascade; > drop function if exists public.getallfromclusterpolicyunits() cascade; > drop function if exists public.getallfromcommandentities() cascade; > drop function if exists public.getallfromcpuprofiles() cascade; > drop function if exists public.getallfromcustom_actions() cascade; > drop function if exists public.getallfromdisk_image_dynamic() cascade; > drop function if exists public.getallfromdisklunmaps() cascade; > drop function if exists public.getallfromdiskprofiles() cascade; > drop function if exists public.getallfromdnsresolverconfigurations() cascade; > drop function if exists public.getallfromglusterservices() cascade; > drop function if exists public.getallfromhostdevices() cascade; > drop function if exists public.getallfromhostnicvfsconfigs() cascade; > drop function if exists public.getallfromimages() cascade; > drop function if exists public.getallfromimageuploads() cascade; > drop function if exists public.getallfromiscsibonds() cascade; > drop function if exists public.getallfromlibvirtsecrets() cascade; > drop function if exists public.getallfromlun_storage_server_connection_map() cascade; > drop function if exists public.getallfrommacpools() cascade; > drop function if exists public.getallfromnetwork(uuid, boolean) cascade; > drop function if exists public.getallfromnetwork_cluster() cascade; > drop function if exists public.getallfromnetwork_clusterbyclusterid(uuid) cascade; > drop function if exists public.getallfromnetwork_clusterbynetworkid(uuid) cascade; > drop function if exists public.getallfromnetworkattachments() cascade; > drop function if exists public.getallfromnumanodecpumap() cascade; > drop function if exists public.getallfrompolicyunits() cascade; > drop function if exists public.getallfromproviders() cascade; > drop function if exists public.getallfromprovidersbytypes(character varying[]) cascade; > drop function if exists public.getallfromrole(integer) cascade; > drop function if exists public.getallfromsnapshots() cascade; > drop function if exists public.getallfromsnapshotsbyvmid(uuid, uuid, boolean, boolean) cascade; > drop function if exists public.getallfromstorage_domain_dynamic() cascade; > drop function if exists public.getallfromstorage_domain_static() cascade; > drop function if exists public.getallfromstorage_pool(uuid, boolean) cascade; > drop function if exists public.getallfromstorage_pool_iso_map() cascade; > drop function if exists public.getallfromstorageserverconnectionextensions() cascade; > drop function if exists public.getallfromtags() cascade; > drop function if exists public.getallfromtags_user_group_map() cascade; > drop function if exists public.getallfromtags_user_map() cascade; > drop function if exists public.getallfromtags_vds_map() cascade; > drop function if exists public.getallfromtags_vm_map() cascade; > drop function if exists public.getallfromtags_vm_pool_map() cascade; > drop function if exists public.getallfromusers(uuid, boolean) cascade; > drop function if exists public.getallfromvdcoption() cascade; > drop function if exists public.getallfromvds_spm_id_map() cascade; > drop function if exists public.getallfromvdsdynamic() cascade; > drop function if exists public.getallfromvdsstatic() cascade; > drop function if exists public.getallfromvdsstatistics() cascade; > drop function if exists public.getallfromvm_pool_map() cascade; > drop function if exists public.getallfromvm_pools() cascade; > drop function if exists public.getallfromvmbackups() cascade; > drop function if exists public.getallfromvmcheckpoints() cascade; > drop function if exists public.getallfromvmdynamic() cascade; > drop function if exists public.getallfromvmicondefaults() cascade; > drop function if exists public.getallfromvmicons() cascade; > drop function if exists public.getallfromvmiconsfiltered(uuid, boolean) cascade; > drop function if exists public.getallfromvminterfacefilterparameters() cascade; > drop function if exists public.getallfromvminterfaces() cascade; > drop function if exists public.getallfromvmstatic() cascade; > drop function if exists public.getallfromvmstaticbystoragepoolid(uuid) cascade; > drop function if exists public.getallfromvmstatistics() cascade; > drop function if exists public.getallfromvnicprofiles() cascade; > drop function if exists public.getallgroups() cascade; > drop function if exists public.getallhashesfromvmdynamic() cascade; > drop function if exists public.getalljobidsbyentityid(uuid) cascade; > drop function if exists public.getalljobs() cascade; > drop function if exists public.getalllibvirtsecretsbyproviderid(uuid) cascade; > drop function if exists public.getallmacpoolrangesbymacpoolid(uuid) cascade; > drop function if exists public.getallmacsbymacpoolid(uuid) cascade; > drop function if exists public.getallmanagementnetworksbydatacenterid(uuid) cascade; > drop function if exists public.getallnetworkbyclusterid(uuid, uuid, boolean) cascade; > drop function if exists public.getallnetworkbystoragepoolid(uuid, uuid, boolean) cascade; > drop function if exists public.getallnetworkfilters() cascade; > drop function if exists public.getallnetworklabelsbydatacenterid(uuid) cascade; > drop function if exists public.getallnetworksbynetworkproviderid(uuid) cascade; > drop function if exists public.getallnetworksbyproviderphysicalnetworkid(uuid) cascade; > drop function if exists public.getallnetworksbyqosid(uuid) cascade; > drop function if exists public.getallnonadminroles(integer) cascade; > drop function if exists public.getallovfentitiesforstoragedomainbyentitytype(uuid, character varying) cascade; > drop function if exists public.getallqosbyqostype(smallint) cascade; > drop function if exists public.getallqosforstoragepool(uuid) cascade; > drop function if exists public.getallqosforstoragepoolbyqostype(uuid, smallint) cascade; > drop function if exists public.getallsnapshotsbymemorydisk(uuid) cascade; > drop function if exists public.getallsnapshotsbystoragedomainid(uuid) cascade; > drop function if exists public.getallsteps() cascade; > drop function if exists public.getallstorage_server_connections() cascade; > drop function if exists public.getallsupportednetworkfiltersbyversion(character varying) cascade; > drop function if exists public.getallunfinishedvdskdumpstatus() cascade; > drop function if exists public.getallvfsconfigbyhostid(uuid) cascade; > drop function if exists public.getallvmjobs() cascade; > drop function if exists public.getanyadminrolebyuseridandgroupids(uuid, text, integer) cascade; > drop function if exists public.getasync_tasksbytask_id(uuid) cascade; > drop function if exists public.getasynctaskentitiesbytaskid(uuid) cascade; > drop function if exists public.getasynctasksbyentityid(uuid) cascade; > drop function if exists public.getasynctasksbystoragepoolid(uuid) cascade; > drop function if exists public.getasynctasksbyvdsmtaskid(uuid) cascade; > drop function if exists public.getasynctasksidsbyentityid(uuid) cascade; > drop function if exists public.getauditlogbyauditlogid(bigint) cascade; > drop function if exists public.getauditlogbyoriginandcustomeventid(character varying, integer) cascade; > drop function if exists public.getauditlogbyvmid(uuid, uuid, boolean) cascade; > drop function if exists public.getauditlogbyvmtemplateid(uuid, uuid, boolean) cascade; > drop function if exists public.getauditlogbyvolumeidandtype(uuid, integer) cascade; > drop function if exists public.getauditloglaterthendate(timestamp with time zone) cascade; > drop function if exists public.getbasediskbybasediskid(uuid) cascade; > drop function if exists public.getbasedisksbyalias(character varying) cascade; > drop function if exists public.getbookmarkbybookmark_id(uuid) cascade; > drop function if exists public.getbookmarkbybookmark_name(character varying) cascade; > drop function if exists public.getbrickdetailsbyid(uuid) cascade; > drop function if exists public.getcinderstorage(uuid) cascade; > drop function if exists public.getcinderstoragebydrivers(jsonb) cascade; > drop function if exists public.getclusterfeaturesbyversionandcategory(character varying, integer) cascade; > drop function if exists public.getclusterpolicybyclusterpolicyid(uuid) cascade; > drop function if exists public.getclusterpolicyunitsbyclusterpolicyid(uuid) cascade; > drop function if exists public.getcommandassociatedentities(uuid) cascade; > drop function if exists public.getcommandentitiesbyparentcmdid(uuid) cascade; > drop function if exists public.getcommandentitybycommandentityid(uuid) cascade; > drop function if exists public.getcommandidsbyentityid(uuid) cascade; > drop function if exists public.getconnectionsbyiscsibondid(uuid) cascade; > drop function if exists public.getcpuprofilebycpuprofileid(uuid) cascade; > drop function if exists public.getcpuprofilesbyclusterid(uuid, uuid, boolean, integer) cascade; > drop function if exists public.getcpuprofilesbyqosid(uuid) cascade; > drop function if exists public.getcustom_actionsbyaction_id(integer) cascade; > drop function if exists public.getcustom_actionsbynameandtab(character varying, integer) cascade; > drop function if exists public.getcustom_actionsbytab_id(integer) cascade; > drop function if exists public.getdbgeneration(uuid) cascade; > drop function if exists public.getdcidbyexternalnetworkid(text) cascade; > drop function if exists public.getdefaultmacpool() cascade; > drop function if exists public.getdisk_image_dynamicbyimage_id(uuid) cascade; > drop function if exists public.getdiskbydiskidandstoragedomainid(uuid, uuid) cascade; > drop function if exists public.getdisklunmapbydiskid(uuid) cascade; > drop function if exists public.getdisklunmapbydisklunmapid(uuid, character varying) cascade; > drop function if exists public.getdisklunmapbylunid(character varying) cascade; > drop function if exists public.getdisklunmapsforvmsinpool(uuid) cascade; > drop function if exists public.getdiskprofilebydiskprofileid(uuid) cascade; > drop function if exists public.getdiskprofilesbyqosid(uuid) cascade; > drop function if exists public.getdiskprofilesbystoragedomainid(uuid, uuid, boolean) cascade; > drop function if exists public.getdisksvmguidbasicview(uuid, boolean, uuid, boolean) cascade; > drop function if exists public.getdnsresolverconfigurationbydnsresolverconfigurationid(uuid) cascade; > drop function if exists public.getdwhhistorytimekeepingbyvarname(character varying) cascade; > drop function if exists public.getelementidsbyidandgroups(uuid, text) cascade; > drop function if exists public.getenginesession(integer) cascade; > drop function if exists public.getenginesessionbysessionid(text) cascade; > drop function if exists public.getentitiesbydiskid(uuid) cascade; > drop function if exists public.getentitiesnamemap() cascade; > drop function if exists public.getevent_subscriberbysubscriber_id(uuid) cascade; > drop function if exists public.getexternalidsfromsteps(character varying, character varying) cascade; > drop function if exists public.getexternalvariablebyname(character varying) cascade; > drop function if exists public.getfenceagentbyid(uuid) cascade; > drop function if exists public.getfenceagentsbyvdsid(uuid) cascade; > drop function if exists public.getglobalids(character varying) cascade; > drop function if exists public.getglusterclusterservicesbyclusterid(uuid) cascade; > drop function if exists public.getglusterclusterservicesbyclusteridandservicetype(uuid, character varying) cascade; > drop function if exists public.getglustergeorepsessiondetails(uuid) cascade; > drop function if exists public.getglustergeorepsessiondetailsforbrick(uuid, uuid) cascade; > drop function if exists public.getglustergeorepsessionunsetconfig(uuid) cascade; > drop function if exists public.getglusterhook(uuid, character varying, character varying, character varying, boolean) cascade; > drop function if exists public.getglusterhookbyid(uuid, boolean) cascade; > drop function if exists public.getglusterhookcontentbyid(uuid) cascade; > drop function if exists public.getglusterhooksbyclusterid(uuid) cascade; > drop function if exists public.getglusteroptionbyid(uuid) cascade; > drop function if exists public.getglusterserverbyglusterserveruuid(uuid) cascade; > drop function if exists public.getglusterserverbyserverid(uuid) cascade; > drop function if exists public.getglusterservicebyglusterserviceid(uuid) cascade; > drop function if exists public.getglusterservicebytypeandname(character varying, character varying) cascade; > drop function if exists public.getglusterservicesbytype(character varying) cascade; > drop function if exists public.getglusterservicetypes() cascade; > drop function if exists public.getglustervolumedetailsbyid(uuid) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyclusterid(uuid) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyclusteridandname(uuid, character varying) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyvolumeid(uuid, uuid) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyvolumeidandname(uuid, uuid, character varying) cascade; > drop function if exists public.getgroupbyexternalid(character varying, text) cascade; > drop function if exists public.getgroupbyid(uuid) cascade; > drop function if exists public.getgroupbyname(character varying) cascade; > drop function if exists public.getgroupbynameanddomain(character varying, character varying) cascade; > drop function if exists public.gethostdevicebyhostidanddevicename(uuid, character varying) cascade; > drop function if exists public.gethostdevicesbyhostid(uuid) cascade; > drop function if exists public.gethostdevicesbyhostidandiommugroup(uuid, integer) cascade; > drop function if exists public.gethostedenginestoragedomainids() cascade; > drop function if exists public.gethostnetworksbycluster(uuid) cascade; > drop function if exists public.gethostnicvfsconfigbyid(uuid) cascade; > drop function if exists public.gethostproviderbinding(uuid, character varying) cascade; > drop function if exists public.gethostsandvmsforclusters(uuid[]) cascade; > drop function if exists public.getidsforovfdeletion(uuid) cascade; > drop function if exists public.getidsofhostswithstatus(integer) cascade; > drop function if exists public.getimage_storage_domain_mapbyimage_id(uuid) cascade; > drop function if exists public.getimage_storage_domain_mapbystorage_domain_id(uuid) cascade; > drop function if exists public.getimagebyimageid(uuid) cascade; > drop function if exists public.getimagetransfersbyvdsid(uuid) cascade; > drop function if exists public.getimageuploadsbycommandid(uuid, uuid, boolean) cascade; > drop function if exists public.getimageuploadsbydiskid(uuid) cascade; > drop function if exists public.getisclusterempty(uuid) cascade; > drop function if exists public.getiscsibondbyiscsibondid(uuid) cascade; > drop function if exists public.getiscsibondsbynetworkid(uuid) cascade; > drop function if exists public.getiscsibondsbystoragepoolid(uuid) cascade; > drop function if exists public.getisodisksbystoragepool(uuid) cascade; > drop function if exists public.getjobbyjobid(uuid) cascade; > drop function if exists public.getjobsbycorrelationid(character varying) cascade; > drop function if exists public.getjobsbyenginesessionseqidandstatus(bigint, character varying) cascade; > drop function if exists public.getjobsbyoffsetandpagesize(integer, integer) cascade; > drop function if exists public.getjobsubjectentitybyjobid(uuid) cascade; > drop function if exists public.getkdumpstatusforvds(uuid) cascade; > drop function if exists public.getlabelsbyvfsconfigid(uuid) cascade; > drop function if exists public.getlastsuccessfulenginebackup(character varying) cascade; > drop function if exists public.getlibvirtsecretbylibvirtsecretid(uuid) cascade; > drop function if exists public.getlibvirtsecretsbypoolidonactivedomains(uuid) cascade; > drop function if exists public.getlun_storage_server_connection_mapbylun(character varying) cascade; > drop function if exists public.getlun_storage_server_connection_mapbylunbystorage_server_conn(character varying, character varying) cascade; > drop function if exists public.getmacpoolbyclusterid(uuid) cascade; > drop function if exists public.getmacpoolbymacpoolid(uuid) cascade; > drop function if exists public.getmacsbyclusterid(uuid) cascade; > drop function if exists public.getmacsbydatacenterid(uuid) cascade; > drop function if exists public.getmanagementnetworkbycluster(uuid) cascade; > drop function if exists public.getnameserversbydnsresolverconfigurationid(uuid) cascade; > drop function if exists public.getnamesofhostsdedicatedtovm(uuid) cascade; > drop function if exists public.getnamesofvmstaticdedicatedtovds(uuid) cascade; > drop function if exists public.getnetwork_clusterbycluster_idandbynetwork_id(uuid, uuid) cascade; > drop function if exists public.getnetworkattachmentbynetworkattachmentid(uuid) cascade; > drop function if exists public.getnetworkattachmentbynicidandnetworkid(uuid, uuid) cascade; > drop function if exists public.getnetworkattachmentsbyhostid(uuid) cascade; > drop function if exists public.getnetworkattachmentsbynetworkid(uuid) cascade; > drop function if exists public.getnetworkattachmentsbynicid(uuid) cascade; > drop function if exists public.getnetworkbyid(uuid, uuid, boolean) cascade; > drop function if exists public.getnetworkbynameandcluster(character varying, uuid) cascade; > drop function if exists public.getnetworkbynameanddatacenter(character varying, uuid) cascade; > drop function if exists public.getnetworkbyvdsmnameanddatacenterid(character varying, uuid) cascade; > drop function if exists public.getnetworkfilterbyid(uuid) cascade; > drop function if exists public.getnetworkfilterbyname(character varying) cascade; > drop function if exists public.getnetworksbyiscsibondid(uuid) cascade; > drop function if exists public.getnetworksbyvfsconfigid(uuid) cascade; > drop function if exists public.getnoncountablequtoavmstatuses() cascade; > drop function if exists public.getnumberofimagesinstoragedomain(uuid) cascade; > drop function if exists public.getnumberofvmsincluster(uuid) cascade; > drop function if exists public.getnumofsnapshotsbymemoryvolume(uuid[]) cascade; > drop function if exists public.getnvmtagsbyvmid(uuid) cascade; > drop function if exists public.getnvmtagsbyvmidanddefaulttag(uuid) cascade; > drop function if exists public.getoptionsbyglustervolumeguid(uuid) cascade; > drop function if exists public.getorderedvmguidsforrunmultipleactions(character varying) cascade; > drop function if exists public.getovfdatabyentityidandstoragedomain(uuid, uuid) cascade; > drop function if exists public.getovfgeneration(uuid) cascade; > drop function if exists public.getpermissionbyroleid(uuid) cascade; > drop function if exists public.getpolicyunitbypolicyunitid(uuid) cascade; > drop function if exists public.getproviderbyname(character varying) cascade; > drop function if exists public.getproviderbyproviderid(uuid) cascade; > drop function if exists public.getqosbyqosid(uuid) cascade; > drop function if exists public.getquotacount() cascade; > drop function if exists public.getrepo_files_by_storage_domain(uuid, integer) cascade; > drop function if exists public.getrequirednetworksbydatacenterid(uuid) cascade; > drop function if exists public.getroleactiongroupsbyroleid(uuid) cascade; > drop function if exists public.getrolebyname(character varying) cascade; > drop function if exists public.getrolsbyid(uuid) cascade; > drop function if exists public.getsessionuserandgroupsbyid(uuid, integer) cascade; > drop function if exists public.getsnapshotbysnapshotid(uuid, uuid, boolean) cascade; > drop function if exists public.getsnapshotbyvmidandstatus(uuid, character varying) cascade; > drop function if exists public.getsnapshotbyvmidandtype(uuid, character varying, uuid, boolean) cascade; > drop function if exists public.getsnapshotbyvmidandtypeandstatus(uuid, character varying, character varying) cascade; > drop function if exists public.getsnapshotidsbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.getsnapshotidsbyvmidandtypeandstatus(uuid, character varying, character varying) cascade; > drop function if exists public.getstepbystepid(uuid) cascade; > drop function if exists public.getstepsbyexternaltaskid(uuid) cascade; > drop function if exists public.getstepsbyjobid(uuid) cascade; > drop function if exists public.getstepsbyparentstepid(uuid) cascade; > drop function if exists public.getstepsforentitybystatus(character varying, uuid, character varying) cascade; > drop function if exists public.getstepsubjectentitiesbystepid(uuid) cascade; > drop function if exists public.getstorage_domain_dynamicbyid(uuid) cascade; > drop function if exists public.getstorage_domain_staticbyid(uuid) cascade; > drop function if exists public.getstorage_domain_staticbyname(character varying) cascade; > drop function if exists public.getstorage_domain_staticbynamefiltered(character varying, uuid, boolean) cascade; > drop function if exists public.getstorage_domain_staticbystorage_pool_id(uuid) cascade; > drop function if exists public.getstorage_pool_iso_mapbystorage_idandbystorage_pool_id(uuid, uuid) cascade; > drop function if exists public.getstorage_pool_iso_mapsbybystorage_pool_id(uuid, uuid) cascade; > drop function if exists public.getstorage_pool_iso_mapsbystorage_id(uuid) cascade; > drop function if exists public.getstorage_poolbyid(uuid, uuid, boolean) cascade; > drop function if exists public.getstorage_poolbyname(character varying, boolean) cascade; > drop function if exists public.getstorage_poolsbyclusterid(uuid) cascade; > drop function if exists public.getstorage_poolsbystoragedomainid(uuid) cascade; > drop function if exists public.getstorage_poolsbyvdsid(uuid) cascade; > drop function if exists public.getstorage_server_connectionsbyconnection(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbyid(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbyiqn(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbyiqnandconnection(character varying, character varying) cascade; > drop function if exists public.getstorage_server_connectionsbykey(character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.getstorage_server_connectionsbylunid(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbystoragetype(integer) cascade; > drop function if exists public.getstorage_server_connectionsbyvolumegroupid(character varying) cascade; > drop function if exists public.getstorageconnectionsbystoragetypeandstatus(uuid, integer, character varying) cascade; > drop function if exists public.getstoragedevicebyid(uuid) cascade; > drop function if exists public.getstoragedevicesbyvdsid(uuid) cascade; > drop function if exists public.getstoragedomaindr(uuid, uuid) cascade; > drop function if exists public.getstoragedomaindrlist(uuid) cascade; > drop function if exists public.getstoragedomaindrwithgeorep(uuid) cascade; > drop function if exists public.getstoragedomainidsbystoragepoolidandstatus(uuid, integer) cascade; > drop function if exists public.getstoragepoolsbyclusterservice(boolean, boolean) cascade; > drop function if exists public.getstorageserverconnectionextensionbyid(uuid) cascade; > drop function if exists public.getstorageserverconnectionextensionsbyhostid(uuid) cascade; > drop function if exists public.getstorageserverconnectionextensionsbyhostidandtarget(uuid, character varying) cascade; > drop function if exists public.getstorageserverconnectionsbyids(text) cascade; > drop function if exists public.getstorageserverconnectionsfordomain(uuid) cascade; > drop function if exists public.getsupportedhostfeaturesbyhostid(uuid) cascade; > drop function if exists public.getsystem_statistics(character varying, character varying) cascade; > drop function if exists public.gettags_vm_pool_mapbytag_idandbyvm_pool_id(uuid, uuid) cascade; > drop function if exists public.gettagsbyparent_id(uuid) cascade; > drop function if exists public.gettagsbytag_id(uuid) cascade; > drop function if exists public.gettagsbytag_name(character varying) cascade; > drop function if exists public.gettaguserbytagidandbyuserid(uuid, uuid) cascade; > drop function if exists public.gettagusergroupbygroupidandbytagid(uuid, uuid) cascade; > drop function if exists public.gettagvdsbytagidandbyvdsid(uuid, uuid) cascade; > drop function if exists public.gettagvmbytagidandbyvmid(uuid, uuid) cascade; > drop function if exists public.gettemplatecount() cascade; > drop function if exists public.gettransporttypesbyglustervolumeguid(uuid) cascade; > drop function if exists public.getuserandgroupsbyid(uuid) cascade; > drop function if exists public.getuserbyexternalid(character varying, text) cascade; > drop function if exists public.getuserbyuserid(uuid, boolean) cascade; > drop function if exists public.getuserbyusernameanddomain(character varying, character varying) cascade; > drop function if exists public.getusersbytemplateguid(uuid) cascade; > drop function if exists public.getusersbyvmguid(uuid) cascade; > drop function if exists public.getvdcoptionbyid(integer) cascade; > drop function if exists public.getvdcoptionbyname(character varying, character varying) cascade; > drop function if exists public.getvds_spm_id_mapbystorage_pool_id(uuid) cascade; > drop function if exists public.getvds_spm_id_mapbystorage_pool_idandbyvds_spm_id(uuid, integer) cascade; > drop function if exists public.getvds_spm_id_mapbyvds_id(uuid) cascade; > drop function if exists public.getvdsdynamicbyvdsid(uuid) cascade; > drop function if exists public.getvdsstaticbyclusterid(uuid) cascade; > drop function if exists public.getvdsstaticbyhostname(character varying) cascade; > drop function if exists public.getvdsstaticbyip(character varying) cascade; > drop function if exists public.getvdsstaticbyvdsid(uuid) cascade; > drop function if exists public.getvdsstaticbyvdsids(uuid[]) cascade; > drop function if exists public.getvdsstaticbyvdsname(character varying) cascade; > drop function if exists public.getvdsstatisticsbyvdsid(uuid) cascade; > drop function if exists public.getvfsconfigbynicid(uuid) cascade; > drop function if exists public.getvm_interface_statisticsbyid(uuid) cascade; > drop function if exists public.getvm_pool_mapbyvm_pool_id(uuid) cascade; > drop function if exists public.getvmandtemplatesidsbystoragedomainid(uuid, boolean, boolean) cascade; > drop function if exists public.getvmbackupbyvmbackupid(uuid) cascade; > drop function if exists public.getvmbackupsbyvmid(uuid) cascade; > drop function if exists public.getvmcheckpointbyvmcheckpointid(uuid) cascade; > drop function if exists public.getvmcheckpointsbyvmid(uuid) cascade; > drop function if exists public.getvmdevicesattachedtohost(uuid) cascade; > drop function if exists public.getvmdynamicbyvmguid(uuid) cascade; > drop function if exists public.getvmguestagentinterfacesbyvmid(uuid, uuid, boolean) cascade; > drop function if exists public.getvmiconbyvmicondataurl(text) cascade; > drop function if exists public.getvmiconbyvmiconid(uuid) cascade; > drop function if exists public.getvmicondefaultbyvmicondefaultid(uuid) cascade; > drop function if exists public.getvmicondefaultbyvmicondefaultlargeiconid(uuid) cascade; > drop function if exists public.getvmicondefaultbyvmicondefaultosid(integer) cascade; > drop function if exists public.getvmidsforversionupdate(uuid) cascade; > drop function if exists public.getvmidswithspecificisoattached(uuid) cascade; > drop function if exists public.getvminitbyids(text) cascade; > drop function if exists public.getvminitbyvmid(uuid) cascade; > drop function if exists public.getvminterfacebytemplateid(uuid) cascade; > drop function if exists public.getvminterfacebyvminterfaceid(uuid) cascade; > drop function if exists public.getvminterfacefilterparameterbyvminterfacefilterparameterid(uuid) cascade; > drop function if exists public.getvminterfacefilterparametersbyvminterfaceid(uuid) cascade; > drop function if exists public.getvminterfacesbynetworkid(uuid) cascade; > drop function if exists public.getvminterfacesbyvmid(uuid) cascade; > drop function if exists public.getvmmapsinvmpoolbyvmpoolidandstatus(uuid, integer) cascade; > drop function if exists public.getvmnameswithspecificisoattached(uuid) cascade; > drop function if exists public.getvmsandtemplatesidswithoutattachedimagedisks(uuid, boolean) cascade; > drop function if exists public.getvmsdynamicrunningonvds(uuid) cascade; > drop function if exists public.getvmsidsforovfupdate(uuid) cascade; > drop function if exists public.getvmsmigratingtovds(uuid) cascade; > drop function if exists public.getvmsstaticrunningonvds(uuid) cascade; > drop function if exists public.getvmstaticbycluster(uuid) cascade; > drop function if exists public.getvmstaticbygroupidandnetwork(uuid, character varying) cascade; > drop function if exists public.getvmstaticbyname(character varying) cascade; > drop function if exists public.getvmstaticbyvmguid(uuid) cascade; > drop function if exists public.getvmstaticbyvmguids(uuid[]) cascade; > drop function if exists public.getvmstaticwithouticon() cascade; > drop function if exists public.getvmstatisticsbyvmguid(uuid) cascade; > drop function if exists public.getvmswithleaseonstoragedomain(uuid) cascade; > drop function if exists public.getvmtemplateinterfacesbynetworkid(uuid) cascade; > drop function if exists public.getvmtemplatesidsforovfupdate(uuid) cascade; > drop function if exists public.getvnicprofilebyvnicprofileid(uuid) cascade; > drop function if exists public.getvnicprofilesbynetworkid(uuid) cascade; > drop function if exists public.increasestoragepoolmasterversion(uuid) cascade; > drop function if exists public.incrementdbgeneration(uuid) cascade; > drop function if exists public.incrementdbgenerationforallinstoragepool(uuid) cascade; > drop function if exists public.incrementdbgenerationforvms(uuid[]) cascade; > drop function if exists public.insert_entity_snapshot(uuid, uuid, character varying, character varying, character varying, text, character varying, integer, integer) cascade; > drop function if exists public.insert_osinfo(integer, character varying) cascade; > drop function if exists public.insert_roles_groups(integer, uuid) cascade; > drop function if exists public.insertaffinitygroupwithmembers(uuid, character varying, character varying, uuid, boolean, boolean, boolean, boolean, boolean, boolean, uuid[], uuid[]) cascade; > drop function if exists public.insertasync_tasks(integer, integer, integer, uuid, uuid, uuid, uuid, uuid, uuid, timestamp with time zone, uuid, integer) cascade; > drop function if exists public.insertasynctaskentities(uuid, uuid, character varying) cascade; > drop function if exists public.insertauditlog(bigint, timestamp with time zone, integer, character varying, integer, text, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, character varying, uuid, uuid, character varying, text, boolean, uuid, text, character varying, integer, integer, text) cascade; > drop function if exists public.insertbasedisk(uuid, boolean, character varying, character varying, character varying, boolean, integer, smallint, character varying, smallint, character varying) cascade; > drop function if exists public.insertbookmark(uuid, character varying, character varying) cascade; > drop function if exists public.insertcinderstorage(uuid, jsonb, text) cascade; > drop function if exists public.insertcluster(uuid, character varying, text, character varying, character varying, uuid, integer, boolean, character varying, boolean, integer, boolean, boolean, boolean, character varying, boolean, boolean, boolean, uuid, text, boolean, integer, smallint, character varying, boolean, smallint, character varying, character varying, boolean, boolean, smallint, boolean, boolean, boolean, character varying, boolean, character varying, integer, uuid, uuid, character varying, boolean, boolean, integer, uuid, integer, smallint, boolean) cascade; > drop function if exists public.insertclusterfeature(uuid, character varying, character varying, integer, text) cascade; > drop function if exists public.insertclusterpolicy(uuid, character varying, character varying, boolean, boolean, text) cascade; > drop function if exists public.insertclusterpolicyunit(uuid, uuid, integer, integer) cascade; > drop function if exists public.insertcommandassociatedentities(uuid, uuid, character varying) cascade; > drop function if exists public.insertcommandentity(uuid, bigint, uuid, integer, uuid, uuid, text, text, character varying, timestamp with time zone, character varying, boolean, boolean, text, character varying, text) cascade; > drop function if exists public.insertcpuprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.insertcpuqos(uuid, smallint, character varying, text, uuid, integer) cascade; > drop function if exists public.insertcustom_actions(integer, character varying, character varying, integer, character varying) cascade; > drop function if exists public.insertdedicatedhoststovm(uuid, text) cascade; > drop function if exists public.insertdisk_image_dynamic(uuid, integer, integer, bigint, numeric, numeric, numeric) cascade; > drop function if exists public.insertdisklunmap(uuid, character varying) cascade; > drop function if exists public.insertdiskprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.insertdiskvmelement(uuid, uuid, boolean, boolean, character varying, boolean) cascade; > drop function if exists public.insertdnsresolverconfiguration(uuid) cascade; > drop function if exists public.insertenginesession(integer, text, uuid, character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.insertevent_notification_hist(bigint, character varying, character, character, timestamp with time zone, boolean) cascade; > drop function if exists public.insertevent_subscriber(character varying, character varying, character varying, uuid, character varying) cascade; > drop function if exists public.insertexternalvariable(character varying, character varying) cascade; > drop function if exists public.insertfenceagent(uuid, uuid, integer, character varying, character varying, character varying, text, text, boolean, integer) cascade; > drop function if exists public.insertglusterclusterservice(uuid, character varying, character varying) cascade; > drop function if exists public.insertglustergeorepsession(uuid, uuid, character varying, character varying, uuid, character varying, uuid, character varying, character varying) cascade; > drop function if exists public.insertglustergeorepsessionconfig(uuid, character varying, character varying) cascade; > drop function if exists public.insertglustergeorepsessiondetail(uuid, uuid, character varying, uuid, character varying, character varying, character varying, bigint, bigint, bigint, bigint, timestamp without time zone, timestamp without time zone, timestamp without time zone, boolean) cascade; > drop function if exists public.insertglusterhook(uuid, uuid, character varying, character varying, character varying, character varying, character varying, character varying, text, integer) cascade; > drop function if exists public.insertglusterserver(uuid, uuid, character varying) cascade; > drop function if exists public.insertglusterserverhook(uuid, uuid, character varying, character varying, character varying) cascade; > drop function if exists public.insertglusterserverservice(uuid, uuid, uuid, integer, character varying, character varying) cascade; > drop function if exists public.insertglustervolume(uuid, uuid, character varying, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.insertglustervolumeaccessprotocol(uuid, character varying) cascade; > drop function if exists public.insertglustervolumebrick(uuid, uuid, uuid, character varying, integer, character varying, uuid, boolean) cascade; > drop function if exists public.insertglustervolumebrickdetails(uuid, bigint, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.insertglustervolumedetails(uuid, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.insertglustervolumeoption(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.insertglustervolumesnapshot(uuid, character varying, uuid, character varying, character varying, timestamp with time zone) cascade; > drop function if exists public.insertglustervolumesnapshotconfig(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.insertglustervolumesnapshotschedule(uuid, character varying, character varying, character varying, character varying, character varying, integer, timestamp with time zone, time without time zone, character varying, timestamp with time zone) cascade; > drop function if exists public.insertglustervolumetransporttype(uuid, character varying) cascade; > drop function if exists public.insertgroup(uuid, character varying, character varying, character varying, text, character varying) cascade; > drop function if exists public.inserthostdevice(uuid, character varying, character varying, character varying, integer, character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying, boolean, character varying, text) cascade; > drop function if exists public.inserthostnetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer) cascade; > drop function if exists public.inserthostnicvfsconfig(uuid, uuid, boolean) cascade; > drop function if exists public.insertimage(timestamp with time zone, uuid, uuid, bigint, uuid, integer, timestamp with time zone, uuid, integer, integer, uuid, boolean, smallint) cascade; > drop function if exists public.insertimage_storage_domain_map(uuid, uuid, uuid, uuid) cascade; > drop function if exists public.insertimageuploads(uuid, integer, integer, integer, boolean, timestamp without time zone, character varying, uuid, uuid, uuid, character varying, character varying, character varying, bigint, bigint, integer) cascade; > drop function if exists public.insertiscsibond(uuid, character varying, character varying, uuid) cascade; > drop function if exists public.insertjob(uuid, character varying, text, character varying, uuid, bigint, boolean, timestamp with time zone, timestamp with time zone, timestamp with time zone, character varying, boolean, boolean) cascade; > drop function if exists public.insertjobsubjectentity(uuid, uuid, character varying) cascade; > drop function if exists public.insertlibvirtsecret(uuid, text, integer, text, uuid, timestamp with time zone) cascade; > drop function if exists public.insertlun_storage_server_connection_map(character varying, character varying) cascade; > drop function if exists public.insertluns(character varying, character varying, character varying, character varying, integer, character varying, character varying, integer, bigint) cascade; > drop function if exists public.insertmacpool(uuid, character varying, boolean, character varying) cascade; > drop function if exists public.insertmacpoolrange(uuid, character varying, character varying) cascade; > drop function if exists public.insertnameserver(uuid, character varying, smallint) cascade; > drop function if exists public.insertnetwork(character varying, character varying, text, uuid, character varying, character varying, character varying, character varying, integer, integer, boolean, uuid, integer, boolean, uuid, text, uuid, uuid, text, uuid) cascade; > drop function if exists public.insertnetwork_cluster(uuid, uuid, integer, boolean, boolean, boolean, boolean, boolean, boolean) cascade; > drop function if exists public.insertnetworkattachment(uuid, uuid, uuid, character varying, character varying, character varying, character varying, character varying, character varying, integer, character varying, text, uuid) cascade; > drop function if exists public.insertnetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.insertnumanode(uuid, uuid, uuid, smallint, bigint, smallint, bigint, integer, numeric, numeric, numeric, integer, text) cascade; > drop function if exists public.insertnumanodecpu(uuid, uuid, integer) cascade; > drop function if exists public.insertnumanodemap(uuid, uuid, smallint) cascade; > drop function if exists public.insertorupdateasynctasks(integer, integer, integer, uuid, uuid, uuid, uuid, uuid, uuid, timestamp with time zone, uuid, integer) cascade; > drop function if exists public.insertorupdatecommandentity(uuid, bigint, uuid, integer, uuid, uuid, text, text, character varying, timestamp with time zone, character varying, boolean, boolean, text, character varying, text) cascade; > drop function if exists public.insertorupdateuser(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, text, character varying) cascade; > drop function if exists public.insertovfdataforentities(uuid, character varying, character varying, integer, character varying, uuid, text, text, integer) cascade; > drop function if exists public.insertpermission(uuid, uuid, uuid, uuid, integer) cascade; > drop function if exists public.insertpolicyunit(uuid, character varying, text, boolean, smallint, text, boolean) cascade; > drop function if exists public.insertprovider(uuid, character varying, character varying, character varying, character varying, boolean, character varying, text, text, character varying, character varying, text, text, text, boolean, boolean, boolean, character varying, character varying, character varying) cascade; > drop function if exists public.insertquota(uuid, uuid, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.insertquotalimitation(uuid, uuid, uuid, uuid, integer, bigint, bigint) cascade; > drop function if exists public.insertrepo_domain_file_meta_data(uuid, character varying, character varying, bigint, timestamp with time zone, bigint, integer) cascade; > drop function if exists public.insertrole(character varying, uuid, character varying, boolean, integer, boolean, integer) cascade; > drop function if exists public.insertsnapshot(uuid, uuid, character varying, character varying, character varying, timestamp with time zone, text, text, uuid, uuid) cascade; > drop function if exists public.insertstep(uuid, uuid, uuid, character varying, text, integer, character varying, smallint, timestamp with time zone, timestamp with time zone, character varying, uuid, character varying, boolean) cascade; > drop function if exists public.insertstepsubjectentity(uuid, uuid, character varying, smallint) cascade; > drop function if exists public.insertstorage_domain_dynamic(integer, uuid, integer) cascade; > drop function if exists public.insertstorage_domain_static(uuid, character varying, character varying, character varying, text, integer, integer, character varying, bigint, boolean, boolean, character varying, character varying, integer, integer, integer, boolean, integer) cascade; > drop function if exists public.insertstorage_pool(character varying, text, uuid, character varying, integer, boolean, integer, uuid, character varying, integer) cascade; > drop function if exists public.insertstorage_pool_iso_map(uuid, uuid, integer) cascade; > drop function if exists public.insertstorage_server_connections(character varying, character varying, character varying, character varying, character varying, text, integer, text, character varying, character varying, character varying, smallint, smallint, uuid) cascade; > drop function if exists public.insertstoragedevice(uuid, text, character varying, character varying, uuid, text, character varying, text, character varying, text, bigint, boolean, boolean) cascade; > drop function if exists public.insertstoragedomaindr(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.insertstoragedomainovfinfo(uuid, integer, uuid, text) cascade; > drop function if exists public.insertstorageqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.insertstorageserverconnectionextension(uuid, uuid, character varying, text, text) cascade; > drop function if exists public.insertsupportedclusterfeature(uuid, uuid, boolean) cascade; > drop function if exists public.insertsupportedhostfeature(uuid, character varying) cascade; > drop function if exists public.inserttags(character varying, uuid, character varying, uuid, boolean, integer) cascade; > drop function if exists public.inserttags_user_group_map(uuid, uuid) cascade; > drop function if exists public.inserttags_user_map(uuid, uuid) cascade; > drop function if exists public.inserttags_vds_map(uuid, uuid) cascade; > drop function if exists public.inserttags_vm_map(uuid, uuid, integer) cascade; > drop function if exists public.inserttags_vm_pool_map(uuid, uuid) cascade; > drop function if exists public.insertunregistereddisk(uuid, uuid, character varying, character varying, uuid, timestamp with time zone, timestamp with time zone, integer, integer, bigint, bigint) cascade; > drop function if exists public.insertunregistereddiskstovms(uuid, uuid, character varying, uuid) cascade; > drop function if exists public.insertuser(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, text, character varying) cascade; > drop function if exists public.insertuserprofile(uuid, uuid, uuid, text) cascade; > drop function if exists public.insertvdcoption(character varying, character varying, character varying, integer) cascade; > drop function if exists public.insertvds_interface(character varying, character varying, integer, character varying, boolean, uuid, boolean, character varying, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, uuid, character varying, integer, integer, boolean, text, integer, character varying, integer, character varying, character varying, integer, character varying) cascade; > drop function if exists public.insertvds_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.insertvds_spm_id_map(uuid, uuid, integer) cascade; > drop function if exists public.insertvdsdynamic(integer, integer, character varying, numeric, character varying, boolean, integer, integer, integer, uuid, integer, integer, integer, integer, integer, integer, integer, integer, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, integer, boolean, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, integer, text, character varying, character varying, character varying, character varying, character varying, character varying, text, text, boolean, smallint, integer, smallint, boolean, character varying, text, boolean, boolean, text, boolean, boolean, jsonb, boolean, jsonb) cascade; > drop function if exists public.insertvdsstatic(text, uuid, character varying, character varying, integer, uuid, character varying, boolean, integer, boolean, character varying, boolean, integer, character varying, character varying, integer, character varying, boolean, uuid, uuid, text, text, integer) cascade; > drop function if exists public.insertvdsstatistics(numeric, numeric, numeric, numeric, integer, integer, integer, uuid, bigint, bigint, bigint, bigint, bigint, integer, bigint, boolean, integer, bigint, integer, boolean, boolean, boolean, boolean, timestamp with time zone, text) cascade; > drop function if exists public.insertvfsconfiglabel(uuid, text) cascade; > drop function if exists public.insertvfsconfignetwork(uuid, uuid) cascade; > drop function if exists public.insertvm_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.insertvm_pool_map(uuid, uuid) cascade; > drop function if exists public.insertvm_pools(character varying, text, uuid, character varying, integer, boolean, character varying, integer, uuid, smallint, character varying, boolean) cascade; > drop function if exists public.insertvmbackup(uuid, uuid, uuid, uuid, text, timestamp with time zone) cascade; > drop function if exists public.insertvmbackupdiskmap(uuid, uuid) cascade; > drop function if exists public.insertvmcheckpoint(uuid, uuid, uuid, timestamp with time zone) cascade; > drop function if exists public.insertvmcheckpointdiskmap(uuid, uuid) cascade; > drop function if exists public.insertvmdevice(uuid, uuid, character varying, character varying, character varying, text, boolean, boolean, boolean, character varying, text, uuid, character varying, character varying) cascade; > drop function if exists public.insertvmdynamic(text, character varying, character varying, character varying, uuid, character varying, uuid, uuid, integer, uuid, character varying, character varying, character varying, timestamp with time zone, timestamp with time zone, bigint, timestamp with time zone, boolean, integer, integer, integer, character varying, integer, integer, integer, character varying, integer, numeric, character varying, boolean, boolean, character varying, character varying, character varying, integer, integer, integer, integer, character varying, integer, character varying, integer, integer, integer, character varying, integer, character varying, character varying, character varying, character varying, character varying, text) cascade; > drop function if exists public.insertvmguestagentinterface(uuid, character varying, character varying, text, text) cascade; > drop function if exists public.insertvmicon(uuid, text) cascade; > drop function if exists public.insertvmicondefault(uuid, integer, uuid, uuid) cascade; > drop function if exists public.insertvminit(uuid, text, text, text, boolean, character varying, text, text, text, text, character varying, text, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.insertvminterface(uuid, character varying, character varying, integer, uuid, uuid, uuid, integer, boolean) cascade; > drop function if exists public.insertvminterfacefilterparameter(uuid, character varying, character varying, uuid) cascade; > drop function if exists public.insertvmjobs(uuid, uuid, integer, integer, integer, integer, bigint, bigint, uuid) cascade; > drop function if exists public.insertvmstatic(character varying, text, integer, integer, integer, integer, uuid, uuid, character varying, uuid, timestamp with time zone, integer, boolean, boolean, boolean, integer, integer, integer, integer, character varying, boolean, boolean, boolean, boolean, character varying, text, integer, integer, integer, integer, integer, integer, character varying, integer, character varying, character varying, character varying, integer, character varying, character varying, integer, uuid, character varying, boolean, boolean, character varying, boolean, uuid, uuid, uuid, uuid, character varying, integer, integer, smallint, character varying, boolean, character varying, boolean, boolean, uuid, boolean, boolean, character varying, integer, character varying, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.insertvmstatistics(numeric, numeric, numeric, integer, integer, integer, text, uuid, bigint, bigint) cascade; > drop function if exists public.insertvmtemplate(integer, timestamp with time zone, character varying, text, integer, integer, integer, character varying, integer, integer, integer, integer, uuid, uuid, integer, boolean, boolean, integer, integer, character varying, integer, integer, integer, integer, integer, integer, boolean, boolean, boolean, boolean, character varying, boolean, character varying, integer, character varying, character varying, character varying, uuid, integer, text, boolean, character varying, integer, boolean, uuid, character varying, integer, uuid, character varying, smallint, character varying, boolean, boolean, boolean, uuid, character varying, boolean, boolean, character varying, character varying, character varying, integer, character varying, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.insertvnicprofile(uuid, character varying, uuid, uuid, boolean, boolean, boolean, text, text, uuid) cascade; > drop function if exists public.inst_add_glance_provider(uuid, character varying, character varying, character varying, uuid, boolean, character varying, text, text, character varying) cascade; > drop function if exists public.inst_add_iso_storage_domain(uuid, character varying, uuid, character varying, integer, integer) cascade; > drop function if exists public.inst_update_default_storage_pool_type(boolean) cascade; > drop function if exists public.inst_update_service_type(uuid, boolean, boolean) cascade; > drop function if exists public.isanyvmrunonvds(uuid) cascade; > drop function if exists public.ismemballoonenabled(uuid) cascade; > drop function if exists public.isquotainuse(uuid) cascade; > drop function if exists public.isvmiconexist(uuid) cascade; > drop function if exists public.loadovfdataforids(character varying) cascade; > drop function if exists public.loadstoragedomaininfobydiskid(uuid) cascade; > drop function if exists public.loadstoragedomaininfobydomainid(uuid) cascade; > drop function if exists public.loadstoragedomainsforovfids(text) cascade; > drop function if exists public.logenginebackupevent(character varying, timestamp with time zone, integer, text, character varying, text) cascade; > drop function if exists public.markhostdevicesusedbyvmid(uuid, uuid) cascade; > drop function if exists public.nullifyqosforstoragedomain(uuid) cascade; > drop function if exists public.remove_entities_from_storage_domain(uuid) cascade; > drop function if exists public.removeallunmanageddevicesbyvmid(uuid) cascade; > drop function if exists public.removeallvmtagsbyvmid(uuid) cascade; > drop function if exists public.removeauditlogbybrickidlogtype(uuid, integer) cascade; > drop function if exists public.removeconnectionfromiscsibond(uuid, character varying) cascade; > drop function if exists public.removediskfromunregistered(uuid, uuid) cascade; > drop function if exists public.removediskfromunregisteredrelatedtovm(uuid, uuid) cascade; > drop function if exists public.removeentityfromunregistered(uuid, uuid) cascade; > drop function if exists public.removefinishedkdumpstatusforvds(uuid) cascade; > drop function if exists public.removememoryfromsnapshotbysnapshotid(uuid) cascade; > drop function if exists public.removememoryfromsnapshotbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.removenetworkattachmentbynetworkid(uuid) cascade; > drop function if exists public.removenetworkfromiscsibond(uuid, uuid) cascade; > drop function if exists public.removesupportedhostfeature(uuid, character varying) cascade; > drop function if exists public.removevdsfromaffinitygroups(uuid) cascade; > drop function if exists public.removevmfromaffinitygroups(uuid) cascade; > drop function if exists public.set_network_exclusively_as_default_role_network(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_display(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_gluster(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_management(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_migration(uuid, uuid) cascade; > drop function if exists public.setallauditlogalerts(integer, boolean) cascade; > drop function if exists public.sethashbyvmguid(uuid, character varying) cascade; > drop function if exists public.settounknown(uuid[], integer) cascade; > drop function if exists public.setvmidonhostdevice(uuid, character varying, uuid) cascade; > drop function if exists public.setvmpoolbeingdestroyed(uuid, boolean) cascade; > drop function if exists public.sso_oauth_client_exists(character varying) cascade; > drop function if exists public.sso_oauth_register_client(character varying, character varying, character varying, character varying, character varying, text, character varying, boolean, character varying, character varying, boolean, boolean) cascade; > drop function if exists public.sso_oauth_unregister_client(character varying) cascade; > drop function if exists public.update_oauth_client(character varying, character varying, character varying, character varying, text, character varying, boolean, character varying) cascade; > drop function if exists public.update_oauth_client_callback_prefix(character varying, character varying) cascade; > drop function if exists public.updateaffinitygroupwithmembers(uuid, character varying, character varying, uuid, boolean, boolean, boolean, boolean, boolean, boolean, uuid[], uuid[]) cascade; > drop function if exists public.updateasync_tasks(integer, integer, integer, uuid, uuid, uuid, uuid, uuid, uuid, uuid) cascade; > drop function if exists public.updatebasedisk(uuid, boolean, character varying, character varying, character varying, boolean, integer, smallint, character varying, smallint, character varying) cascade; > drop function if exists public.updatebookmark(uuid, character varying, character varying) cascade; > drop function if exists public.updatecinderstorage(uuid, jsonb, text) cascade; > drop function if exists public.updatecluster(character varying, text, character varying, uuid, character varying, uuid, integer, boolean, character varying, boolean, integer, boolean, boolean, boolean, boolean, character varying, boolean, boolean, boolean, uuid, text, boolean, integer, smallint, character varying, boolean, smallint, character varying, character varying, boolean, boolean, smallint, boolean, boolean, boolean, character varying, boolean, character varying, integer, uuid, uuid, character varying, boolean, boolean, integer, uuid, integer, smallint, boolean) cascade; > drop function if exists public.updateclusteremulatedmachine(uuid, character varying, boolean) cascade; > drop function if exists public.updateclusterfeature(uuid, character varying, character varying, integer, text) cascade; > drop function if exists public.updateclusterpolicy(uuid, character varying, character varying, boolean, boolean, text) cascade; > drop function if exists public.updatecommandentity(uuid, bigint, uuid, integer, uuid, uuid, text, text, character varying, character varying, boolean, boolean, text, character varying, text) cascade; > drop function if exists public.updatecommandentityexecuted(uuid, boolean) cascade; > drop function if exists public.updatecommandentitynotified(uuid, boolean) cascade; > drop function if exists public.updatecommandentitystatus(uuid, character varying) cascade; > drop function if exists public.updateconfigbyclusteridandname(uuid, character varying, character varying) cascade; > drop function if exists public.updateconfigbyvolumeididandname(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updateconsoleuserwithoptimisticlocking(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updatecpuflags(uuid, character varying) cascade; > drop function if exists public.updatecpuprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.updatecpuqos(uuid, smallint, character varying, text, uuid, integer) cascade; > drop function if exists public.updatecustom_actions(integer, character varying, character varying, integer, character varying) cascade; > drop function if exists public.updatededicatedhoststovm(uuid, text) cascade; > drop function if exists public.updatedisk_image_dynamic(uuid, integer, integer, bigint, numeric, numeric, numeric) cascade; > drop function if exists public.updatedisk_image_dynamic_by_disk_id_and_vm_id(uuid, uuid, integer, integer, bigint, numeric, numeric, numeric) cascade; > drop function if exists public.updatediskprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.updatediskprofilebyimagegroupid(uuid, uuid, uuid) cascade; > drop function if exists public.updatediskvmelement(uuid, uuid, boolean, boolean, character varying, boolean) cascade; > drop function if exists public.updatednsresolverconfiguration(uuid) cascade; > drop function if exists public.updatedwhhistorytimekeeping(character varying, character varying, timestamp with time zone) cascade; > drop function if exists public.updateexternalvariable(character varying, character varying) cascade; > drop function if exists public.updatefenceagent(uuid, uuid, integer, character varying, character varying, character varying, text, text, boolean, integer) cascade; > drop function if exists public.updateglusterbricktaskbyserveridbrickdir(uuid, character varying, uuid) cascade; > drop function if exists public.updateglusterclusterservice(uuid, character varying, character varying) cascade; > drop function if exists public.updateglustergeorepsession(uuid, character varying, uuid, uuid) cascade; > drop function if exists public.updateglustergeorepsessionconfig(uuid, character varying, character varying) cascade; > drop function if exists public.updateglustergeorepsessiondetail(uuid, uuid, character varying, uuid, character varying, character varying, character varying, bigint, bigint, bigint, bigint, timestamp without time zone, timestamp without time zone, timestamp without time zone, boolean) cascade; > drop function if exists public.updateglusterhook(uuid, character varying, character varying, character varying, text, integer) cascade; > drop function if exists public.updateglusterhookconflictstatus(uuid, integer) cascade; > drop function if exists public.updateglusterhookcontent(uuid, character varying, text) cascade; > drop function if exists public.updateglusterhookcontenttype(uuid, character varying) cascade; > drop function if exists public.updateglusterhookstatus(uuid, character varying) cascade; > drop function if exists public.updateglusterserver(uuid, uuid) cascade; > drop function if exists public.updateglusterserverhook(uuid, uuid, character varying, character varying, character varying) cascade; > drop function if exists public.updateglusterserverhookchecksum(uuid, uuid, character varying) cascade; > drop function if exists public.updateglusterserverhookstatus(uuid, uuid, character varying) cascade; > drop function if exists public.updateglusterserverknownaddresses(uuid, character varying) cascade; > drop function if exists public.updateglusterserverpeerstatus(uuid, character varying) cascade; > drop function if exists public.updateglusterserverservice(uuid, integer, character varying, character varying) cascade; > drop function if exists public.updateglusterserverservicebyserveridandservicetype(uuid, uuid, integer, character varying, character varying) cascade; > drop function if exists public.updateglustervolume(uuid, uuid, character varying, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.updateglustervolumeasynctask(uuid, uuid) cascade; > drop function if exists public.updateglustervolumebrick(uuid, uuid, uuid, character varying, character varying, uuid, boolean) cascade; > drop function if exists public.updateglustervolumebrickasynctask(uuid, uuid) cascade; > drop function if exists public.updateglustervolumebrickdetails(uuid, bigint, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.updateglustervolumebricknetworkid(uuid, uuid) cascade; > drop function if exists public.updateglustervolumebrickorder(uuid, integer) cascade; > drop function if exists public.updateglustervolumebrickstatus(uuid, character varying) cascade; > drop function if exists public.updateglustervolumebrickunsyncedentries(uuid, integer, text) cascade; > drop function if exists public.updateglustervolumedetails(uuid, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.updateglustervolumeoption(uuid, character varying) cascade; > drop function if exists public.updateglustervolumesnapshotschedulebyvolumeid(uuid, character varying, character varying, character varying, character varying, character varying, integer, timestamp with time zone, time without time zone, character varying, timestamp with time zone) cascade; > drop function if exists public.updateglustervolumesnapshotstatus(uuid, character varying) cascade; > drop function if exists public.updateglustervolumesnapshotstatusbyname(uuid, character varying, character varying) cascade; > drop function if exists public.updateglustervolumestatus(uuid, character varying) cascade; > drop function if exists public.updateglustervolumestatusbyname(uuid, character varying, character varying) cascade; > drop function if exists public.updategroup(uuid, character varying, character varying, character varying, text, character varying) cascade; > drop function if exists public.updatehostdevice(uuid, character varying, character varying, character varying, integer, character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying, boolean, character varying, text) cascade; > drop function if exists public.updatehostexternalstatus(uuid, integer) cascade; > drop function if exists public.updatehostnetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer) cascade; > drop function if exists public.updatehostnicvfsconfig(uuid, uuid, boolean) cascade; > drop function if exists public.updatehostproviderbinding(uuid, character varying[], character varying[]) cascade; > drop function if exists public.updateimage(timestamp with time zone, uuid, uuid, bigint, uuid, integer, timestamp with time zone, uuid, integer, integer, uuid, boolean, smallint, integer) cascade; > drop function if exists public.updateimagesize(uuid, bigint, timestamp with time zone) cascade; > drop function if exists public.updateimagestatus(uuid, integer) cascade; > drop function if exists public.updateimageuploads(uuid, integer, integer, integer, boolean, timestamp without time zone, character varying, uuid, uuid, uuid, character varying, character varying, character varying, bigint, bigint, integer) cascade; > drop function if exists public.updateimagevmsnapshotid(uuid, uuid) cascade; > drop function if exists public.updateiscsibond(uuid, character varying, character varying) cascade; > drop function if exists public.updateisfreeflagbyid(uuid, boolean) cascade; > drop function if exists public.updateisinitialized(uuid, boolean) cascade; > drop function if exists public.updatejob(uuid, character varying, text, character varying, uuid, bigint, boolean, timestamp with time zone, timestamp with time zone, timestamp with time zone, character varying, boolean, boolean) cascade; > drop function if exists public.updatejoblastupdatetime(uuid, timestamp with time zone) cascade; > drop function if exists public.updatejobstepscompleted(uuid, character varying, timestamp with time zone) cascade; > drop function if exists public.updatelabel(uuid, character varying, boolean, uuid[], uuid[]) cascade; > drop function if exists public.updatelabelsforhost(uuid, uuid[]) cascade; > drop function if exists public.updatelabelsforvm(uuid, uuid[]) cascade; > drop function if exists public.updatelastadmincheckstatus(character varying) cascade; > drop function if exists public.updatelibvirtsecret(uuid, text, integer, text, uuid) cascade; > drop function if exists public.updatelun_storage_server_connection_map(character varying, character varying) cascade; > drop function if exists public.updateluns(character varying, character varying, character varying, character varying, integer, character varying, character varying, integer, bigint) cascade; > drop function if exists public.updatemacpool(uuid, character varying, boolean, character varying) cascade; > drop function if exists public.updatememory(uuid, uuid, uuid, character varying) cascade; > drop function if exists public.updatenetwork(character varying, character varying, text, uuid, character varying, character varying, character varying, character varying, integer, integer, boolean, uuid, integer, boolean, uuid, text, uuid, uuid, text, uuid) cascade; > drop function if exists public.updatenetwork_cluster(uuid, uuid, integer, boolean, boolean, boolean, boolean, boolean, boolean) cascade; > drop function if exists public.updatenetwork_cluster_status(uuid, uuid, integer) cascade; > drop function if exists public.updatenetworkattachment(uuid, uuid, uuid, character varying, character varying, character varying, character varying, character varying, character varying, integer, character varying, text, uuid) cascade; > drop function if exists public.updatenetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.updatenumanode(uuid, smallint, bigint, smallint, text) cascade; > drop function if exists public.updatenumanodestatistics(uuid, bigint, integer, numeric, numeric, numeric, integer) cascade; > drop function if exists public.updateoriginaltemplatename(uuid, character varying) cascade; > drop function if exists public.updateovfgenerations(character varying, character varying, text, character varying) cascade; > drop function if exists public.updateovfupdatedinfo(character varying, integer, integer) cascade; > drop function if exists public.updateovirtguestagentstatus(uuid, integer) cascade; > drop function if exists public.updatepolicyunit(uuid, boolean, text, text) cascade; > drop function if exists public.updateprovider(uuid, character varying, character varying, character varying, character varying, boolean, character varying, text, text, character varying, character varying, text, text, text, boolean, boolean, boolean, character varying, character varying, character varying) cascade; > drop function if exists public.updateqemuguestagentstatus(uuid, integer) cascade; > drop function if exists public.updatequotaforimageandsnapshots(uuid, uuid, uuid) cascade; > drop function if exists public.updatequotametadata(uuid, uuid, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.updatereplicacount(uuid, integer) cascade; > drop function if exists public.updaterole(character varying, uuid, character varying, boolean, integer, boolean) cascade; > drop function if exists public.updatesnapshot(uuid, uuid, character varying, character varying, character varying, timestamp with time zone, text, text, uuid, uuid, boolean) cascade; > drop function if exists public.updatesnapshotcountdec(uuid, integer) cascade; > drop function if exists public.updatesnapshotcountinc(uuid, integer) cascade; > drop function if exists public.updatesnapshotid(uuid, uuid) cascade; > drop function if exists public.updatesnapshotstatus(uuid, character varying) cascade; > drop function if exists public.updatestartedexecutionentitiestounknown(timestamp with time zone) cascade; > drop function if exists public.updatestatusofimagesbyimagegroupid(uuid, integer) cascade; > drop function if exists public.updatestep(uuid, uuid, uuid, character varying, text, integer, character varying, smallint, timestamp with time zone, timestamp with time zone, character varying, uuid, character varying) cascade; > drop function if exists public.updatestepexternalidandtype(uuid, uuid, character varying) cascade; > drop function if exists public.updatestepprogress(uuid, smallint) cascade; > drop function if exists public.updatestepstatusandendtime(uuid, character varying, timestamp with time zone) cascade; > drop function if exists public.updatestorage_domain_dynamic(integer, uuid, integer) cascade; > drop function if exists public.updatestorage_domain_static(uuid, character varying, character varying, character varying, text, integer, integer, integer, bigint, boolean, boolean, character varying, character varying, integer, integer, integer, boolean, integer) cascade; > drop function if exists public.updatestorage_pool(character varying, text, uuid, character varying, integer, boolean, character varying, integer, uuid, character varying, integer) cascade; > drop function if exists public.updatestorage_pool_iso_map_status(uuid, uuid, integer) cascade; > drop function if exists public.updatestorage_pool_partial(character varying, text, uuid, character varying, boolean, character varying, character varying, integer) cascade; > drop function if exists public.updatestorage_pool_status(uuid, integer) cascade; > drop function if exists public.updatestorage_server_connections(character varying, character varying, character varying, text, integer, character varying, character varying, text, character varying, character varying, character varying, smallint, smallint, uuid) cascade; > drop function if exists public.updatestoragedevice(uuid, text, character varying, character varying, text, character varying, text, character varying, text, bigint, boolean) cascade; > drop function if exists public.updatestoragedomainconfirmedsize(integer, integer, uuid) cascade; > drop function if exists public.updatestoragedomaindr(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updatestoragedomainexternalstatus(uuid, integer) cascade; > drop function if exists public.updatestoragedomainovfinfo(uuid, integer, uuid, text, timestamp with time zone) cascade; > drop function if exists public.updatestorageqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.updatestorageserverconnectionextension(uuid, uuid, character varying, text, text) cascade; > drop function if exists public.updatesupportedclusterfeature(uuid, uuid, boolean) cascade; > drop function if exists public.updatetags(character varying, uuid, character varying, uuid, boolean, integer) cascade; > drop function if exists public.updatetags_vm_pool_map(integer, integer) cascade; > drop function if exists public.updateuser(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, boolean, text, character varying) cascade; > drop function if exists public.updateuserimpl(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, text, character varying) cascade; > drop function if exists public.updateuserprofile(uuid, uuid, uuid, text) cascade; > drop function if exists public.updatevdcoption(character varying, character varying, integer, character varying) cascade; > drop function if exists public.updatevds_interface(character varying, character varying, integer, character varying, boolean, uuid, boolean, character varying, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, uuid, character varying, integer, integer, boolean, text, character varying, character varying, integer, integer, character varying, integer, character varying) cascade; > drop function if exists public.updatevds_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.updatevdsdynamic(integer, integer, character varying, numeric, character varying, boolean, integer, integer, integer, uuid, integer, integer, integer, integer, integer, integer, integer, integer, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, integer, boolean, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, integer, text, integer, character varying, character varying, character varying, character varying, character varying, character varying, text, text, smallint, integer, smallint, boolean, character varying, text, text, boolean, boolean, text, character varying, boolean, boolean, jsonb, boolean, jsonb) cascade; > drop function if exists public.updatevdsdynamicisupdateavailable(uuid, boolean) cascade; > drop function if exists public.updatevdsdynamicnetconfigdirty(uuid, boolean) cascade; > drop function if exists public.updatevdsdynamicpowermanagementpolicyflag(uuid, boolean) cascade; > drop function if exists public.updatevdsdynamicstatus(uuid, integer) cascade; > drop function if exists public.updatevdsdynamicstatusandreasons(uuid, integer, integer, text) cascade; > drop function if exists public.updatevdsreinstallrequired(uuid, boolean) cascade; > drop function if exists public.updatevdsstatic(character varying, text, character varying, integer, uuid, uuid, character varying, boolean, integer, boolean, character varying, boolean, bigint, integer, character varying, character varying, integer, character varying, boolean, uuid, uuid, text, boolean, integer) cascade; > drop function if exists public.updatevdsstaticlaststoredkernelcmdline(uuid, text) cascade; > drop function if exists public.updatevdsstatistics(numeric, numeric, numeric, numeric, integer, integer, integer, uuid, bigint, bigint, bigint, bigint, bigint, integer, bigint, boolean, integer, bigint, integer, boolean, boolean, boolean, boolean, timestamp with time zone, text) cascade; > drop function if exists public.updatevm_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.updatevm_pool_map(uuid, uuid) cascade; > drop function if exists public.updatevm_pools(character varying, text, uuid, character varying, integer, boolean, character varying, integer, uuid, smallint, character varying, boolean) cascade; > drop function if exists public.updatevmbackup(uuid, uuid, uuid, uuid, text) cascade; > drop function if exists public.updatevmbackupdiskmap(uuid, uuid, text) cascade; > drop function if exists public.updatevmcpuprofileidforclusterid(uuid, uuid) cascade; > drop function if exists public.updatevmdevice(uuid, uuid, character varying, character varying, character varying, text, boolean, boolean, boolean, character varying, text, uuid, character varying, character varying) cascade; > drop function if exists public.updatevmdeviceforhotplugdisk(uuid, uuid, boolean, character varying) cascade; > drop function if exists public.updatevmdeviceruntimeinfo(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updatevmdynamic(text, character varying, character varying, character varying, uuid, character varying, uuid, uuid, integer, uuid, character varying, character varying, character varying, timestamp with time zone, timestamp with time zone, bigint, timestamp with time zone, boolean, integer, integer, integer, character varying, integer, integer, integer, character varying, integer, numeric, character varying, boolean, boolean, character varying, character varying, character varying, character varying, integer, integer, integer, integer, character varying, integer, character varying, integer, integer, integer, character varying, integer, character varying, character varying, character varying, character varying, character varying, text) cascade; > drop function if exists public.updatevmdynamicstatus(uuid, integer) cascade; > drop function if exists public.updatevmicon(uuid, text) cascade; > drop function if exists public.updatevmicondefault(uuid, integer, uuid, uuid) cascade; > drop function if exists public.updatevminit(uuid, text, text, text, boolean, character varying, text, text, text, text, character varying, text, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.updatevminterface(uuid, character varying, character varying, integer, uuid, uuid, uuid, integer, boolean) cascade; > drop function if exists public.updatevminterfacefilterparameter(uuid, character varying, character varying) cascade; > drop function if exists public.updatevmjobs(uuid, uuid, integer, integer, integer, integer, bigint, bigint, uuid) cascade; > drop function if exists public.updatevmleaseinfo(uuid, character varying) cascade; > drop function if exists public.updatevmleasestoragedomainid(uuid, uuid) cascade; > drop function if exists public.updatevmstatic(character varying, text, integer, integer, integer, integer, uuid, uuid, character varying, uuid, timestamp with time zone, integer, boolean, boolean, boolean, integer, integer, integer, integer, character varying, boolean, boolean, boolean, boolean, character varying, text, integer, integer, integer, integer, integer, integer, character varying, integer, character varying, character varying, character varying, integer, character varying, character varying, integer, uuid, character varying, boolean, boolean, character varying, boolean, uuid, uuid, uuid, uuid, character varying, integer, integer, smallint, character varying, boolean, character varying, boolean, boolean, uuid, boolean, boolean, character varying, integer, character varying, uuid, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.updatevmstatistics(numeric, numeric, numeric, integer, integer, integer, text, uuid, bigint, bigint) cascade; > drop function if exists public.updatevmtagsdefaultdisplaytype(uuid, uuid, integer) cascade; > drop function if exists public.updatevmtemplate(integer, timestamp with time zone, character varying, text, integer, integer, integer, character varying, integer, integer, integer, integer, uuid, uuid, integer, boolean, boolean, integer, integer, character varying, integer, integer, integer, integer, integer, integer, boolean, boolean, boolean, boolean, character varying, boolean, character varying, integer, character varying, character varying, character varying, uuid, integer, text, boolean, character varying, integer, boolean, uuid, character varying, integer, character varying, smallint, character varying, boolean, boolean, boolean, uuid, character varying, boolean, boolean, character varying, character varying, character varying, integer, character varying, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.updatevmtemplateshiftbasetemplate(uuid) cascade; > drop function if exists public.updatevmtemplatestatus(uuid, integer) cascade; > drop function if exists public.updatevnicprofile(uuid, character varying, uuid, uuid, boolean, boolean, boolean, text, text, uuid) cascade; > drop function if exists public.upsertexternalvariable(character varying, character varying) cascade; > drop function if exists public.upsertkdumpstatus(uuid, character varying, character varying) cascade; > drop function if exists public.upsertkdumpstatusforip(character varying, character varying, character varying) cascade; >********* QUERY ********** > drop function if exists public.addconnectiontoiscsibond(uuid, character varying) cascade; > drop function if exists public.addglusterserverknownaddress(uuid, character varying) cascade; > drop function if exists public.addhosttolabels(uuid, uuid[]) cascade; > drop function if exists public.addnetworktoiscsibond(uuid, uuid) cascade; > drop function if exists public.addvmtolabels(uuid, uuid[]) cascade; > drop function if exists public.attach_group_to_role(character varying, character varying) cascade; > drop function if exists public.attach_user_to_role(character varying, character varying, character varying, text, character varying) cascade; > drop function if exists public.boundvmpoolprestartedvms(uuid) cascade; > drop function if exists public.calculateallclusterusage() cascade; > drop function if exists public.calculateallstorageusage() cascade; > drop function if exists public.calculateclusterusage(uuid, uuid) cascade; > drop function if exists public.calculatestorageusage(uuid, uuid) cascade; > drop function if exists public.checkdbconnection() cascade; > drop function if exists public.checkifexistshostthatmissesnetworkincluster(uuid, character varying, integer) cascade; > drop function if exists public.checkifexistshostwithstatusincluster(uuid, integer) cascade; > drop function if exists public.checkifjobhastasks(uuid) cascade; > drop function if exists public.checkifsnapshotexistsbyvmidandsnapshotid(uuid, uuid) cascade; > drop function if exists public.checkifsnapshotexistsbyvmidandstatus(uuid, character varying) cascade; > drop function if exists public.checkifsnapshotexistsbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.checkvmhostdeviceavailability(uuid, uuid) cascade; > drop function if exists public.cleandownvms() cascade; > drop function if exists public.clear_network_from_nics(uuid) cascade; > drop function if exists public.clear_osinfo() cascade; > drop function if exists public.clearallauditlogevents(integer) cascade; > drop function if exists public.clearalldeviceaddressesbyvmid(uuid) cascade; > drop function if exists public.clearmigratingtovds(uuid) cascade; > drop function if exists public.clearvmdeviceaddress(uuid) cascade; > drop function if exists public.createlabel(uuid, character varying, boolean, uuid[], uuid[]) cascade; > drop function if exists public.delete_entity_snapshot_by_command_id(uuid) cascade; > drop function if exists public.delete_roles_groups(integer, uuid) cascade; > drop function if exists public.deleteaffinitygroup(uuid) cascade; > drop function if exists public.deleteallcommandentities() cascade; > drop function if exists public.deleteallcommandentitiesbycommandid(uuid) cascade; > drop function if exists public.deleteallfromenginesessions() cascade; > drop function if exists public.deleteallfromvmicondefaults() cascade; > drop function if exists public.deleteallglusterhooks(uuid) cascade; > drop function if exists public.deleteallunusedvmicons() cascade; > drop function if exists public.deleteallvfsconfiglabels(uuid) cascade; > drop function if exists public.deleteallvfsconfignetworks(uuid) cascade; > drop function if exists public.deleteallvmbackupdiskmapbyvmbackupid(uuid) cascade; > drop function if exists public.deleteallvmcheckpointdiskmapbyvmcheckpointid(uuid) cascade; > drop function if exists public.deleteasync_tasks(uuid) cascade; > drop function if exists public.deleteasynctasksbyvdsmtaskid(uuid) cascade; > drop function if exists public.deleteauditalertlogbyvdsidandtype(uuid, integer) cascade; > drop function if exists public.deleteauditalertlogbyvolumeidandtype(uuid, integer) cascade; > drop function if exists public.deleteauditlog(bigint) cascade; > drop function if exists public.deleteauditlogalertsbyvdsid(uuid, boolean) cascade; > drop function if exists public.deleteauditlogolderthendate(timestamp with time zone) cascade; > drop function if exists public.deletebackuprelatedalerts() cascade; > drop function if exists public.deletebasedisk(uuid) cascade; > drop function if exists public.deletebookmark(uuid) cascade; > drop function if exists public.deletebypoolvds_spm_id_map(uuid, uuid) cascade; > drop function if exists public.deletecinderstorage(uuid) cascade; > drop function if exists public.deletecluster(uuid) cascade; > drop function if exists public.deleteclusterpolicy(uuid) cascade; > drop function if exists public.deleteclusterpolicyunitsbyclusterpolicyid(uuid) cascade; > drop function if exists public.deletecommandentitiesbycommandid(uuid) cascade; > drop function if exists public.deletecommandentitiesolderthandate(timestamp with time zone) cascade; > drop function if exists public.deletecommandentity(uuid) cascade; > drop function if exists public.deletecompletedjobsolderthandate(timestamp with time zone, timestamp with time zone) cascade; > drop function if exists public.deletecpuprofile(uuid) cascade; > drop function if exists public.deletecustom_actions(integer) cascade; > drop function if exists public.deletedisk_image_dynamic(uuid) cascade; > drop function if exists public.deletedisklunmap(uuid, character varying) cascade; > drop function if exists public.deletediskprofile(uuid) cascade; > drop function if exists public.deletediskvmelement(uuid, uuid) cascade; > drop function if exists public.deletednsresolverconfiguration(uuid) cascade; > drop function if exists public.deletednsresolverconfigurationbynetworkattachmentid(uuid) cascade; > drop function if exists public.deletednsresolverconfigurationbynetworkid(uuid) cascade; > drop function if exists public.deletednsresolverconfigurationbyvdsdynamicid(uuid) cascade; > drop function if exists public.deleteenginesession(integer) cascade; > drop function if exists public.deleteentitysnapshotbycommandid(uuid) cascade; > drop function if exists public.deleteevent_notification_hist(timestamp without time zone) cascade; > drop function if exists public.deleteevent_subscriber(character varying, character varying, uuid, character varying) cascade; > drop function if exists public.deleteexternalvariable(character varying) cascade; > drop function if exists public.deletefenceagent(uuid) cascade; > drop function if exists public.deletefenceagentsbyvdsid(uuid) cascade; > drop function if exists public.deleteglustergeorepsession(uuid) cascade; > drop function if exists public.deleteglusterhook(uuid, character varying, character varying, character varying) cascade; > drop function if exists public.deleteglusterhookbyid(uuid) cascade; > drop function if exists public.deleteglusterhooksbyids(text) cascade; > drop function if exists public.deleteglusterserver(uuid) cascade; > drop function if exists public.deleteglusterserverbyglusterserveruuid(uuid) cascade; > drop function if exists public.deleteglusterserverhook(uuid, uuid) cascade; > drop function if exists public.deleteglusterserverhookbyid(uuid) cascade; > drop function if exists public.deleteglusterserverhooksbyids(text) cascade; > drop function if exists public.deleteglusterserverservice(uuid) cascade; > drop function if exists public.deleteglustervolumeaccessprotocol(uuid, character varying) cascade; > drop function if exists public.deleteglustervolumebrick(uuid) cascade; > drop function if exists public.deleteglustervolumebricks(character varying) cascade; > drop function if exists public.deleteglustervolumebyguid(uuid) cascade; > drop function if exists public.deleteglustervolumebyname(uuid, character varying) cascade; > drop function if exists public.deleteglustervolumeoption(uuid) cascade; > drop function if exists public.deleteglustervolumeoptions(character varying) cascade; > drop function if exists public.deleteglustervolumesbyclusterid(uuid) cascade; > drop function if exists public.deleteglustervolumesbyguids(character varying) cascade; > drop function if exists public.deleteglustervolumesnapshotbyguid(uuid) cascade; > drop function if exists public.deleteglustervolumesnapshotbyname(uuid, character varying) cascade; > drop function if exists public.deleteglustervolumesnapshotsbyvolumeid(uuid) cascade; > drop function if exists public.deleteglustervolumesnapshotschedulebyvolumeid(uuid) cascade; > drop function if exists public.deleteglustervolumessnapshotbyids(character varying) cascade; > drop function if exists public.deleteglustervolumetransporttype(uuid, character varying) cascade; > drop function if exists public.deletegroup(uuid) cascade; > drop function if exists public.deletehostdevice(uuid, character varying) cascade; > drop function if exists public.deletehostnicvfsconfig(uuid) cascade; > drop function if exists public.deleteimage(uuid) cascade; > drop function if exists public.deleteimage_storage_domain_map(uuid, uuid) cascade; > drop function if exists public.deleteimage_storage_domain_map_by_image_id(uuid) cascade; > drop function if exists public.deleteimageuploads(uuid) cascade; > drop function if exists public.deleteiscsibond(uuid) cascade; > drop function if exists public.deletejob(uuid) cascade; > drop function if exists public.deletejobolderthandatewithstatus(timestamp with time zone, text) cascade; > drop function if exists public.deletelabel(uuid) cascade; > drop function if exists public.deletelibvirtsecret(uuid) cascade; > drop function if exists public.deletelun(character varying) cascade; > drop function if exists public.deletelun_storage_server_connection_map(character varying, character varying) cascade; > drop function if exists public.deletemacpool(uuid) cascade; > drop function if exists public.deletemacpoolrangesbymacpoolid(uuid) cascade; > drop function if exists public.deletenameserversbydnsresolverconfigurationid(uuid) cascade; > drop function if exists public.deletenetwork(uuid) cascade; > drop function if exists public.deletenetwork_cluster(uuid, uuid) cascade; > drop function if exists public.deletenetworkattachment(uuid) cascade; > drop function if exists public.deletenumanode(uuid) cascade; > drop function if exists public.deletenumanodecpubynumanodeid(uuid) cascade; > drop function if exists public.deletenumanodemapbyvmnumanodeid(uuid) cascade; > drop function if exists public.deleteorphanjobs() cascade; > drop function if exists public.deleteovfgenerations(character varying) cascade; > drop function if exists public.deletepermission(uuid) cascade; > drop function if exists public.deletepermissionsbyentityid(uuid) cascade; > drop function if exists public.deletepermissionsbyentityids(uuid[]) cascade; > drop function if exists public.deletepolicyunit(uuid) cascade; > drop function if exists public.deleteprovider(uuid) cascade; > drop function if exists public.deleteqos(uuid) cascade; > drop function if exists public.deletequotabyquotaguid(uuid) cascade; > drop function if exists public.deletequotalimitationbyquotaguid(uuid) cascade; > drop function if exists public.deleterepo_domain_file_list(uuid, integer) cascade; > drop function if exists public.deleterole(uuid) cascade; > drop function if exists public.deleterunningjobsoftasklesscommands() cascade; > drop function if exists public.deletesnapshot(uuid) cascade; > drop function if exists public.deletestep(uuid) cascade; > drop function if exists public.deletestepsubjectentity(uuid, uuid) cascade; > drop function if exists public.deletestorage_domain_dynamic(uuid) cascade; > drop function if exists public.deletestorage_domain_static(uuid) cascade; > drop function if exists public.deletestorage_pool(uuid) cascade; > drop function if exists public.deletestorage_pool_iso_map(uuid, uuid) cascade; > drop function if exists public.deletestorage_server_connections(character varying) cascade; > drop function if exists public.deletestoragedevicebyid(uuid) cascade; > drop function if exists public.deletestoragedomaindr(uuid, uuid) cascade; > drop function if exists public.deletestoragedomainovfinfo(uuid) cascade; > drop function if exists public.deletestorageserverconnectionextension(uuid) cascade; > drop function if exists public.deletesupportedclusterfeature(uuid, uuid) cascade; > drop function if exists public.deletetags(uuid) cascade; > drop function if exists public.deletetags_user_group_map(uuid, uuid) cascade; > drop function if exists public.deletetags_user_map(uuid, uuid) cascade; > drop function if exists public.deletetags_vds_map(uuid, uuid) cascade; > drop function if exists public.deletetags_vm_map(uuid, uuid) cascade; > drop function if exists public.deletetags_vm_pool_map(uuid, uuid) cascade; > drop function if exists public.deleteuser(uuid) cascade; > drop function if exists public.deleteuserprofile(uuid) cascade; > drop function if exists public.deletevdcoption(integer) cascade; > drop function if exists public.deletevds(uuid) cascade; > drop function if exists public.deletevds_interface(uuid) cascade; > drop function if exists public.deletevds_interface_statistics(uuid) cascade; > drop function if exists public.deletevds_spm_id_map(uuid) cascade; > drop function if exists public.deletevdsdynamic(uuid) cascade; > drop function if exists public.deletevdsstatic(uuid) cascade; > drop function if exists public.deletevdsstatistics(uuid) cascade; > drop function if exists public.deletevfsconfiglabel(uuid, text) cascade; > drop function if exists public.deletevfsconfignetwork(uuid, uuid) cascade; > drop function if exists public.deletevm(uuid) cascade; > drop function if exists public.deletevm_interface_statistics(uuid) cascade; > drop function if exists public.deletevm_pool_map(uuid) cascade; > drop function if exists public.deletevm_pools(uuid) cascade; > drop function if exists public.deletevmbackup(uuid) cascade; > drop function if exists public.deletevmcheckpoint(uuid) cascade; > drop function if exists public.deletevmdevice(uuid, uuid) cascade; > drop function if exists public.deletevmdevicesbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.deletevmdynamic(uuid) cascade; > drop function if exists public.deletevmguestagentinterfacesbyvmids(uuid[]) cascade; > drop function if exists public.deletevmicon(uuid) cascade; > drop function if exists public.deletevmicondefault(uuid) cascade; > drop function if exists public.deletevmiconifunused(uuid) cascade; > drop function if exists public.deletevminit(uuid) cascade; > drop function if exists public.deletevminterface(uuid) cascade; > drop function if exists public.deletevminterfacefilterparameter(uuid) cascade; > drop function if exists public.deletevmjobs(uuid) cascade; > drop function if exists public.deletevmstatic(uuid, boolean) cascade; > drop function if exists public.deletevmstatistics(uuid) cascade; > drop function if exists public.deletevmtemplates(uuid) cascade; > drop function if exists public.deletevnicprofile(uuid) cascade; > drop function if exists public.displayallauditlogevents(integer) cascade; > drop function if exists public.existsvmdevicebyvmidandtype(uuid, character varying) cascade; > drop function if exists public.fn_authz_entry_info(uuid) cascade; > drop function if exists public.fn_db_add_action_group_to_role(uuid, integer) cascade; > drop function if exists public.fn_db_add_column(character varying, character varying, text) cascade; > drop function if exists public.fn_db_add_column_to_object_white_list(character varying, character varying) cascade; > drop function if exists public.fn_db_add_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_add_config_value_for_versions_up_to(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_change_column_type(character varying, character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_change_table_string_columns_to_empty_string(character varying, character varying[]) cascade; > drop function if exists public.fn_db_create_constraint(character varying, character varying, text) cascade; > drop function if exists public.fn_db_create_index(character varying, character varying, text, text, boolean) cascade; > drop function if exists public.fn_db_delete_config_for_version(text) cascade; > drop function if exists public.fn_db_delete_config_value(character varying, text) cascade; > drop function if exists public.fn_db_delete_config_value_all_versions(character varying) cascade; > drop function if exists public.fn_db_drop_column(character varying, character varying) cascade; > drop function if exists public.fn_db_drop_constraint(character varying, character varying) cascade; > drop function if exists public.fn_db_drop_index(character varying) cascade; > drop function if exists public.fn_db_get_async_tasks() cascade; > drop function if exists public.fn_db_grant_action_group_to_all_roles_filter(integer, uuid[]) cascade; > drop function if exists public.fn_db_is_table_exists(character varying) cascade; > drop function if exists public.fn_db_mask_object(regclass) cascade; > drop function if exists public.fn_db_remove_csv_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_remove_uuid_from_csv(text, uuid) cascade; > drop function if exists public.fn_db_rename_column(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_rename_config_key(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_rename_table(character varying, character varying) cascade; > drop function if exists public.fn_db_split_config_value(character varying, character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_unlock_all() cascade; > drop function if exists public.fn_db_unlock_disk(uuid) cascade; > drop function if exists public.fn_db_unlock_entity(character varying, character varying, boolean) cascade; > drop function if exists public.fn_db_unlock_snapshot(uuid) cascade; > drop function if exists public.fn_db_update_column_to_jsonb_compatible_values(character varying, character varying, jsonb) cascade; > drop function if exists public.fn_db_update_config_value(character varying, character varying, character varying) cascade; > drop function if exists public.fn_db_update_default_config_value(character varying, character varying, character varying, character varying, boolean) cascade; > drop function if exists public.fn_db_varchar_to_jsonb(character varying, jsonb) cascade; > drop function if exists public.fn_get_ad_element_name(uuid) cascade; > drop function if exists public.fn_get_column_size(character varying, character varying) cascade; > drop function if exists public.fn_get_comparable_ip_list(text) cascade; > drop function if exists public.fn_get_dedicated_hosts_ids_by_vm_id(uuid) cascade; > drop function if exists public.fn_get_entity_name(uuid, integer) cascade; > drop function if exists public.fn_get_entity_parents(uuid, integer) cascade; > drop function if exists public.fn_get_num_of_vcpus(vm_static) cascade; > drop function if exists public.fn_image_deleted() cascade; > drop function if exists public.fn_perms_get_storage_pools_with_permitted_action_on_clusters(uuid, integer, boolean, boolean) cascade; > drop function if exists public.fn_user_permissions(uuid) cascade; > drop function if exists public.fnsplitter(text) cascade; > drop function if exists public.fnsplitterinteger(text) cascade; > drop function if exists public.fnsplitteruuid(text) cascade; > drop function if exists public.fnsplitterwithseperator(text, character varying) cascade; > drop function if exists public.force_delete_storage_domain(uuid) cascade; > drop function if exists public.freehostdevicesusedbyvmid(uuid) cascade; > drop function if exists public.generate_drop_all_functions_syntax() cascade; > drop function if exists public.generate_drop_all_seq_syntax() cascade; > drop function if exists public.generate_drop_all_tables_syntax() cascade; > drop function if exists public.generate_drop_all_user_types_syntax() cascade; > drop function if exists public.generate_drop_all_views_syntax() cascade; > drop function if exists public.get_all_commands() cascade; > drop function if exists public.get_entity_permissions(uuid, integer, uuid, integer) cascade; > drop function if exists public.get_entity_permissions_for_user_and_groups(uuid, text, integer, uuid, integer, boolean) cascade; > drop function if exists public.get_entity_snapshot_by_command_id(uuid) cascade; > drop function if exists public.get_entity_snapshot_by_id(uuid) cascade; > drop function if exists public.get_oauth_client(character varying) cascade; > drop function if exists public.get_role_groups_by_role_id(uuid) cascade; > drop function if exists public.get_roles_groups_by_action_group_id_and_by_role_id(integer, uuid) cascade; > drop function if exists public.get_seconds_to_wait_before_pm_operation(character varying, character varying, integer) cascade; > drop function if exists public.getaccessprotocolsbyglustervolumeguid(uuid) cascade; > drop function if exists public.getactivevmnameswithisoattached(uuid) cascade; > drop function if exists public.getactivevmnameswithisoonstoragedomain(uuid) cascade; > drop function if exists public.getactivevmswithleaseonstoragedomain(uuid) cascade; > drop function if exists public.getallbystatus(integer) cascade; > drop function if exists public.getallfromasync_tasks() cascade; > drop function if exists public.getallfromauditlog(uuid, boolean) cascade; > drop function if exists public.getallfrombasedisks() cascade; > drop function if exists public.getallfrombookmarks() cascade; > drop function if exists public.getallfromclusterpolicys() cascade; > drop function if exists public.getallfromclusterpolicyunits() cascade; > drop function if exists public.getallfromcommandentities() cascade; > drop function if exists public.getallfromcpuprofiles() cascade; > drop function if exists public.getallfromcustom_actions() cascade; > drop function if exists public.getallfromdisk_image_dynamic() cascade; > drop function if exists public.getallfromdisklunmaps() cascade; > drop function if exists public.getallfromdiskprofiles() cascade; > drop function if exists public.getallfromdnsresolverconfigurations() cascade; > drop function if exists public.getallfromglusterservices() cascade; > drop function if exists public.getallfromhostdevices() cascade; > drop function if exists public.getallfromhostnicvfsconfigs() cascade; > drop function if exists public.getallfromimages() cascade; > drop function if exists public.getallfromimageuploads() cascade; > drop function if exists public.getallfromiscsibonds() cascade; > drop function if exists public.getallfromlibvirtsecrets() cascade; > drop function if exists public.getallfromlun_storage_server_connection_map() cascade; > drop function if exists public.getallfrommacpools() cascade; > drop function if exists public.getallfromnetwork(uuid, boolean) cascade; > drop function if exists public.getallfromnetwork_cluster() cascade; > drop function if exists public.getallfromnetwork_clusterbyclusterid(uuid) cascade; > drop function if exists public.getallfromnetwork_clusterbynetworkid(uuid) cascade; > drop function if exists public.getallfromnetworkattachments() cascade; > drop function if exists public.getallfromnumanodecpumap() cascade; > drop function if exists public.getallfrompolicyunits() cascade; > drop function if exists public.getallfromproviders() cascade; > drop function if exists public.getallfromprovidersbytypes(character varying[]) cascade; > drop function if exists public.getallfromrole(integer) cascade; > drop function if exists public.getallfromsnapshots() cascade; > drop function if exists public.getallfromsnapshotsbyvmid(uuid, uuid, boolean, boolean) cascade; > drop function if exists public.getallfromstorage_domain_dynamic() cascade; > drop function if exists public.getallfromstorage_domain_static() cascade; > drop function if exists public.getallfromstorage_pool(uuid, boolean) cascade; > drop function if exists public.getallfromstorage_pool_iso_map() cascade; > drop function if exists public.getallfromstorageserverconnectionextensions() cascade; > drop function if exists public.getallfromtags() cascade; > drop function if exists public.getallfromtags_user_group_map() cascade; > drop function if exists public.getallfromtags_user_map() cascade; > drop function if exists public.getallfromtags_vds_map() cascade; > drop function if exists public.getallfromtags_vm_map() cascade; > drop function if exists public.getallfromtags_vm_pool_map() cascade; > drop function if exists public.getallfromusers(uuid, boolean) cascade; > drop function if exists public.getallfromvdcoption() cascade; > drop function if exists public.getallfromvds_spm_id_map() cascade; > drop function if exists public.getallfromvdsdynamic() cascade; > drop function if exists public.getallfromvdsstatic() cascade; > drop function if exists public.getallfromvdsstatistics() cascade; > drop function if exists public.getallfromvm_pool_map() cascade; > drop function if exists public.getallfromvm_pools() cascade; > drop function if exists public.getallfromvmbackups() cascade; > drop function if exists public.getallfromvmcheckpoints() cascade; > drop function if exists public.getallfromvmdynamic() cascade; > drop function if exists public.getallfromvmicondefaults() cascade; > drop function if exists public.getallfromvmicons() cascade; > drop function if exists public.getallfromvmiconsfiltered(uuid, boolean) cascade; > drop function if exists public.getallfromvminterfacefilterparameters() cascade; > drop function if exists public.getallfromvminterfaces() cascade; > drop function if exists public.getallfromvmstatic() cascade; > drop function if exists public.getallfromvmstaticbystoragepoolid(uuid) cascade; > drop function if exists public.getallfromvmstatistics() cascade; > drop function if exists public.getallfromvnicprofiles() cascade; > drop function if exists public.getallgroups() cascade; > drop function if exists public.getallhashesfromvmdynamic() cascade; > drop function if exists public.getalljobidsbyentityid(uuid) cascade; > drop function if exists public.getalljobs() cascade; > drop function if exists public.getalllibvirtsecretsbyproviderid(uuid) cascade; > drop function if exists public.getallmacpoolrangesbymacpoolid(uuid) cascade; > drop function if exists public.getallmacsbymacpoolid(uuid) cascade; > drop function if exists public.getallmanagementnetworksbydatacenterid(uuid) cascade; > drop function if exists public.getallnetworkbyclusterid(uuid, uuid, boolean) cascade; > drop function if exists public.getallnetworkbystoragepoolid(uuid, uuid, boolean) cascade; > drop function if exists public.getallnetworkfilters() cascade; > drop function if exists public.getallnetworklabelsbydatacenterid(uuid) cascade; > drop function if exists public.getallnetworksbynetworkproviderid(uuid) cascade; > drop function if exists public.getallnetworksbyproviderphysicalnetworkid(uuid) cascade; > drop function if exists public.getallnetworksbyqosid(uuid) cascade; > drop function if exists public.getallnonadminroles(integer) cascade; > drop function if exists public.getallovfentitiesforstoragedomainbyentitytype(uuid, character varying) cascade; > drop function if exists public.getallqosbyqostype(smallint) cascade; > drop function if exists public.getallqosforstoragepool(uuid) cascade; > drop function if exists public.getallqosforstoragepoolbyqostype(uuid, smallint) cascade; > drop function if exists public.getallsnapshotsbymemorydisk(uuid) cascade; > drop function if exists public.getallsnapshotsbystoragedomainid(uuid) cascade; > drop function if exists public.getallsteps() cascade; > drop function if exists public.getallstorage_server_connections() cascade; > drop function if exists public.getallsupportednetworkfiltersbyversion(character varying) cascade; > drop function if exists public.getallunfinishedvdskdumpstatus() cascade; > drop function if exists public.getallvfsconfigbyhostid(uuid) cascade; > drop function if exists public.getallvmjobs() cascade; > drop function if exists public.getanyadminrolebyuseridandgroupids(uuid, text, integer) cascade; > drop function if exists public.getasync_tasksbytask_id(uuid) cascade; > drop function if exists public.getasynctaskentitiesbytaskid(uuid) cascade; > drop function if exists public.getasynctasksbyentityid(uuid) cascade; > drop function if exists public.getasynctasksbystoragepoolid(uuid) cascade; > drop function if exists public.getasynctasksbyvdsmtaskid(uuid) cascade; > drop function if exists public.getasynctasksidsbyentityid(uuid) cascade; > drop function if exists public.getauditlogbyauditlogid(bigint) cascade; > drop function if exists public.getauditlogbyoriginandcustomeventid(character varying, integer) cascade; > drop function if exists public.getauditlogbyvmid(uuid, uuid, boolean) cascade; > drop function if exists public.getauditlogbyvmtemplateid(uuid, uuid, boolean) cascade; > drop function if exists public.getauditlogbyvolumeidandtype(uuid, integer) cascade; > drop function if exists public.getauditloglaterthendate(timestamp with time zone) cascade; > drop function if exists public.getbasediskbybasediskid(uuid) cascade; > drop function if exists public.getbasedisksbyalias(character varying) cascade; > drop function if exists public.getbookmarkbybookmark_id(uuid) cascade; > drop function if exists public.getbookmarkbybookmark_name(character varying) cascade; > drop function if exists public.getbrickdetailsbyid(uuid) cascade; > drop function if exists public.getcinderstorage(uuid) cascade; > drop function if exists public.getcinderstoragebydrivers(jsonb) cascade; > drop function if exists public.getclusterfeaturesbyversionandcategory(character varying, integer) cascade; > drop function if exists public.getclusterpolicybyclusterpolicyid(uuid) cascade; > drop function if exists public.getclusterpolicyunitsbyclusterpolicyid(uuid) cascade; > drop function if exists public.getcommandassociatedentities(uuid) cascade; > drop function if exists public.getcommandentitiesbyparentcmdid(uuid) cascade; > drop function if exists public.getcommandentitybycommandentityid(uuid) cascade; > drop function if exists public.getcommandidsbyentityid(uuid) cascade; > drop function if exists public.getconnectionsbyiscsibondid(uuid) cascade; > drop function if exists public.getcpuprofilebycpuprofileid(uuid) cascade; > drop function if exists public.getcpuprofilesbyclusterid(uuid, uuid, boolean, integer) cascade; > drop function if exists public.getcpuprofilesbyqosid(uuid) cascade; > drop function if exists public.getcustom_actionsbyaction_id(integer) cascade; > drop function if exists public.getcustom_actionsbynameandtab(character varying, integer) cascade; > drop function if exists public.getcustom_actionsbytab_id(integer) cascade; > drop function if exists public.getdbgeneration(uuid) cascade; > drop function if exists public.getdcidbyexternalnetworkid(text) cascade; > drop function if exists public.getdefaultmacpool() cascade; > drop function if exists public.getdisk_image_dynamicbyimage_id(uuid) cascade; > drop function if exists public.getdiskbydiskidandstoragedomainid(uuid, uuid) cascade; > drop function if exists public.getdisklunmapbydiskid(uuid) cascade; > drop function if exists public.getdisklunmapbydisklunmapid(uuid, character varying) cascade; > drop function if exists public.getdisklunmapbylunid(character varying) cascade; > drop function if exists public.getdisklunmapsforvmsinpool(uuid) cascade; > drop function if exists public.getdiskprofilebydiskprofileid(uuid) cascade; > drop function if exists public.getdiskprofilesbyqosid(uuid) cascade; > drop function if exists public.getdiskprofilesbystoragedomainid(uuid, uuid, boolean) cascade; > drop function if exists public.getdisksvmguidbasicview(uuid, boolean, uuid, boolean) cascade; > drop function if exists public.getdnsresolverconfigurationbydnsresolverconfigurationid(uuid) cascade; > drop function if exists public.getdwhhistorytimekeepingbyvarname(character varying) cascade; > drop function if exists public.getelementidsbyidandgroups(uuid, text) cascade; > drop function if exists public.getenginesession(integer) cascade; > drop function if exists public.getenginesessionbysessionid(text) cascade; > drop function if exists public.getentitiesbydiskid(uuid) cascade; > drop function if exists public.getentitiesnamemap() cascade; > drop function if exists public.getevent_subscriberbysubscriber_id(uuid) cascade; > drop function if exists public.getexternalidsfromsteps(character varying, character varying) cascade; > drop function if exists public.getexternalvariablebyname(character varying) cascade; > drop function if exists public.getfenceagentbyid(uuid) cascade; > drop function if exists public.getfenceagentsbyvdsid(uuid) cascade; > drop function if exists public.getglobalids(character varying) cascade; > drop function if exists public.getglusterclusterservicesbyclusterid(uuid) cascade; > drop function if exists public.getglusterclusterservicesbyclusteridandservicetype(uuid, character varying) cascade; > drop function if exists public.getglustergeorepsessiondetails(uuid) cascade; > drop function if exists public.getglustergeorepsessiondetailsforbrick(uuid, uuid) cascade; > drop function if exists public.getglustergeorepsessionunsetconfig(uuid) cascade; > drop function if exists public.getglusterhook(uuid, character varying, character varying, character varying, boolean) cascade; > drop function if exists public.getglusterhookbyid(uuid, boolean) cascade; > drop function if exists public.getglusterhookcontentbyid(uuid) cascade; > drop function if exists public.getglusterhooksbyclusterid(uuid) cascade; > drop function if exists public.getglusteroptionbyid(uuid) cascade; > drop function if exists public.getglusterserverbyglusterserveruuid(uuid) cascade; > drop function if exists public.getglusterserverbyserverid(uuid) cascade; > drop function if exists public.getglusterservicebyglusterserviceid(uuid) cascade; > drop function if exists public.getglusterservicebytypeandname(character varying, character varying) cascade; > drop function if exists public.getglusterservicesbytype(character varying) cascade; > drop function if exists public.getglusterservicetypes() cascade; > drop function if exists public.getglustervolumedetailsbyid(uuid) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyclusterid(uuid) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyclusteridandname(uuid, character varying) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyvolumeid(uuid, uuid) cascade; > drop function if exists public.getglustervolumesnapshotconfigbyvolumeidandname(uuid, uuid, character varying) cascade; > drop function if exists public.getgroupbyexternalid(character varying, text) cascade; > drop function if exists public.getgroupbyid(uuid) cascade; > drop function if exists public.getgroupbyname(character varying) cascade; > drop function if exists public.getgroupbynameanddomain(character varying, character varying) cascade; > drop function if exists public.gethostdevicebyhostidanddevicename(uuid, character varying) cascade; > drop function if exists public.gethostdevicesbyhostid(uuid) cascade; > drop function if exists public.gethostdevicesbyhostidandiommugroup(uuid, integer) cascade; > drop function if exists public.gethostedenginestoragedomainids() cascade; > drop function if exists public.gethostnetworksbycluster(uuid) cascade; > drop function if exists public.gethostnicvfsconfigbyid(uuid) cascade; > drop function if exists public.gethostproviderbinding(uuid, character varying) cascade; > drop function if exists public.gethostsandvmsforclusters(uuid[]) cascade; > drop function if exists public.getidsforovfdeletion(uuid) cascade; > drop function if exists public.getidsofhostswithstatus(integer) cascade; > drop function if exists public.getimage_storage_domain_mapbyimage_id(uuid) cascade; > drop function if exists public.getimage_storage_domain_mapbystorage_domain_id(uuid) cascade; > drop function if exists public.getimagebyimageid(uuid) cascade; > drop function if exists public.getimagetransfersbyvdsid(uuid) cascade; > drop function if exists public.getimageuploadsbycommandid(uuid, uuid, boolean) cascade; > drop function if exists public.getimageuploadsbydiskid(uuid) cascade; > drop function if exists public.getisclusterempty(uuid) cascade; > drop function if exists public.getiscsibondbyiscsibondid(uuid) cascade; > drop function if exists public.getiscsibondsbynetworkid(uuid) cascade; > drop function if exists public.getiscsibondsbystoragepoolid(uuid) cascade; > drop function if exists public.getisodisksbystoragepool(uuid) cascade; > drop function if exists public.getjobbyjobid(uuid) cascade; > drop function if exists public.getjobsbycorrelationid(character varying) cascade; > drop function if exists public.getjobsbyenginesessionseqidandstatus(bigint, character varying) cascade; > drop function if exists public.getjobsbyoffsetandpagesize(integer, integer) cascade; > drop function if exists public.getjobsubjectentitybyjobid(uuid) cascade; > drop function if exists public.getkdumpstatusforvds(uuid) cascade; > drop function if exists public.getlabelsbyvfsconfigid(uuid) cascade; > drop function if exists public.getlastsuccessfulenginebackup(character varying) cascade; > drop function if exists public.getlibvirtsecretbylibvirtsecretid(uuid) cascade; > drop function if exists public.getlibvirtsecretsbypoolidonactivedomains(uuid) cascade; > drop function if exists public.getlun_storage_server_connection_mapbylun(character varying) cascade; > drop function if exists public.getlun_storage_server_connection_mapbylunbystorage_server_conn(character varying, character varying) cascade; > drop function if exists public.getmacpoolbyclusterid(uuid) cascade; > drop function if exists public.getmacpoolbymacpoolid(uuid) cascade; > drop function if exists public.getmacsbyclusterid(uuid) cascade; > drop function if exists public.getmacsbydatacenterid(uuid) cascade; > drop function if exists public.getmanagementnetworkbycluster(uuid) cascade; > drop function if exists public.getnameserversbydnsresolverconfigurationid(uuid) cascade; > drop function if exists public.getnamesofhostsdedicatedtovm(uuid) cascade; > drop function if exists public.getnamesofvmstaticdedicatedtovds(uuid) cascade; > drop function if exists public.getnetwork_clusterbycluster_idandbynetwork_id(uuid, uuid) cascade; > drop function if exists public.getnetworkattachmentbynetworkattachmentid(uuid) cascade; > drop function if exists public.getnetworkattachmentbynicidandnetworkid(uuid, uuid) cascade; > drop function if exists public.getnetworkattachmentsbyhostid(uuid) cascade; > drop function if exists public.getnetworkattachmentsbynetworkid(uuid) cascade; > drop function if exists public.getnetworkattachmentsbynicid(uuid) cascade; > drop function if exists public.getnetworkbyid(uuid, uuid, boolean) cascade; > drop function if exists public.getnetworkbynameandcluster(character varying, uuid) cascade; > drop function if exists public.getnetworkbynameanddatacenter(character varying, uuid) cascade; > drop function if exists public.getnetworkbyvdsmnameanddatacenterid(character varying, uuid) cascade; > drop function if exists public.getnetworkfilterbyid(uuid) cascade; > drop function if exists public.getnetworkfilterbyname(character varying) cascade; > drop function if exists public.getnetworksbyiscsibondid(uuid) cascade; > drop function if exists public.getnetworksbyvfsconfigid(uuid) cascade; > drop function if exists public.getnoncountablequtoavmstatuses() cascade; > drop function if exists public.getnumberofimagesinstoragedomain(uuid) cascade; > drop function if exists public.getnumberofvmsincluster(uuid) cascade; > drop function if exists public.getnumofsnapshotsbymemoryvolume(uuid[]) cascade; > drop function if exists public.getnvmtagsbyvmid(uuid) cascade; > drop function if exists public.getnvmtagsbyvmidanddefaulttag(uuid) cascade; > drop function if exists public.getoptionsbyglustervolumeguid(uuid) cascade; > drop function if exists public.getorderedvmguidsforrunmultipleactions(character varying) cascade; > drop function if exists public.getovfdatabyentityidandstoragedomain(uuid, uuid) cascade; > drop function if exists public.getovfgeneration(uuid) cascade; > drop function if exists public.getpermissionbyroleid(uuid) cascade; > drop function if exists public.getpolicyunitbypolicyunitid(uuid) cascade; > drop function if exists public.getproviderbyname(character varying) cascade; > drop function if exists public.getproviderbyproviderid(uuid) cascade; > drop function if exists public.getqosbyqosid(uuid) cascade; > drop function if exists public.getquotacount() cascade; > drop function if exists public.getrepo_files_by_storage_domain(uuid, integer) cascade; > drop function if exists public.getrequirednetworksbydatacenterid(uuid) cascade; > drop function if exists public.getroleactiongroupsbyroleid(uuid) cascade; > drop function if exists public.getrolebyname(character varying) cascade; > drop function if exists public.getrolsbyid(uuid) cascade; > drop function if exists public.getsessionuserandgroupsbyid(uuid, integer) cascade; > drop function if exists public.getsnapshotbysnapshotid(uuid, uuid, boolean) cascade; > drop function if exists public.getsnapshotbyvmidandstatus(uuid, character varying) cascade; > drop function if exists public.getsnapshotbyvmidandtype(uuid, character varying, uuid, boolean) cascade; > drop function if exists public.getsnapshotbyvmidandtypeandstatus(uuid, character varying, character varying) cascade; > drop function if exists public.getsnapshotidsbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.getsnapshotidsbyvmidandtypeandstatus(uuid, character varying, character varying) cascade; > drop function if exists public.getstepbystepid(uuid) cascade; > drop function if exists public.getstepsbyexternaltaskid(uuid) cascade; > drop function if exists public.getstepsbyjobid(uuid) cascade; > drop function if exists public.getstepsbyparentstepid(uuid) cascade; > drop function if exists public.getstepsforentitybystatus(character varying, uuid, character varying) cascade; > drop function if exists public.getstepsubjectentitiesbystepid(uuid) cascade; > drop function if exists public.getstorage_domain_dynamicbyid(uuid) cascade; > drop function if exists public.getstorage_domain_staticbyid(uuid) cascade; > drop function if exists public.getstorage_domain_staticbyname(character varying) cascade; > drop function if exists public.getstorage_domain_staticbynamefiltered(character varying, uuid, boolean) cascade; > drop function if exists public.getstorage_domain_staticbystorage_pool_id(uuid) cascade; > drop function if exists public.getstorage_pool_iso_mapbystorage_idandbystorage_pool_id(uuid, uuid) cascade; > drop function if exists public.getstorage_pool_iso_mapsbybystorage_pool_id(uuid, uuid) cascade; > drop function if exists public.getstorage_pool_iso_mapsbystorage_id(uuid) cascade; > drop function if exists public.getstorage_poolbyid(uuid, uuid, boolean) cascade; > drop function if exists public.getstorage_poolbyname(character varying, boolean) cascade; > drop function if exists public.getstorage_poolsbyclusterid(uuid) cascade; > drop function if exists public.getstorage_poolsbystoragedomainid(uuid) cascade; > drop function if exists public.getstorage_poolsbyvdsid(uuid) cascade; > drop function if exists public.getstorage_server_connectionsbyconnection(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbyid(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbyiqn(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbyiqnandconnection(character varying, character varying) cascade; > drop function if exists public.getstorage_server_connectionsbykey(character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.getstorage_server_connectionsbylunid(character varying) cascade; > drop function if exists public.getstorage_server_connectionsbystoragetype(integer) cascade; > drop function if exists public.getstorage_server_connectionsbyvolumegroupid(character varying) cascade; > drop function if exists public.getstorageconnectionsbystoragetypeandstatus(uuid, integer, character varying) cascade; > drop function if exists public.getstoragedevicebyid(uuid) cascade; > drop function if exists public.getstoragedevicesbyvdsid(uuid) cascade; > drop function if exists public.getstoragedomaindr(uuid, uuid) cascade; > drop function if exists public.getstoragedomaindrlist(uuid) cascade; > drop function if exists public.getstoragedomaindrwithgeorep(uuid) cascade; > drop function if exists public.getstoragedomainidsbystoragepoolidandstatus(uuid, integer) cascade; > drop function if exists public.getstoragepoolsbyclusterservice(boolean, boolean) cascade; > drop function if exists public.getstorageserverconnectionextensionbyid(uuid) cascade; > drop function if exists public.getstorageserverconnectionextensionsbyhostid(uuid) cascade; > drop function if exists public.getstorageserverconnectionextensionsbyhostidandtarget(uuid, character varying) cascade; > drop function if exists public.getstorageserverconnectionsbyids(text) cascade; > drop function if exists public.getstorageserverconnectionsfordomain(uuid) cascade; > drop function if exists public.getsupportedhostfeaturesbyhostid(uuid) cascade; > drop function if exists public.getsystem_statistics(character varying, character varying) cascade; > drop function if exists public.gettags_vm_pool_mapbytag_idandbyvm_pool_id(uuid, uuid) cascade; > drop function if exists public.gettagsbyparent_id(uuid) cascade; > drop function if exists public.gettagsbytag_id(uuid) cascade; > drop function if exists public.gettagsbytag_name(character varying) cascade; > drop function if exists public.gettaguserbytagidandbyuserid(uuid, uuid) cascade; > drop function if exists public.gettagusergroupbygroupidandbytagid(uuid, uuid) cascade; > drop function if exists public.gettagvdsbytagidandbyvdsid(uuid, uuid) cascade; > drop function if exists public.gettagvmbytagidandbyvmid(uuid, uuid) cascade; > drop function if exists public.gettemplatecount() cascade; > drop function if exists public.gettransporttypesbyglustervolumeguid(uuid) cascade; > drop function if exists public.getuserandgroupsbyid(uuid) cascade; > drop function if exists public.getuserbyexternalid(character varying, text) cascade; > drop function if exists public.getuserbyuserid(uuid, boolean) cascade; > drop function if exists public.getuserbyusernameanddomain(character varying, character varying) cascade; > drop function if exists public.getusersbytemplateguid(uuid) cascade; > drop function if exists public.getusersbyvmguid(uuid) cascade; > drop function if exists public.getvdcoptionbyid(integer) cascade; > drop function if exists public.getvdcoptionbyname(character varying, character varying) cascade; > drop function if exists public.getvds_spm_id_mapbystorage_pool_id(uuid) cascade; > drop function if exists public.getvds_spm_id_mapbystorage_pool_idandbyvds_spm_id(uuid, integer) cascade; > drop function if exists public.getvds_spm_id_mapbyvds_id(uuid) cascade; > drop function if exists public.getvdsdynamicbyvdsid(uuid) cascade; > drop function if exists public.getvdsstaticbyclusterid(uuid) cascade; > drop function if exists public.getvdsstaticbyhostname(character varying) cascade; > drop function if exists public.getvdsstaticbyip(character varying) cascade; > drop function if exists public.getvdsstaticbyvdsid(uuid) cascade; > drop function if exists public.getvdsstaticbyvdsids(uuid[]) cascade; > drop function if exists public.getvdsstaticbyvdsname(character varying) cascade; > drop function if exists public.getvdsstatisticsbyvdsid(uuid) cascade; > drop function if exists public.getvfsconfigbynicid(uuid) cascade; > drop function if exists public.getvm_interface_statisticsbyid(uuid) cascade; > drop function if exists public.getvm_pool_mapbyvm_pool_id(uuid) cascade; > drop function if exists public.getvmandtemplatesidsbystoragedomainid(uuid, boolean, boolean) cascade; > drop function if exists public.getvmbackupbyvmbackupid(uuid) cascade; > drop function if exists public.getvmbackupsbyvmid(uuid) cascade; > drop function if exists public.getvmcheckpointbyvmcheckpointid(uuid) cascade; > drop function if exists public.getvmcheckpointsbyvmid(uuid) cascade; > drop function if exists public.getvmdevicesattachedtohost(uuid) cascade; > drop function if exists public.getvmdynamicbyvmguid(uuid) cascade; > drop function if exists public.getvmguestagentinterfacesbyvmid(uuid, uuid, boolean) cascade; > drop function if exists public.getvmiconbyvmicondataurl(text) cascade; > drop function if exists public.getvmiconbyvmiconid(uuid) cascade; > drop function if exists public.getvmicondefaultbyvmicondefaultid(uuid) cascade; > drop function if exists public.getvmicondefaultbyvmicondefaultlargeiconid(uuid) cascade; > drop function if exists public.getvmicondefaultbyvmicondefaultosid(integer) cascade; > drop function if exists public.getvmidsforversionupdate(uuid) cascade; > drop function if exists public.getvmidswithspecificisoattached(uuid) cascade; > drop function if exists public.getvminitbyids(text) cascade; > drop function if exists public.getvminitbyvmid(uuid) cascade; > drop function if exists public.getvminterfacebytemplateid(uuid) cascade; > drop function if exists public.getvminterfacebyvminterfaceid(uuid) cascade; > drop function if exists public.getvminterfacefilterparameterbyvminterfacefilterparameterid(uuid) cascade; > drop function if exists public.getvminterfacefilterparametersbyvminterfaceid(uuid) cascade; > drop function if exists public.getvminterfacesbynetworkid(uuid) cascade; > drop function if exists public.getvminterfacesbyvmid(uuid) cascade; > drop function if exists public.getvmmapsinvmpoolbyvmpoolidandstatus(uuid, integer) cascade; > drop function if exists public.getvmnameswithspecificisoattached(uuid) cascade; > drop function if exists public.getvmsandtemplatesidswithoutattachedimagedisks(uuid, boolean) cascade; > drop function if exists public.getvmsdynamicrunningonvds(uuid) cascade; > drop function if exists public.getvmsidsforovfupdate(uuid) cascade; > drop function if exists public.getvmsmigratingtovds(uuid) cascade; > drop function if exists public.getvmsstaticrunningonvds(uuid) cascade; > drop function if exists public.getvmstaticbycluster(uuid) cascade; > drop function if exists public.getvmstaticbygroupidandnetwork(uuid, character varying) cascade; > drop function if exists public.getvmstaticbyname(character varying) cascade; > drop function if exists public.getvmstaticbyvmguid(uuid) cascade; > drop function if exists public.getvmstaticbyvmguids(uuid[]) cascade; > drop function if exists public.getvmstaticwithouticon() cascade; > drop function if exists public.getvmstatisticsbyvmguid(uuid) cascade; > drop function if exists public.getvmswithleaseonstoragedomain(uuid) cascade; > drop function if exists public.getvmtemplateinterfacesbynetworkid(uuid) cascade; > drop function if exists public.getvmtemplatesidsforovfupdate(uuid) cascade; > drop function if exists public.getvnicprofilebyvnicprofileid(uuid) cascade; > drop function if exists public.getvnicprofilesbynetworkid(uuid) cascade; > drop function if exists public.increasestoragepoolmasterversion(uuid) cascade; > drop function if exists public.incrementdbgeneration(uuid) cascade; > drop function if exists public.incrementdbgenerationforallinstoragepool(uuid) cascade; > drop function if exists public.incrementdbgenerationforvms(uuid[]) cascade; > drop function if exists public.insert_entity_snapshot(uuid, uuid, character varying, character varying, character varying, text, character varying, integer, integer) cascade; > drop function if exists public.insert_osinfo(integer, character varying) cascade; > drop function if exists public.insert_roles_groups(integer, uuid) cascade; > drop function if exists public.insertaffinitygroupwithmembers(uuid, character varying, character varying, uuid, boolean, boolean, boolean, boolean, boolean, boolean, uuid[], uuid[]) cascade; > drop function if exists public.insertasync_tasks(integer, integer, integer, uuid, uuid, uuid, uuid, uuid, uuid, timestamp with time zone, uuid, integer) cascade; > drop function if exists public.insertasynctaskentities(uuid, uuid, character varying) cascade; > drop function if exists public.insertauditlog(bigint, timestamp with time zone, integer, character varying, integer, text, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, uuid, character varying, character varying, uuid, uuid, character varying, text, boolean, uuid, text, character varying, integer, integer, text) cascade; > drop function if exists public.insertbasedisk(uuid, boolean, character varying, character varying, character varying, boolean, integer, smallint, character varying, smallint, character varying) cascade; > drop function if exists public.insertbookmark(uuid, character varying, character varying) cascade; > drop function if exists public.insertcinderstorage(uuid, jsonb, text) cascade; > drop function if exists public.insertcluster(uuid, character varying, text, character varying, character varying, uuid, integer, boolean, character varying, boolean, integer, boolean, boolean, boolean, character varying, boolean, boolean, boolean, uuid, text, boolean, integer, smallint, character varying, boolean, smallint, character varying, character varying, boolean, boolean, smallint, boolean, boolean, boolean, character varying, boolean, character varying, integer, uuid, uuid, character varying, boolean, boolean, integer, uuid, integer, smallint, boolean) cascade; > drop function if exists public.insertclusterfeature(uuid, character varying, character varying, integer, text) cascade; > drop function if exists public.insertclusterpolicy(uuid, character varying, character varying, boolean, boolean, text) cascade; > drop function if exists public.insertclusterpolicyunit(uuid, uuid, integer, integer) cascade; > drop function if exists public.insertcommandassociatedentities(uuid, uuid, character varying) cascade; > drop function if exists public.insertcommandentity(uuid, bigint, uuid, integer, uuid, uuid, text, text, character varying, timestamp with time zone, character varying, boolean, boolean, text, character varying, text) cascade; > drop function if exists public.insertcpuprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.insertcpuqos(uuid, smallint, character varying, text, uuid, integer) cascade; > drop function if exists public.insertcustom_actions(integer, character varying, character varying, integer, character varying) cascade; > drop function if exists public.insertdedicatedhoststovm(uuid, text) cascade; > drop function if exists public.insertdisk_image_dynamic(uuid, integer, integer, bigint, numeric, numeric, numeric) cascade; > drop function if exists public.insertdisklunmap(uuid, character varying) cascade; > drop function if exists public.insertdiskprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.insertdiskvmelement(uuid, uuid, boolean, boolean, character varying, boolean) cascade; > drop function if exists public.insertdnsresolverconfiguration(uuid) cascade; > drop function if exists public.insertenginesession(integer, text, uuid, character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.insertevent_notification_hist(bigint, character varying, character, character, timestamp with time zone, boolean) cascade; > drop function if exists public.insertevent_subscriber(character varying, character varying, character varying, uuid, character varying) cascade; > drop function if exists public.insertexternalvariable(character varying, character varying) cascade; > drop function if exists public.insertfenceagent(uuid, uuid, integer, character varying, character varying, character varying, text, text, boolean, integer) cascade; > drop function if exists public.insertglusterclusterservice(uuid, character varying, character varying) cascade; > drop function if exists public.insertglustergeorepsession(uuid, uuid, character varying, character varying, uuid, character varying, uuid, character varying, character varying) cascade; > drop function if exists public.insertglustergeorepsessionconfig(uuid, character varying, character varying) cascade; > drop function if exists public.insertglustergeorepsessiondetail(uuid, uuid, character varying, uuid, character varying, character varying, character varying, bigint, bigint, bigint, bigint, timestamp without time zone, timestamp without time zone, timestamp without time zone, boolean) cascade; > drop function if exists public.insertglusterhook(uuid, uuid, character varying, character varying, character varying, character varying, character varying, character varying, text, integer) cascade; > drop function if exists public.insertglusterserver(uuid, uuid, character varying) cascade; > drop function if exists public.insertglusterserverhook(uuid, uuid, character varying, character varying, character varying) cascade; > drop function if exists public.insertglusterserverservice(uuid, uuid, uuid, integer, character varying, character varying) cascade; > drop function if exists public.insertglustervolume(uuid, uuid, character varying, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.insertglustervolumeaccessprotocol(uuid, character varying) cascade; > drop function if exists public.insertglustervolumebrick(uuid, uuid, uuid, character varying, integer, character varying, uuid, boolean) cascade; > drop function if exists public.insertglustervolumebrickdetails(uuid, bigint, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.insertglustervolumedetails(uuid, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.insertglustervolumeoption(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.insertglustervolumesnapshot(uuid, character varying, uuid, character varying, character varying, timestamp with time zone) cascade; > drop function if exists public.insertglustervolumesnapshotconfig(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.insertglustervolumesnapshotschedule(uuid, character varying, character varying, character varying, character varying, character varying, integer, timestamp with time zone, time without time zone, character varying, timestamp with time zone) cascade; > drop function if exists public.insertglustervolumetransporttype(uuid, character varying) cascade; > drop function if exists public.insertgroup(uuid, character varying, character varying, character varying, text, character varying) cascade; > drop function if exists public.inserthostdevice(uuid, character varying, character varying, character varying, integer, character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying, boolean, character varying, text) cascade; > drop function if exists public.inserthostnetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer) cascade; > drop function if exists public.inserthostnicvfsconfig(uuid, uuid, boolean) cascade; > drop function if exists public.insertimage(timestamp with time zone, uuid, uuid, bigint, uuid, integer, timestamp with time zone, uuid, integer, integer, uuid, boolean, smallint) cascade; > drop function if exists public.insertimage_storage_domain_map(uuid, uuid, uuid, uuid) cascade; > drop function if exists public.insertimageuploads(uuid, integer, integer, integer, boolean, timestamp without time zone, character varying, uuid, uuid, uuid, character varying, character varying, character varying, bigint, bigint, integer) cascade; > drop function if exists public.insertiscsibond(uuid, character varying, character varying, uuid) cascade; > drop function if exists public.insertjob(uuid, character varying, text, character varying, uuid, bigint, boolean, timestamp with time zone, timestamp with time zone, timestamp with time zone, character varying, boolean, boolean) cascade; > drop function if exists public.insertjobsubjectentity(uuid, uuid, character varying) cascade; > drop function if exists public.insertlibvirtsecret(uuid, text, integer, text, uuid, timestamp with time zone) cascade; > drop function if exists public.insertlun_storage_server_connection_map(character varying, character varying) cascade; > drop function if exists public.insertluns(character varying, character varying, character varying, character varying, integer, character varying, character varying, integer, bigint) cascade; > drop function if exists public.insertmacpool(uuid, character varying, boolean, character varying) cascade; > drop function if exists public.insertmacpoolrange(uuid, character varying, character varying) cascade; > drop function if exists public.insertnameserver(uuid, character varying, smallint) cascade; > drop function if exists public.insertnetwork(character varying, character varying, text, uuid, character varying, character varying, character varying, character varying, integer, integer, boolean, uuid, integer, boolean, uuid, text, uuid, uuid, text, uuid) cascade; > drop function if exists public.insertnetwork_cluster(uuid, uuid, integer, boolean, boolean, boolean, boolean, boolean, boolean) cascade; > drop function if exists public.insertnetworkattachment(uuid, uuid, uuid, character varying, character varying, character varying, character varying, character varying, character varying, integer, character varying, text, uuid) cascade; > drop function if exists public.insertnetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.insertnumanode(uuid, uuid, uuid, smallint, bigint, smallint, bigint, integer, numeric, numeric, numeric, integer, text) cascade; > drop function if exists public.insertnumanodecpu(uuid, uuid, integer) cascade; > drop function if exists public.insertnumanodemap(uuid, uuid, smallint) cascade; > drop function if exists public.insertorupdateasynctasks(integer, integer, integer, uuid, uuid, uuid, uuid, uuid, uuid, timestamp with time zone, uuid, integer) cascade; > drop function if exists public.insertorupdatecommandentity(uuid, bigint, uuid, integer, uuid, uuid, text, text, character varying, timestamp with time zone, character varying, boolean, boolean, text, character varying, text) cascade; > drop function if exists public.insertorupdateuser(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, text, character varying) cascade; > drop function if exists public.insertovfdataforentities(uuid, character varying, character varying, integer, character varying, uuid, text, text, integer) cascade; > drop function if exists public.insertpermission(uuid, uuid, uuid, uuid, integer) cascade; > drop function if exists public.insertpolicyunit(uuid, character varying, text, boolean, smallint, text, boolean) cascade; > drop function if exists public.insertprovider(uuid, character varying, character varying, character varying, character varying, boolean, character varying, text, text, character varying, character varying, text, text, text, boolean, boolean, boolean, character varying, character varying, character varying) cascade; > drop function if exists public.insertquota(uuid, uuid, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.insertquotalimitation(uuid, uuid, uuid, uuid, integer, bigint, bigint) cascade; > drop function if exists public.insertrepo_domain_file_meta_data(uuid, character varying, character varying, bigint, timestamp with time zone, bigint, integer) cascade; > drop function if exists public.insertrole(character varying, uuid, character varying, boolean, integer, boolean, integer) cascade; > drop function if exists public.insertsnapshot(uuid, uuid, character varying, character varying, character varying, timestamp with time zone, text, text, uuid, uuid) cascade; > drop function if exists public.insertstep(uuid, uuid, uuid, character varying, text, integer, character varying, smallint, timestamp with time zone, timestamp with time zone, character varying, uuid, character varying, boolean) cascade; > drop function if exists public.insertstepsubjectentity(uuid, uuid, character varying, smallint) cascade; > drop function if exists public.insertstorage_domain_dynamic(integer, uuid, integer) cascade; > drop function if exists public.insertstorage_domain_static(uuid, character varying, character varying, character varying, text, integer, integer, character varying, bigint, boolean, boolean, character varying, character varying, integer, integer, integer, boolean, integer) cascade; > drop function if exists public.insertstorage_pool(character varying, text, uuid, character varying, integer, boolean, integer, uuid, character varying, integer) cascade; > drop function if exists public.insertstorage_pool_iso_map(uuid, uuid, integer) cascade; > drop function if exists public.insertstorage_server_connections(character varying, character varying, character varying, character varying, character varying, text, integer, text, character varying, character varying, character varying, smallint, smallint, uuid) cascade; > drop function if exists public.insertstoragedevice(uuid, text, character varying, character varying, uuid, text, character varying, text, character varying, text, bigint, boolean, boolean) cascade; > drop function if exists public.insertstoragedomaindr(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.insertstoragedomainovfinfo(uuid, integer, uuid, text) cascade; > drop function if exists public.insertstorageqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.insertstorageserverconnectionextension(uuid, uuid, character varying, text, text) cascade; > drop function if exists public.insertsupportedclusterfeature(uuid, uuid, boolean) cascade; > drop function if exists public.insertsupportedhostfeature(uuid, character varying) cascade; > drop function if exists public.inserttags(character varying, uuid, character varying, uuid, boolean, integer) cascade; > drop function if exists public.inserttags_user_group_map(uuid, uuid) cascade; > drop function if exists public.inserttags_user_map(uuid, uuid) cascade; > drop function if exists public.inserttags_vds_map(uuid, uuid) cascade; > drop function if exists public.inserttags_vm_map(uuid, uuid, integer) cascade; > drop function if exists public.inserttags_vm_pool_map(uuid, uuid) cascade; > drop function if exists public.insertunregistereddisk(uuid, uuid, character varying, character varying, uuid, timestamp with time zone, timestamp with time zone, integer, integer, bigint, bigint) cascade; > drop function if exists public.insertunregistereddiskstovms(uuid, uuid, character varying, uuid) cascade; > drop function if exists public.insertuser(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, text, character varying) cascade; > drop function if exists public.insertuserprofile(uuid, uuid, uuid, text) cascade; > drop function if exists public.insertvdcoption(character varying, character varying, character varying, integer) cascade; > drop function if exists public.insertvds_interface(character varying, character varying, integer, character varying, boolean, uuid, boolean, character varying, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, uuid, character varying, integer, integer, boolean, text, integer, character varying, integer, character varying, character varying, integer, character varying) cascade; > drop function if exists public.insertvds_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.insertvds_spm_id_map(uuid, uuid, integer) cascade; > drop function if exists public.insertvdsdynamic(integer, integer, character varying, numeric, character varying, boolean, integer, integer, integer, uuid, integer, integer, integer, integer, integer, integer, integer, integer, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, integer, boolean, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, integer, text, character varying, character varying, character varying, character varying, character varying, character varying, text, text, boolean, smallint, integer, smallint, boolean, character varying, text, boolean, boolean, text, boolean, boolean, jsonb, boolean, jsonb) cascade; > drop function if exists public.insertvdsstatic(text, uuid, character varying, character varying, integer, uuid, character varying, boolean, integer, boolean, character varying, boolean, integer, character varying, character varying, integer, character varying, boolean, uuid, uuid, text, text, integer) cascade; > drop function if exists public.insertvdsstatistics(numeric, numeric, numeric, numeric, integer, integer, integer, uuid, bigint, bigint, bigint, bigint, bigint, integer, bigint, boolean, integer, bigint, integer, boolean, boolean, boolean, boolean, timestamp with time zone, text) cascade; > drop function if exists public.insertvfsconfiglabel(uuid, text) cascade; > drop function if exists public.insertvfsconfignetwork(uuid, uuid) cascade; > drop function if exists public.insertvm_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.insertvm_pool_map(uuid, uuid) cascade; > drop function if exists public.insertvm_pools(character varying, text, uuid, character varying, integer, boolean, character varying, integer, uuid, smallint, character varying, boolean) cascade; > drop function if exists public.insertvmbackup(uuid, uuid, uuid, uuid, text, timestamp with time zone) cascade; > drop function if exists public.insertvmbackupdiskmap(uuid, uuid) cascade; > drop function if exists public.insertvmcheckpoint(uuid, uuid, uuid, timestamp with time zone) cascade; > drop function if exists public.insertvmcheckpointdiskmap(uuid, uuid) cascade; > drop function if exists public.insertvmdevice(uuid, uuid, character varying, character varying, character varying, text, boolean, boolean, boolean, character varying, text, uuid, character varying, character varying) cascade; > drop function if exists public.insertvmdynamic(text, character varying, character varying, character varying, uuid, character varying, uuid, uuid, integer, uuid, character varying, character varying, character varying, timestamp with time zone, timestamp with time zone, bigint, timestamp with time zone, boolean, integer, integer, integer, character varying, integer, integer, integer, character varying, integer, numeric, character varying, boolean, boolean, character varying, character varying, character varying, integer, integer, integer, integer, character varying, integer, character varying, integer, integer, integer, character varying, integer, character varying, character varying, character varying, character varying, character varying, text) cascade; > drop function if exists public.insertvmguestagentinterface(uuid, character varying, character varying, text, text) cascade; > drop function if exists public.insertvmicon(uuid, text) cascade; > drop function if exists public.insertvmicondefault(uuid, integer, uuid, uuid) cascade; > drop function if exists public.insertvminit(uuid, text, text, text, boolean, character varying, text, text, text, text, character varying, text, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.insertvminterface(uuid, character varying, character varying, integer, uuid, uuid, uuid, integer, boolean) cascade; > drop function if exists public.insertvminterfacefilterparameter(uuid, character varying, character varying, uuid) cascade; > drop function if exists public.insertvmjobs(uuid, uuid, integer, integer, integer, integer, bigint, bigint, uuid) cascade; > drop function if exists public.insertvmstatic(character varying, text, integer, integer, integer, integer, uuid, uuid, character varying, uuid, timestamp with time zone, integer, boolean, boolean, boolean, integer, integer, integer, integer, character varying, boolean, boolean, boolean, boolean, character varying, text, integer, integer, integer, integer, integer, integer, character varying, integer, character varying, character varying, character varying, integer, character varying, character varying, integer, uuid, character varying, boolean, boolean, character varying, boolean, uuid, uuid, uuid, uuid, character varying, integer, integer, smallint, character varying, boolean, character varying, boolean, boolean, uuid, boolean, boolean, character varying, integer, character varying, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.insertvmstatistics(numeric, numeric, numeric, integer, integer, integer, text, uuid, bigint, bigint) cascade; > drop function if exists public.insertvmtemplate(integer, timestamp with time zone, character varying, text, integer, integer, integer, character varying, integer, integer, integer, integer, uuid, uuid, integer, boolean, boolean, integer, integer, character varying, integer, integer, integer, integer, integer, integer, boolean, boolean, boolean, boolean, character varying, boolean, character varying, integer, character varying, character varying, character varying, uuid, integer, text, boolean, character varying, integer, boolean, uuid, character varying, integer, uuid, character varying, smallint, character varying, boolean, boolean, boolean, uuid, character varying, boolean, boolean, character varying, character varying, character varying, integer, character varying, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.insertvnicprofile(uuid, character varying, uuid, uuid, boolean, boolean, boolean, text, text, uuid) cascade; > drop function if exists public.inst_add_glance_provider(uuid, character varying, character varying, character varying, uuid, boolean, character varying, text, text, character varying) cascade; > drop function if exists public.inst_add_iso_storage_domain(uuid, character varying, uuid, character varying, integer, integer) cascade; > drop function if exists public.inst_update_default_storage_pool_type(boolean) cascade; > drop function if exists public.inst_update_service_type(uuid, boolean, boolean) cascade; > drop function if exists public.isanyvmrunonvds(uuid) cascade; > drop function if exists public.ismemballoonenabled(uuid) cascade; > drop function if exists public.isquotainuse(uuid) cascade; > drop function if exists public.isvmiconexist(uuid) cascade; > drop function if exists public.loadovfdataforids(character varying) cascade; > drop function if exists public.loadstoragedomaininfobydiskid(uuid) cascade; > drop function if exists public.loadstoragedomaininfobydomainid(uuid) cascade; > drop function if exists public.loadstoragedomainsforovfids(text) cascade; > drop function if exists public.logenginebackupevent(character varying, timestamp with time zone, integer, text, character varying, text) cascade; > drop function if exists public.markhostdevicesusedbyvmid(uuid, uuid) cascade; > drop function if exists public.nullifyqosforstoragedomain(uuid) cascade; > drop function if exists public.remove_entities_from_storage_domain(uuid) cascade; > drop function if exists public.removeallunmanageddevicesbyvmid(uuid) cascade; > drop function if exists public.removeallvmtagsbyvmid(uuid) cascade; > drop function if exists public.removeauditlogbybrickidlogtype(uuid, integer) cascade; > drop function if exists public.removeconnectionfromiscsibond(uuid, character varying) cascade; > drop function if exists public.removediskfromunregistered(uuid, uuid) cascade; > drop function if exists public.removediskfromunregisteredrelatedtovm(uuid, uuid) cascade; > drop function if exists public.removeentityfromunregistered(uuid, uuid) cascade; > drop function if exists public.removefinishedkdumpstatusforvds(uuid) cascade; > drop function if exists public.removememoryfromsnapshotbysnapshotid(uuid) cascade; > drop function if exists public.removememoryfromsnapshotbyvmidandtype(uuid, character varying) cascade; > drop function if exists public.removenetworkattachmentbynetworkid(uuid) cascade; > drop function if exists public.removenetworkfromiscsibond(uuid, uuid) cascade; > drop function if exists public.removesupportedhostfeature(uuid, character varying) cascade; > drop function if exists public.removevdsfromaffinitygroups(uuid) cascade; > drop function if exists public.removevmfromaffinitygroups(uuid) cascade; > drop function if exists public.set_network_exclusively_as_default_role_network(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_display(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_gluster(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_management(uuid, uuid) cascade; > drop function if exists public.set_network_exclusively_as_migration(uuid, uuid) cascade; > drop function if exists public.setallauditlogalerts(integer, boolean) cascade; > drop function if exists public.sethashbyvmguid(uuid, character varying) cascade; > drop function if exists public.settounknown(uuid[], integer) cascade; > drop function if exists public.setvmidonhostdevice(uuid, character varying, uuid) cascade; > drop function if exists public.setvmpoolbeingdestroyed(uuid, boolean) cascade; > drop function if exists public.sso_oauth_client_exists(character varying) cascade; > drop function if exists public.sso_oauth_register_client(character varying, character varying, character varying, character varying, character varying, text, character varying, boolean, character varying, character varying, boolean, boolean) cascade; > drop function if exists public.sso_oauth_unregister_client(character varying) cascade; > drop function if exists public.update_oauth_client(character varying, character varying, character varying, character varying, text, character varying, boolean, character varying) cascade; > drop function if exists public.update_oauth_client_callback_prefix(character varying, character varying) cascade; > drop function if exists public.updateaffinitygroupwithmembers(uuid, character varying, character varying, uuid, boolean, boolean, boolean, boolean, boolean, boolean, uuid[], uuid[]) cascade; > drop function if exists public.updateasync_tasks(integer, integer, integer, uuid, uuid, uuid, uuid, uuid, uuid, uuid) cascade; > drop function if exists public.updatebasedisk(uuid, boolean, character varying, character varying, character varying, boolean, integer, smallint, character varying, smallint, character varying) cascade; > drop function if exists public.updatebookmark(uuid, character varying, character varying) cascade; > drop function if exists public.updatecinderstorage(uuid, jsonb, text) cascade; > drop function if exists public.updatecluster(character varying, text, character varying, uuid, character varying, uuid, integer, boolean, character varying, boolean, integer, boolean, boolean, boolean, boolean, character varying, boolean, boolean, boolean, uuid, text, boolean, integer, smallint, character varying, boolean, smallint, character varying, character varying, boolean, boolean, smallint, boolean, boolean, boolean, character varying, boolean, character varying, integer, uuid, uuid, character varying, boolean, boolean, integer, uuid, integer, smallint, boolean) cascade; > drop function if exists public.updateclusteremulatedmachine(uuid, character varying, boolean) cascade; > drop function if exists public.updateclusterfeature(uuid, character varying, character varying, integer, text) cascade; > drop function if exists public.updateclusterpolicy(uuid, character varying, character varying, boolean, boolean, text) cascade; > drop function if exists public.updatecommandentity(uuid, bigint, uuid, integer, uuid, uuid, text, text, character varying, character varying, boolean, boolean, text, character varying, text) cascade; > drop function if exists public.updatecommandentityexecuted(uuid, boolean) cascade; > drop function if exists public.updatecommandentitynotified(uuid, boolean) cascade; > drop function if exists public.updatecommandentitystatus(uuid, character varying) cascade; > drop function if exists public.updateconfigbyclusteridandname(uuid, character varying, character varying) cascade; > drop function if exists public.updateconfigbyvolumeididandname(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updateconsoleuserwithoptimisticlocking(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updatecpuflags(uuid, character varying) cascade; > drop function if exists public.updatecpuprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.updatecpuqos(uuid, smallint, character varying, text, uuid, integer) cascade; > drop function if exists public.updatecustom_actions(integer, character varying, character varying, integer, character varying) cascade; > drop function if exists public.updatededicatedhoststovm(uuid, text) cascade; > drop function if exists public.updatedisk_image_dynamic(uuid, integer, integer, bigint, numeric, numeric, numeric) cascade; > drop function if exists public.updatedisk_image_dynamic_by_disk_id_and_vm_id(uuid, uuid, integer, integer, bigint, numeric, numeric, numeric) cascade; > drop function if exists public.updatediskprofile(uuid, character varying, uuid, uuid, text) cascade; > drop function if exists public.updatediskprofilebyimagegroupid(uuid, uuid, uuid) cascade; > drop function if exists public.updatediskvmelement(uuid, uuid, boolean, boolean, character varying, boolean) cascade; > drop function if exists public.updatednsresolverconfiguration(uuid) cascade; > drop function if exists public.updatedwhhistorytimekeeping(character varying, character varying, timestamp with time zone) cascade; > drop function if exists public.updateexternalvariable(character varying, character varying) cascade; > drop function if exists public.updatefenceagent(uuid, uuid, integer, character varying, character varying, character varying, text, text, boolean, integer) cascade; > drop function if exists public.updateglusterbricktaskbyserveridbrickdir(uuid, character varying, uuid) cascade; > drop function if exists public.updateglusterclusterservice(uuid, character varying, character varying) cascade; > drop function if exists public.updateglustergeorepsession(uuid, character varying, uuid, uuid) cascade; > drop function if exists public.updateglustergeorepsessionconfig(uuid, character varying, character varying) cascade; > drop function if exists public.updateglustergeorepsessiondetail(uuid, uuid, character varying, uuid, character varying, character varying, character varying, bigint, bigint, bigint, bigint, timestamp without time zone, timestamp without time zone, timestamp without time zone, boolean) cascade; > drop function if exists public.updateglusterhook(uuid, character varying, character varying, character varying, text, integer) cascade; > drop function if exists public.updateglusterhookconflictstatus(uuid, integer) cascade; > drop function if exists public.updateglusterhookcontent(uuid, character varying, text) cascade; > drop function if exists public.updateglusterhookcontenttype(uuid, character varying) cascade; > drop function if exists public.updateglusterhookstatus(uuid, character varying) cascade; > drop function if exists public.updateglusterserver(uuid, uuid) cascade; > drop function if exists public.updateglusterserverhook(uuid, uuid, character varying, character varying, character varying) cascade; > drop function if exists public.updateglusterserverhookchecksum(uuid, uuid, character varying) cascade; > drop function if exists public.updateglusterserverhookstatus(uuid, uuid, character varying) cascade; > drop function if exists public.updateglusterserverknownaddresses(uuid, character varying) cascade; > drop function if exists public.updateglusterserverpeerstatus(uuid, character varying) cascade; > drop function if exists public.updateglusterserverservice(uuid, integer, character varying, character varying) cascade; > drop function if exists public.updateglusterserverservicebyserveridandservicetype(uuid, uuid, integer, character varying, character varying) cascade; > drop function if exists public.updateglustervolume(uuid, uuid, character varying, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.updateglustervolumeasynctask(uuid, uuid) cascade; > drop function if exists public.updateglustervolumebrick(uuid, uuid, uuid, character varying, character varying, uuid, boolean) cascade; > drop function if exists public.updateglustervolumebrickasynctask(uuid, uuid) cascade; > drop function if exists public.updateglustervolumebrickdetails(uuid, bigint, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.updateglustervolumebricknetworkid(uuid, uuid) cascade; > drop function if exists public.updateglustervolumebrickorder(uuid, integer) cascade; > drop function if exists public.updateglustervolumebrickstatus(uuid, character varying) cascade; > drop function if exists public.updateglustervolumebrickunsyncedentries(uuid, integer, text) cascade; > drop function if exists public.updateglustervolumedetails(uuid, bigint, bigint, bigint, bigint, integer) cascade; > drop function if exists public.updateglustervolumeoption(uuid, character varying) cascade; > drop function if exists public.updateglustervolumesnapshotschedulebyvolumeid(uuid, character varying, character varying, character varying, character varying, character varying, integer, timestamp with time zone, time without time zone, character varying, timestamp with time zone) cascade; > drop function if exists public.updateglustervolumesnapshotstatus(uuid, character varying) cascade; > drop function if exists public.updateglustervolumesnapshotstatusbyname(uuid, character varying, character varying) cascade; > drop function if exists public.updateglustervolumestatus(uuid, character varying) cascade; > drop function if exists public.updateglustervolumestatusbyname(uuid, character varying, character varying) cascade; > drop function if exists public.updategroup(uuid, character varying, character varying, character varying, text, character varying) cascade; > drop function if exists public.updatehostdevice(uuid, character varying, character varying, character varying, integer, character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying, boolean, character varying, text) cascade; > drop function if exists public.updatehostexternalstatus(uuid, integer) cascade; > drop function if exists public.updatehostnetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer) cascade; > drop function if exists public.updatehostnicvfsconfig(uuid, uuid, boolean) cascade; > drop function if exists public.updatehostproviderbinding(uuid, character varying[], character varying[]) cascade; > drop function if exists public.updateimage(timestamp with time zone, uuid, uuid, bigint, uuid, integer, timestamp with time zone, uuid, integer, integer, uuid, boolean, smallint, integer) cascade; > drop function if exists public.updateimagesize(uuid, bigint, timestamp with time zone) cascade; > drop function if exists public.updateimagestatus(uuid, integer) cascade; > drop function if exists public.updateimageuploads(uuid, integer, integer, integer, boolean, timestamp without time zone, character varying, uuid, uuid, uuid, character varying, character varying, character varying, bigint, bigint, integer) cascade; > drop function if exists public.updateimagevmsnapshotid(uuid, uuid) cascade; > drop function if exists public.updateiscsibond(uuid, character varying, character varying) cascade; > drop function if exists public.updateisfreeflagbyid(uuid, boolean) cascade; > drop function if exists public.updateisinitialized(uuid, boolean) cascade; > drop function if exists public.updatejob(uuid, character varying, text, character varying, uuid, bigint, boolean, timestamp with time zone, timestamp with time zone, timestamp with time zone, character varying, boolean, boolean) cascade; > drop function if exists public.updatejoblastupdatetime(uuid, timestamp with time zone) cascade; > drop function if exists public.updatejobstepscompleted(uuid, character varying, timestamp with time zone) cascade; > drop function if exists public.updatelabel(uuid, character varying, boolean, uuid[], uuid[]) cascade; > drop function if exists public.updatelabelsforhost(uuid, uuid[]) cascade; > drop function if exists public.updatelabelsforvm(uuid, uuid[]) cascade; > drop function if exists public.updatelastadmincheckstatus(character varying) cascade; > drop function if exists public.updatelibvirtsecret(uuid, text, integer, text, uuid) cascade; > drop function if exists public.updatelun_storage_server_connection_map(character varying, character varying) cascade; > drop function if exists public.updateluns(character varying, character varying, character varying, character varying, integer, character varying, character varying, integer, bigint) cascade; > drop function if exists public.updatemacpool(uuid, character varying, boolean, character varying) cascade; > drop function if exists public.updatememory(uuid, uuid, uuid, character varying) cascade; > drop function if exists public.updatenetwork(character varying, character varying, text, uuid, character varying, character varying, character varying, character varying, integer, integer, boolean, uuid, integer, boolean, uuid, text, uuid, uuid, text, uuid) cascade; > drop function if exists public.updatenetwork_cluster(uuid, uuid, integer, boolean, boolean, boolean, boolean, boolean, boolean) cascade; > drop function if exists public.updatenetwork_cluster_status(uuid, uuid, integer) cascade; > drop function if exists public.updatenetworkattachment(uuid, uuid, uuid, character varying, character varying, character varying, character varying, character varying, character varying, integer, character varying, text, uuid) cascade; > drop function if exists public.updatenetworkqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.updatenumanode(uuid, smallint, bigint, smallint, text) cascade; > drop function if exists public.updatenumanodestatistics(uuid, bigint, integer, numeric, numeric, numeric, integer) cascade; > drop function if exists public.updateoriginaltemplatename(uuid, character varying) cascade; > drop function if exists public.updateovfgenerations(character varying, character varying, text, character varying) cascade; > drop function if exists public.updateovfupdatedinfo(character varying, integer, integer) cascade; > drop function if exists public.updateovirtguestagentstatus(uuid, integer) cascade; > drop function if exists public.updatepolicyunit(uuid, boolean, text, text) cascade; > drop function if exists public.updateprovider(uuid, character varying, character varying, character varying, character varying, boolean, character varying, text, text, character varying, character varying, text, text, text, boolean, boolean, boolean, character varying, character varying, character varying) cascade; > drop function if exists public.updateqemuguestagentstatus(uuid, integer) cascade; > drop function if exists public.updatequotaforimageandsnapshots(uuid, uuid, uuid) cascade; > drop function if exists public.updatequotametadata(uuid, uuid, character varying, character varying, integer, integer, integer, integer, boolean) cascade; > drop function if exists public.updatereplicacount(uuid, integer) cascade; > drop function if exists public.updaterole(character varying, uuid, character varying, boolean, integer, boolean) cascade; > drop function if exists public.updatesnapshot(uuid, uuid, character varying, character varying, character varying, timestamp with time zone, text, text, uuid, uuid, boolean) cascade; > drop function if exists public.updatesnapshotcountdec(uuid, integer) cascade; > drop function if exists public.updatesnapshotcountinc(uuid, integer) cascade; > drop function if exists public.updatesnapshotid(uuid, uuid) cascade; > drop function if exists public.updatesnapshotstatus(uuid, character varying) cascade; > drop function if exists public.updatestartedexecutionentitiestounknown(timestamp with time zone) cascade; > drop function if exists public.updatestatusofimagesbyimagegroupid(uuid, integer) cascade; > drop function if exists public.updatestep(uuid, uuid, uuid, character varying, text, integer, character varying, smallint, timestamp with time zone, timestamp with time zone, character varying, uuid, character varying) cascade; > drop function if exists public.updatestepexternalidandtype(uuid, uuid, character varying) cascade; > drop function if exists public.updatestepprogress(uuid, smallint) cascade; > drop function if exists public.updatestepstatusandendtime(uuid, character varying, timestamp with time zone) cascade; > drop function if exists public.updatestorage_domain_dynamic(integer, uuid, integer) cascade; > drop function if exists public.updatestorage_domain_static(uuid, character varying, character varying, character varying, text, integer, integer, integer, bigint, boolean, boolean, character varying, character varying, integer, integer, integer, boolean, integer) cascade; > drop function if exists public.updatestorage_pool(character varying, text, uuid, character varying, integer, boolean, character varying, integer, uuid, character varying, integer) cascade; > drop function if exists public.updatestorage_pool_iso_map_status(uuid, uuid, integer) cascade; > drop function if exists public.updatestorage_pool_partial(character varying, text, uuid, character varying, boolean, character varying, character varying, integer) cascade; > drop function if exists public.updatestorage_pool_status(uuid, integer) cascade; > drop function if exists public.updatestorage_server_connections(character varying, character varying, character varying, text, integer, character varying, character varying, text, character varying, character varying, character varying, smallint, smallint, uuid) cascade; > drop function if exists public.updatestoragedevice(uuid, text, character varying, character varying, text, character varying, text, character varying, text, bigint, boolean) cascade; > drop function if exists public.updatestoragedomainconfirmedsize(integer, integer, uuid) cascade; > drop function if exists public.updatestoragedomaindr(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updatestoragedomainexternalstatus(uuid, integer) cascade; > drop function if exists public.updatestoragedomainovfinfo(uuid, integer, uuid, text, timestamp with time zone) cascade; > drop function if exists public.updatestorageqos(uuid, smallint, character varying, text, uuid, integer, integer, integer, integer, integer, integer) cascade; > drop function if exists public.updatestorageserverconnectionextension(uuid, uuid, character varying, text, text) cascade; > drop function if exists public.updatesupportedclusterfeature(uuid, uuid, boolean) cascade; > drop function if exists public.updatetags(character varying, uuid, character varying, uuid, boolean, integer) cascade; > drop function if exists public.updatetags_vm_pool_map(integer, integer) cascade; > drop function if exists public.updateuser(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, boolean, text, character varying) cascade; > drop function if exists public.updateuserimpl(character varying, character varying, character varying, character varying, character varying, character varying, uuid, character varying, text, character varying) cascade; > drop function if exists public.updateuserprofile(uuid, uuid, uuid, text) cascade; > drop function if exists public.updatevdcoption(character varying, character varying, integer, character varying) cascade; > drop function if exists public.updatevds_interface(character varying, character varying, integer, character varying, boolean, uuid, boolean, character varying, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, uuid, character varying, integer, integer, boolean, text, character varying, character varying, integer, integer, character varying, integer, character varying) cascade; > drop function if exists public.updatevds_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.updatevdsdynamic(integer, integer, character varying, numeric, character varying, boolean, integer, integer, integer, uuid, integer, integer, integer, integer, integer, integer, integer, integer, character varying, character varying, character varying, character varying, integer, character varying, integer, integer, integer, boolean, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, integer, text, integer, character varying, character varying, character varying, character varying, character varying, character varying, text, text, smallint, integer, smallint, boolean, character varying, text, text, boolean, boolean, text, character varying, boolean, boolean, jsonb, boolean, jsonb) cascade; > drop function if exists public.updatevdsdynamicisupdateavailable(uuid, boolean) cascade; > drop function if exists public.updatevdsdynamicnetconfigdirty(uuid, boolean) cascade; > drop function if exists public.updatevdsdynamicpowermanagementpolicyflag(uuid, boolean) cascade; > drop function if exists public.updatevdsdynamicstatus(uuid, integer) cascade; > drop function if exists public.updatevdsdynamicstatusandreasons(uuid, integer, integer, text) cascade; > drop function if exists public.updatevdsreinstallrequired(uuid, boolean) cascade; > drop function if exists public.updatevdsstatic(character varying, text, character varying, integer, uuid, uuid, character varying, boolean, integer, boolean, character varying, boolean, bigint, integer, character varying, character varying, integer, character varying, boolean, uuid, uuid, text, boolean, integer) cascade; > drop function if exists public.updatevdsstaticlaststoredkernelcmdline(uuid, text) cascade; > drop function if exists public.updatevdsstatistics(numeric, numeric, numeric, numeric, integer, integer, integer, uuid, bigint, bigint, bigint, bigint, bigint, integer, bigint, boolean, integer, bigint, integer, boolean, boolean, boolean, boolean, timestamp with time zone, text) cascade; > drop function if exists public.updatevm_interface_statistics(uuid, numeric, numeric, bigint, bigint, numeric, numeric, bigint, bigint, integer, double precision, uuid) cascade; > drop function if exists public.updatevm_pool_map(uuid, uuid) cascade; > drop function if exists public.updatevm_pools(character varying, text, uuid, character varying, integer, boolean, character varying, integer, uuid, smallint, character varying, boolean) cascade; > drop function if exists public.updatevmbackup(uuid, uuid, uuid, uuid, text) cascade; > drop function if exists public.updatevmbackupdiskmap(uuid, uuid, text) cascade; > drop function if exists public.updatevmcpuprofileidforclusterid(uuid, uuid) cascade; > drop function if exists public.updatevmdevice(uuid, uuid, character varying, character varying, character varying, text, boolean, boolean, boolean, character varying, text, uuid, character varying, character varying) cascade; > drop function if exists public.updatevmdeviceforhotplugdisk(uuid, uuid, boolean, character varying) cascade; > drop function if exists public.updatevmdeviceruntimeinfo(uuid, uuid, character varying, character varying) cascade; > drop function if exists public.updatevmdynamic(text, character varying, character varying, character varying, uuid, character varying, uuid, uuid, integer, uuid, character varying, character varying, character varying, timestamp with time zone, timestamp with time zone, bigint, timestamp with time zone, boolean, integer, integer, integer, character varying, integer, integer, integer, character varying, integer, numeric, character varying, boolean, boolean, character varying, character varying, character varying, character varying, integer, integer, integer, integer, character varying, integer, character varying, integer, integer, integer, character varying, integer, character varying, character varying, character varying, character varying, character varying, text) cascade; > drop function if exists public.updatevmdynamicstatus(uuid, integer) cascade; > drop function if exists public.updatevmicon(uuid, text) cascade; > drop function if exists public.updatevmicondefault(uuid, integer, uuid, uuid) cascade; > drop function if exists public.updatevminit(uuid, text, text, text, boolean, character varying, text, text, text, text, character varying, text, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying) cascade; > drop function if exists public.updatevminterface(uuid, character varying, character varying, integer, uuid, uuid, uuid, integer, boolean) cascade; > drop function if exists public.updatevminterfacefilterparameter(uuid, character varying, character varying) cascade; > drop function if exists public.updatevmjobs(uuid, uuid, integer, integer, integer, integer, bigint, bigint, uuid) cascade; > drop function if exists public.updatevmleaseinfo(uuid, character varying) cascade; > drop function if exists public.updatevmleasestoragedomainid(uuid, uuid) cascade; > drop function if exists public.updatevmstatic(character varying, text, integer, integer, integer, integer, uuid, uuid, character varying, uuid, timestamp with time zone, integer, boolean, boolean, boolean, integer, integer, integer, integer, character varying, boolean, boolean, boolean, boolean, character varying, text, integer, integer, integer, integer, integer, integer, character varying, integer, character varying, character varying, character varying, integer, character varying, character varying, integer, uuid, character varying, boolean, boolean, character varying, boolean, uuid, uuid, uuid, uuid, character varying, integer, integer, smallint, character varying, boolean, character varying, boolean, boolean, uuid, boolean, boolean, character varying, integer, character varying, uuid, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.updatevmstatistics(numeric, numeric, numeric, integer, integer, integer, text, uuid, bigint, bigint) cascade; > drop function if exists public.updatevmtagsdefaultdisplaytype(uuid, uuid, integer) cascade; > drop function if exists public.updatevmtemplate(integer, timestamp with time zone, character varying, text, integer, integer, integer, character varying, integer, integer, integer, integer, uuid, uuid, integer, boolean, boolean, integer, integer, character varying, integer, integer, integer, integer, integer, integer, boolean, boolean, boolean, boolean, character varying, boolean, character varying, integer, character varying, character varying, character varying, uuid, integer, text, boolean, character varying, integer, boolean, uuid, character varying, integer, character varying, smallint, character varying, boolean, boolean, boolean, uuid, character varying, boolean, boolean, character varying, character varying, character varying, integer, character varying, uuid, uuid, character varying, character varying, character varying, uuid, uuid, boolean) cascade; > drop function if exists public.updatevmtemplateshiftbasetemplate(uuid) cascade; > drop function if exists public.updatevmtemplatestatus(uuid, integer) cascade; > drop function if exists public.updatevnicprofile(uuid, character varying, uuid, uuid, boolean, boolean, boolean, text, text, uuid) cascade; > drop function if exists public.upsertexternalvariable(character varying, character varying) cascade; > drop function if exists public.upsertkdumpstatus(uuid, character varying, character varying) cascade; > drop function if exists public.upsertkdumpstatusforip(character varying, character varying, character varying) cascade; >************************** > >DROP FUNCTION >2019-02-26 17:06:37,799+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/create_functions.sql >********* QUERY ********** >DROP TYPE IF EXISTS idTextType CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE idtexttype AS (id TEXT); >************************** > >CREATE TYPE >********* QUERY ********** >DROP TYPE IF EXISTS idUuidType CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE iduuidtype AS (id uuid); >************************** > >CREATE TYPE >********* QUERY ********** >DROP TYPE IF EXISTS booleanResultType CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE booleanresulttype AS (result boolean); >************************** > >CREATE TYPE >********* QUERY ********** >DROP TYPE IF EXISTS authzEntryInfoType CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE authzentryinfotype AS ( > name TEXT, > namespace VARCHAR(2048), > authz VARCHAR(255) >); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION getGlobalIds (v_name VARCHAR(4000)) >RETURNS UUID IMMUTABLE STRICT AS $FUNCTION$ > >DECLARE v_id UUID; > >BEGIN > IF (v_name = 'system') THEN > v_id := 'AAA00000-0000-0000-0000-123456789AAA'; > ELSIF(v_name = 'everyone') THEN > v_id := 'EEE00000-0000-0000-0000-123456789EEE'; > > -- bottom is an object which all the objects in the system are its parents > -- useful to denote we want all objects when checking for permissions > ELSIF(v_name = 'bottom') THEN > v_id := 'BBB00000-0000-0000-0000-123456789BBB'; > END IF; > > RETURN v_id; >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION public.fnSplitterInteger(ids TEXT) >RETURNS SETOF INTEGER IMMUTABLE AS >$FUNCTION$ >BEGIN > RETURN QUERY > SELECT CAST(regexp_split_to_table(ids, ',') AS INTEGER); >END; $FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION PUBLIC.fnSplitter (ids TEXT) >RETURNS SETOF idTextType IMMUTABLE >AS $FUNCTION$ > >BEGIN > RETURN QUERY > > SELECT regexp_split_to_table(ids, ',') AS id; >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fnSplitterUuid (ids TEXT) >RETURNS SETOF UUID IMMUTABLE AS $FUNCTION$ > >BEGIN > IF ids != '' THEN > RETURN QUERY > SELECT CAST(regexp_split_to_table(ids, ',') AS UUID); > END IF; > >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION PUBLIC.fnSplitterWithSeperator ( > ids TEXT, > separator VARCHAR(10) > ) >RETURNS SETOF idTextType IMMUTABLE >AS $FUNCTION$ > >BEGIN > RETURN QUERY > > SELECT regexp_split_to_table(ids, separator) AS id; >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS user_permissions CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE user_permissions AS ( > permission_id uuid, > role_id uuid, > user_id uuid >); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION PUBLIC.fn_user_permissions (v_userId IN uuid) >RETURNS SETOF user_permissions STABLE AS $FUNCTION$ > >DECLARE > >BEGIN > RETURN QUERY > > SELECT permissions.id AS permission_id, > permissions.role_id, > permissions.ad_element_id AS user_id > FROM permissions > INNER JOIN users > ON permissions.ad_element_id = users.user_id > WHERE users.user_id = v_userId > > UNION > > SELECT > permissions.id AS permission_id, > permissions.role_id, > TEMP.user_id AS user_id > FROM permissions > INNER JOIN ( > -- get all groups of admin users > SELECT > ad_groups.id group_id, > users.user_id > FROM > ad_groups, > engine_sessions > WHERE ad_groups.id IN ( > SELECT * > FROM fnsplitteruuid(engine_sessions.group_ids) > ) > AND users.user_id = v_userId > ) TEMP > ON permissions.ad_element_id = TEMP.group_id; >END;$FUNCTION$ >LANGUAGE 'plpgsql'; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION PUBLIC.fn_get_entity_parents ( > v_entity_id IN uuid, > v_object_type IN int4 > ) >RETURNS SETOF idUuidType STABLE AS $FUNCTION$ > >/*Gets a list of all parent GUID to the system root (including) > >Object Types (compatible with VdcObjectType, XXX entries are unused currently) >Unknown XXX, >System XXX, > Bottom = 0, > VM = 2, > VDS = 3, > VmTemplate = 4, > VmPool = 5, > AdElements XXX, > Tags XXX, > Bookmarks XXX, > Cluster = 9, > MultiLevelAdministration XXX, > Storage = 11, > EventNotification XXX, > ImportExport XXX, > StoragePool = 14, > User = 15, > Role = 16, > Quota = 17, > GlusterVolume = 18, > Disk = 19, > Network = 20, > VNICProfile = 27, > MacPool = 28 > DiskProfile = 29 > CpuProfile = 30 >*/ >DECLARE > v_entity_type int4 := v_object_type; > system_root_id uuid; > v_cluster_id uuid; > ds_id uuid; > v_image_id uuid; > v_storage_id uuid; > v_vm_id uuid; > v_storage_pool_id uuid; > v_profile_network_id uuid; > v_disk_profile_storage_id uuid; > v_cpu_profile_cluster_id uuid; > >BEGIN > system_root_id := ( > SELECT getGlobalIds('system') > );-- hardcoded also in MLA Handler > CASE > WHEN v_entity_type = 0 > THEN -- Bottom > RETURN QUERY SELECT object_id FROM permissions; > WHEN v_entity_type = 2 > THEN -- VM > -- get cluster id > v_cluster_id := ( > SELECT cluster_id > FROM vm_static > WHERE vm_guid = v_entity_id > ); > -- get data center id > ds_id := ( > SELECT storage_pool_id > FROM cluster > WHERE cluster_id = v_cluster_id > );RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT ds_id AS id > > UNION > > SELECT v_cluster_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 3 > THEN -- VDS > -- get cluster id > v_cluster_id := ( > SELECT cluster_id > FROM vds_static > WHERE vds_id = v_entity_id > ); > -- get data center id > ds_id := ( > SELECT storage_pool_id > FROM cluster > WHERE cluster_id = v_cluster_id > );RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT ds_id AS id > > UNION > > SELECT v_cluster_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 4 > THEN -- Template > -- get image id first > v_image_id := ( > SELECT image_guid > FROM images i > INNER JOIN vm_device vd > ON i.image_group_id = vd.device_id > WHERE vm_id = v_entity_id limit 1 > ); > -- get the storage id from images > v_storage_id := ( > SELECT storage_domain_id > FROM image_storage_domain_map > WHERE image_id = v_image_id limit 1 > ); > -- finally get data center id > ds_id := ( > SELECT storage_pool_id > FROM storage_pool_iso_map > WHERE storage_id = v_storage_id > ); > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT ds_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 5 > THEN -- VM Pool > -- get cluster id > v_cluster_id := ( > SELECT cluster_id > FROM vm_pools > WHERE vm_pool_id = v_entity_id > ); > -- get data center id > ds_id := ( > SELECT storage_pool_id > FROM cluster > WHERE cluster_id = v_cluster_id > ); > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT ds_id AS id > > UNION > > SELECT v_cluster_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 9 > THEN -- Cluster > -- get data center id > ds_id := ( > SELECT storage_pool_id > FROM cluster > WHERE cluster_id = v_entity_id > ); > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT ds_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 11 > THEN -- Storage Domain > RETURN QUERY SELECT system_root_id AS id > > UNION ALL > > SELECT storage_pool_id AS id > FROM storage_pool_iso_map > WHERE storage_id = v_entity_id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 17 > THEN -- Quota > -- get data center id > ds_id := ( > SELECT storage_pool_id > FROM quota > WHERE id = v_entity_id > ); > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT ds_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 18 > THEN -- GlusterVolume > -- get cluster id > v_cluster_id := ( > SELECT v.cluster_id > FROM gluster_volumes v > WHERE id = v_entity_id > ); > -- get data center id > ds_id := ( > SELECT storage_pool_id > FROM cluster > WHERE cluster_id = v_cluster_id > ); > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT ds_id AS id > > UNION > > SELECT v_cluster_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 19 > THEN -- Disk > -- get data center, storage domain and vm > SELECT INTO ds_id, > v_storage_id, > v_vm_id storage_pool_id, > storage_id, > vm_id > FROM images_storage_domain_view > LEFT JOIN vm_device > ON vm_device.device_id = images_storage_domain_view.disk_id > WHERE image_group_id = v_entity_id; > -- get cluster > v_cluster_id := ( > SELECT cluster_id > FROM vm_static > WHERE vm_guid = v_vm_id > ); > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT ds_id AS id > > UNION > > SELECT v_storage_id AS id > > UNION > > SELECT v_vm_id AS id > > UNION > > SELECT v_cluster_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 20 > THEN -- Network > SELECT INTO v_storage_pool_id network.storage_pool_id > FROM network > WHERE network.id = v_entity_id; > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT v_storage_pool_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 27 > THEN -- VNICProfile > SELECT INTO v_profile_network_id vnic_profiles.network_id > FROM vnic_profiles > WHERE vnic_profiles.id = v_entity_id; > > SELECT INTO v_storage_pool_id network.storage_pool_id > FROM network > WHERE network.id = v_profile_network_id; > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT v_storage_pool_id AS id > > UNION > > SELECT v_profile_network_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 29 > THEN -- DiskProfile > SELECT INTO v_disk_profile_storage_id disk_profiles.storage_domain_id > FROM disk_profiles > WHERE disk_profiles.id = v_entity_id; > > SELECT INTO v_storage_pool_id storage_pool_iso_map.storage_pool_id > FROM storage_pool_iso_map > WHERE storage_pool_iso_map.storage_id = v_disk_profile_storage_id; > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT v_storage_pool_id AS id > > UNION > > SELECT v_disk_profile_storage_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 30 > THEN -- CpuProfile > SELECT INTO v_cpu_profile_cluster_id cpu_profiles.cluster_id > FROM cpu_profiles > WHERE cpu_profiles.id = v_entity_id; > > SELECT INTO v_storage_pool_id cluster.storage_pool_id > FROM cluster > WHERE cluster.cluster_id = v_cpu_profile_cluster_id; > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT v_storage_pool_id AS id > > UNION > > SELECT v_cpu_profile_cluster_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 23 > THEN -- Gluster Hook > -- get cluster id > v_cluster_id := ( > SELECT cluster_id > FROM gluster_hooks > WHERE id = v_entity_id > ); > -- get data center id > ds_id := ( > SELECT storage_pool_id > FROM cluster > WHERE cluster_id = v_cluster_id > ); > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT ds_id AS id > > UNION > > SELECT v_cluster_id AS id > > UNION > > SELECT v_entity_id AS id; > WHEN v_entity_type = 25 > THEN -- Gluster Service > -- get cluster id > v_cluster_id := ( > SELECT cluster_id > FROM vds_static > WHERE vds_id = v_entity_id > ); > -- get data center id > ds_id := ( > SELECT storage_pool_id > FROM cluster > WHERE cluster_id = v_cluster_id > ); > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT ds_id AS id > > UNION > > SELECT v_cluster_id AS id > > UNION > > SELECT v_entity_id AS id; > ELSE IF > v_entity_type IN ( > 1, > 14, > 15, > 16, > 28 > ) THEN -- Data Center, users, roles and mac pools are under system > RETURN QUERY SELECT system_root_id AS id > > UNION > > SELECT v_entity_id AS id; > END IF; > > END CASE ; >END;$FUNCTION$ >LANGUAGE 'plpgsql'; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION PUBLIC.fn_authz_entry_info(v_ad_element_id IN uuid) >RETURNS AuthzEntryInfoType STABLE >AS $FUNCTION$ >DECLARE > result authzEntryInfoType; >BEGIN > IF (v_ad_element_id = getGlobalIds('everyone')) THEN > SELECT 'Everyone', > '*', > '' > INTO result; > ELSE > SELECT (COALESCE(name, '') || ' ' || COALESCE(surname, '') || ' (' || COALESCE(username, '') || ')'), > namespace, > domain > INTO result > FROM users > WHERE user_id = v_ad_element_id; > > IF (result IS NULL) THEN > SELECT name, > namespace, > domain > INTO result > FROM ad_groups > WHERE ID = v_ad_element_id; > END IF ; > END IF; > RETURN result; >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION PUBLIC.fn_get_ad_element_name(v_ad_element_id IN uuid) >RETURNS TEXT STABLE >AS $FUNCTION$ >DECLARE > result TEXT; >BEGIN > IF (v_ad_element_id = getGlobalIds('everyone')) THEN > result := 'Everyone'; > ELSE > SELECT (COALESCE(name, '') || ' ' || COALESCE(surname, '') || ' (' || COALESCE(username, '') || '@' || COALESCE(domain, '') || ')') > INTO result > FROM users > WHERE user_id = v_ad_element_id; > > IF (result IS NULL) THEN > SELECT name > INTO result > FROM ad_groups > WHERE ID = v_ad_element_id; > END IF ; > END IF; > RETURN result; >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION PUBLIC.fn_get_entity_name(v_entity_id IN uuid, > v_object_type IN int4 > ) >RETURNS TEXT STABLE >AS $FUNCTION$ > /* Gets object name by its id and type > > Object Types (compatible with VdcObjectType, XXX entries are unused currently) > Unknown XXX, > System XXX, > VM = 2, > VDS = 3, > VmTemplate = 4, > VmPool = 5, > AdElements XXX, > Tags XXX, > Bookmarks XXX, > Cluster = 9, > MultiLevelAdministration XXX, > Storage = 11, > EventNotification XXX, > ImportExport XXX, > StoragePool = 14, > User = 15, > Role = 16, > Quota = 17, > GlusterVolume = 18, > Disk = 19, > Network = 20, > VNICProfile = 27, > MacPool = 28, > DiskProfile = 29 > CpuProfile = 30 >*/ > DECLARE v_entity_type int4 := v_object_type;result TEXT;BEGIN > CASE > WHEN v_entity_type = 1 > THEN result := 'System'; > WHEN v_entity_type = 2 > OR v_entity_type = 4 > THEN result := ( > SELECT vm_name > FROM vm_static > WHERE vm_guid = v_entity_id > ); > WHEN v_entity_type = 3 > THEN result := ( > SELECT vds_name > FROM vds_static > WHERE vds_id = v_entity_id > ); > WHEN v_entity_type = 5 > THEN result := ( > SELECT vm_pool_name > FROM vm_pools > WHERE vm_pool_id = v_entity_id > ); > WHEN v_entity_type = 7 > THEN result := ( > SELECT tag_name > FROM tags > WHERE tag_id = v_entity_id > ); > WHEN v_entity_type = 8 > THEN result := ( > SELECT bookmark_name > FROM bookmarks > WHERE bookmark_id = v_entity_id > ); > WHEN v_entity_type = 9 > THEN result := ( > SELECT name > FROM cluster > WHERE cluster_id = v_entity_id > ); > WHEN v_entity_type = 11 > THEN result := ( > SELECT storage_name > FROM storage_domain_static > WHERE id = v_entity_id > ); > WHEN v_entity_type = 14 > THEN result := ( > SELECT name > FROM storage_pool > WHERE id = v_entity_id > ); > WHEN v_entity_type = 15 > THEN result := ( > SELECT username > FROM users > WHERE user_id = v_entity_id > ); > WHEN v_entity_type = 16 > THEN result := ( > SELECT name > FROM roles > WHERE id = v_entity_id > ); > WHEN v_entity_type = 17 > THEN result := ( > SELECT quota_name > FROM quota > WHERE id = v_entity_id > ); > WHEN v_entity_type = 18 > THEN result := ( > SELECT vol_name > FROM gluster_volumes > WHERE id = v_entity_id > ); > WHEN v_entity_type = 19 > THEN result := ( > SELECT disk_alias > FROM base_disks > WHERE disk_id = v_entity_id > ); > WHEN v_entity_type = 20 > THEN result := ( > SELECT name > FROM network > WHERE id = v_entity_id > ); > WHEN v_entity_type = 23 > THEN result := ( > SELECT CONCAT ( > gluster_command, > '-', > stage, > '-', > name > ) > FROM gluster_hooks > WHERE id = v_entity_id > ); > WHEN v_entity_type = 25 > THEN result := ( > SELECT service_name > FROM gluster_services > WHERE id = v_entity_id > ); > WHEN v_entity_type = 27 > THEN result := ( > SELECT name > FROM vnic_profiles > WHERE id = v_entity_id > ); > WHEN v_entity_type = 28 > THEN result := ( > SELECT name > FROM mac_pools > WHERE id = v_entity_id > ); > WHEN v_entity_type = 29 > THEN result := ( > SELECT name > FROM disk_profiles > WHERE id = v_entity_id > ); > WHEN v_entity_type = 30 > THEN result := ( > SELECT name > FROM cpu_profiles > WHERE id = v_entity_id > ); > ELSE result := 'Unknown type ' || v_entity_type; > END CASE ; > -- This should be written to an error var or include object_id that is missing > -- IF result IS NULL THEN > -- result := v_entity_id || '' NOT FOUND''; > -- END IF; > RETURN result; >END;$FUNCTION$ >LANGUAGE 'plpgsql'; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getUserAndGroupsById(v_id UUID) >RETURNS SETOF idUuidType STABLE >AS $FUNCTION$ >BEGIN > RETURN QUERY > > SELECT ad_groups.ID > FROM ad_groups, > engine_sessions > WHERE engine_sessions.user_id = v_id > AND ad_groups.id IN ( > SELECT * > FROM fnsplitteruuid(engine_sessions.group_ids) > ) > > UNION > SELECT v_id > > UNION > -- user is also member of 'Everyone' > SELECT 'EEE00000-0000-0000-0000-123456789EEE'; >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getElementIdsByIdAndGroups( > v_id UUID, > v_group_ids TEXT > ) >RETURNS SETOF idUuidType IMMUTABLE >AS $FUNCTION$ >BEGIN > RETURN QUERY > SELECT * > FROM fnsplitteruuid(v_group_ids) > > UNION > > SELECT v_id > > UNION > > -- user is also member of 'Everyone' > SELECT 'EEE00000-0000-0000-0000-123456789EEE'; >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF >EXISTS cluster_usage_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE cluster_usage_rs AS ( > virtual_cpu_usage INT, > mem_size_mb_usage BIGINT > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION getNonCountableQutoaVmStatuses() >RETURNS SETOF INT IMMUTABLE >AS $BODY$ >BEGIN >RETURN query > SELECT 0 > > UNION ALL > > SELECT 13 > > UNION ALL > > SELECT 14 > > UNION ALL > > SELECT 15; > --(Down(0), Suspended(13), ImageIllegal(14), ImageLocked(15)) >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION CalculateClusterUsage( > v_quota_id UUID, > v_cluster_id UUID > ) >RETURNS SETOF cluster_usage_rs STABLE >AS $FUNCTION$ >BEGIN > RETURN QUERY > > SELECT cast(COALESCE(sum(num_of_sockets * cpu_per_socket), 0) AS INT) AS virtual_cpu_usage, > COALESCE(sum(mem_size_mb), 0) AS mem_size_mb_usage > FROM vm_static, > vm_dynamic > WHERE quota_id = v_quota_id > AND vm_dynamic.vm_guid = vm_static.vm_guid > AND vm_dynamic.status NOT IN ( > SELECT getNonCountableQutoaVmStatuses() > ) > AND ( > v_cluster_id = vm_static.cluster_id > OR v_cluster_id IS NULL > ); >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS all_cluster_usage_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE all_cluster_usage_rs AS ( > quota_cluster_id uuid, > quota_id uuid, > cluster_id uuid, > cluster_name VARCHAR(40), > virtual_cpu INT, > virtual_cpu_usage INT, > mem_size_mb BIGINT, > mem_size_mb_usage BIGINT > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION calculateAllClusterUsage() >RETURNS SETOF all_cluster_usage_rs STABLE >AS $FUNCTION$ >BEGIN > RETURN QUERY > > SELECT > quota_limitation.id AS quota_cluster_id, > quota_limitation.quota_id AS quota_id, > quota_limitation.cluster_id AS cluster_id, > cluster.name AS cluster_name, > quota_limitation.virtual_cpu, > cast(COALESCE(sum(num_of_sockets * cpu_per_socket * cast(vm_dynamic.status NOT IN ( > SELECT getNonCountableQutoaVmStatuses() > ) AS INT)), 0) AS INT) AS virtual_cpu_usage, > quota_limitation.mem_size_mb, > COALESCE(sum(vm_static.mem_size_mb), 0) AS mem_size_mb_usage > FROM quota_limitation > LEFT JOIN vm_static > ON vm_static.quota_id = quota_limitation.quota_id > LEFT JOIN vm_dynamic > ON vm_dynamic.vm_guid = vm_static.vm_guid > LEFT JOIN cluster > ON cluster.cluster_id = vm_static.cluster_id > WHERE quota_limitation.virtual_cpu IS NOT NULL > AND quota_limitation.mem_size_mb IS NOT NULL > GROUP BY quota_limitation.quota_id, > quota_limitation.cluster_id, > cluster_name, > quota_limitation.virtual_cpu, > quota_limitation.mem_size_mb, > vm_static.quota_id, > cluster.cluster_id, > vm_static.cluster_id, > quota_limitation.id; >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS all_storage_usage_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE all_storage_usage_rs AS ( > quota_storage_id uuid, > quota_id uuid, > storage_id uuid, > storage_name VARCHAR(250), > storage_size_gb BIGINT, > storage_size_gb_usage FLOAT > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION calculateAllStorageUsage() >RETURNS SETOF all_storage_usage_rs STABLE >AS $FUNCTION$ >BEGIN >-- Summarize size of all disks that are active. > RETURN QUERY > > SELECT > quota_limitation.id AS quota_storage_id, > quota_limitation.quota_id AS quota_id, > quota_limitation.storage_id AS storage_id, > storage_domain_static.storage_name, > quota_limitation.storage_size_gb, > cast(COALESCE(sum(size * cast(active AS INT) + disk_image_dynamic.actual_size * cast((NOT active) AS INT)) / 1073741824, 0) AS FLOAT) AS storage_usage > -- 1073741824 is 1024^3 (for GB) > FROM quota_limitation > LEFT JOIN image_storage_domain_map > ON quota_limitation.quota_id = image_storage_domain_map.quota_id > LEFT JOIN images > ON images.image_guid = image_storage_domain_map.image_id > LEFT JOIN disk_image_dynamic > ON images.image_guid = disk_image_dynamic.image_id > LEFT JOIN storage_domain_static > ON image_storage_domain_map.storage_domain_id = storage_domain_static.id > WHERE quota_limitation.storage_size_gb IS NOT NULL > GROUP BY > quota_limitation.quota_id, > storage_id, > quota_limitation.id, > storage_domain_static.storage_name, > quota_limitation.storage_size_gb; >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION CalculateStorageUsage(v_quota_id UUID, v_storage_id UUID) >RETURNS double precision STABLE >AS $FUNCTION$ >DECLARE > v_retVal double precision; >BEGIN > SELECT COALESCE(sum(CASE active WHEN TRUE THEN size ELSE actual_size END) / (1024 * 1024 * 1024),0) > INTO v_retVal > FROM images_storage_domain_view > WHERE quota_id = v_quota_id > AND (v_storage_id IS NULL > OR v_storage_id = storage_id); > RETURN v_retVal; >END; $FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_get_comparable_ip_list(TEXT) >RETURNS inet [] IMMUTABLE STRICT >AS $PROCEDURE$ >BEGIN > CASE > WHEN ($1 IS NULL) > OR ($1 ~ E'^\\s*$') > THEN RETURN NULL; > ELSE > RETURN regexp_split_to_array(trim(both FROM $1), E'\\s+')::inet []; > END CASE ; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_get_dedicated_hosts_ids_by_vm_id(v_vm_id UUID) >RETURNS TEXT STABLE >AS $FUNCTION$ >BEGIN > RETURN array_to_string(array_agg(vds_id), ',') > FROM vm_host_pinning_map > WHERE vm_id = v_vm_id; >END;$FUNCTION$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_get_num_of_vcpus(vm_static) >RETURNS INT IMMUTABLE >AS $PROCEDURE$ > >BEGIN > RETURN $1. num_of_sockets * $1. cpu_per_socket * $1. threads_per_cpu; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:37,826+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/common_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_column ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_column_def TEXT > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > > EXECUTE v_sql; > END; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_drop_column ( > v_table VARCHAR(128), > v_column VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % or Column % does not exist.', > v_table, > v_column; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_change_column_type ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_type VARCHAR(128), > v_new_type VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > AND ( > udt_name ilike v_type > OR data_type ilike v_type > ) > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > END; > > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_rename_column ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_new_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % or Column % does not exist.', > v_table, > v_column; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_rename_table ( > v_table VARCHAR(128), > v_new_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' RENAME TO ' || v_new_name; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % does not exist.', > v_table; >END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_config_value ( > v_option_name VARCHAR(100), > v_option_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_option_value, > v_version, > v_option_value > ); > END; > ELSE > BEGIN > -- We need to set default value to not have it empty after upgrade from previous versions > UPDATE vdc_options SET > default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version > AND default_value IS NULL; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_value_all_versions (v_option_name VARCHAR(100)) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > ) > ) THEN > BEGIN > DELETE > FROM vdc_options > WHERE option_name ilike v_option_name; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_value ( > v_option_name VARCHAR(100), > v_version TEXT > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version IN ( > SELECT ID > FROM fnSplitter(v_version) > ) > ) > ) THEN > BEGIN > DELETE > FROM vdc_options > WHERE option_name ilike v_option_name > AND version IN ( > SELECT ID > FROM fnSplitter(v_version) > ); > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_for_version (v_version TEXT) >RETURNS void AS $PROCEDURE$ >BEGIN > DELETE > FROM vdc_options > WHERE version IN ( > SELECT ID > FROM fnSplitter(v_version) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_config_value ( > v_option_name VARCHAR(100), > v_option_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > UPDATE vdc_options > SET option_value = v_option_value, > default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_default_config_value ( > v_option_name VARCHAR(100), > v_default_option_value VARCHAR(4000), > v_option_value VARCHAR(4000), > v_version VARCHAR(40), > v_ignore_default_value_case boolean > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > IF (v_ignore_default_value_case) THEN > UPDATE vdc_options > SET option_value = v_option_value > WHERE option_name ilike v_option_name > AND option_value ilike v_default_option_value > AND version = v_version; > ELSE > UPDATE vdc_options > SET option_value = v_option_value > WHERE option_name ilike v_option_name > AND option_value = v_default_option_value > AND version = v_version; > END IF; > > -- We need to update default value regardless of user changes > UPDATE vdc_options > SET default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version; > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_rename_config_key ( > v_old_option_name VARCHAR(100), > v_new_option_name VARCHAR(100), > v_version VARCHAR(40) > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_current_option_value VARCHAR(4000); > > BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_old_option_name > AND version = v_version > ) > ) THEN > v_current_option_value:= option_value > FROM vdc_options > WHERE option_name ilike v_old_option_name > AND version = v_version; > > UPDATE vdc_options > SET option_name = v_new_option_name, > option_value = v_current_option_value > WHERE option_name ilike v_old_option_name > AND version = v_version; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_create_constraint ( > v_table VARCHAR(128), > v_constraint VARCHAR(128), > v_constraint_sql TEXT > ) > RETURNS void AS $PROCEDURE$ > > BEGIN > IF NOT EXISTS ( > SELECT 1 > FROM pg_constraint > WHERE conname ilike v_constraint > ) THEN > EXECUTE 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_drop_constraint ( > v_table VARCHAR(128), > v_constraint VARCHAR(128) > ) > RETURNS void AS $PROCEDURE$ > > BEGIN > IF EXISTS ( > SELECT 1 > FROM pg_constraint > WHERE conname ilike v_constraint > ) THEN > EXECUTE 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION CheckDBConnection () > RETURNS SETOF INT IMMUTABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 1; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_functions_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' > FROM pg_proc > INNER JOIN pg_namespace ns > ON (pg_proc.pronamespace = ns.oid) > WHERE > ns.nspname = 'public' > AND ( > probin IS NULL > OR > -- prevent dropping installed extension functions > probin NOT IN (SELECT '$libdir/' || extname from pg_extension) > ) > ORDER BY proname; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_views_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP VIEW if exists ' || table_name || ' CASCADE;' > FROM information_schema.VIEWS > WHERE table_schema = 'public' > AND table_name NOT ILIKE 'pg_%' > ORDER BY table_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_tables_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP TABLE if exists ' || table_name || ' CASCADE;' > FROM information_schema.tables > WHERE table_schema = 'public' > AND table_type = 'BASE TABLE' > ORDER BY table_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_seq_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP SEQUENCE if exists ' || sequence_name || ' CASCADE;' > FROM information_schema.sequences > WHERE sequence_schema = 'public' > ORDER BY sequence_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_user_types_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, > pg_class c, > pg_type t > WHERE n.oid = c.relnamespace > AND t.typrelid = c.oid > AND c.relkind = 'c'::"char" > AND n.nspname = 'public' > ORDER BY c.relname::information_schema.sql_identifier; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_get_column_size ( > v_table VARCHAR(64), > v_column VARCHAR(64) > ) > RETURNS INT STABLE AS $PROCEDURE$ > > DECLARE retvalue INT; > > BEGIN > retvalue := character_maximum_length > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > AND table_schema = 'public' > AND udt_name IN ( > 'char', > 'varchar' > ); > > RETURN retvalue; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION attach_user_to_role ( > v_user_name VARCHAR(255), > v_domain VARCHAR(255), > v_namespace VARCHAR(255), > v_domain_entry_id TEXT, > v_role_name VARCHAR(255) > ) > RETURNS void AS $BODY$ > > DECLARE selected_user_id uuid; > > input_role_id uuid; > > BEGIN > SELECT roles.id > INTO input_role_id > FROM roles > WHERE roles.name = v_role_name; > > -- The external identifier is the user identifier converted to an array of > -- bytes: > INSERT INTO users ( > user_id, > external_id, > namespace, > name, > domain, > username, > last_admin_check_status > ) > SELECT uuid_generate_v1(), > v_domain_entry_id, > v_namespace, > v_user_name, > v_domain, > v_user_name, > true > WHERE NOT EXISTS ( > SELECT 1 > FROM users > WHERE domain = v_domain > AND external_id = v_domain_entry_id > ); > > SELECT user_id > FROM users > WHERE domain = v_domain > AND external_id = v_domain_entry_id > INTO selected_user_id; > > PERFORM InsertPermission(selected_user_id, uuid_generate_v1(), input_role_id, getGlobalIds('system'), 1); > > END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION attach_group_to_role ( > v_group_name VARCHAR(255), > v_role_name VARCHAR(255) > ) > RETURNS void AS $BODY$ > DECLARE selected_group_id uuid; > input_role_id uuid; > BEGIN > SELECT roles.id > INTO input_role_id > FROM roles > WHERE roles.name = v_role_name; > -- The external identifier is the user identifier converted to an array of > -- bytes: > INSERT INTO ad_groups ( > id, > name, > external_id > ) > SELECT uuid_generate_v1(), > v_group_name, > uuid_generate_v1() > WHERE NOT EXISTS ( > SELECT 1 > FROM ad_groups > WHERE name = v_group_name > ); > SELECT id > FROM ad_groups > WHERE name = v_group_name > INTO selected_group_id; > IF NOT EXISTS ( > SELECT 1 > FROM permissions > WHERE ad_element_id = selected_group_id > AND role_id = input_role_id > ) THEN > PERFORM InsertPermission( > selected_group_id, > uuid_generate_v1(), > input_role_id, > getGlobalIds('system'), > 1); > END IF; > END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_add_action_group_to_role ( > v_role_id UUID, > v_action_group_id INT > ) > RETURNS VOID AS $PROCEDURE$ > > BEGIN > INSERT INTO roles_groups ( > role_id, > action_group_id > ) > SELECT v_role_id, > v_action_group_id > WHERE NOT EXISTS ( > SELECT 1 > FROM roles_groups > WHERE role_id = v_role_id > AND action_group_id = v_action_group_id > ); > > RETURN; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_split_config_value ( > v_option_name VARCHAR, > v_old_option_value VARCHAR, > v_new_option_value VARCHAR, > v_update_from_version VARCHAR > ) > RETURNS void AS $BODY$ > > DECLARE v_old_value VARCHAR(4000); > > v_cur CURSOR > FOR > > SELECT DISTINCT version > FROM vdc_options > WHERE version <> 'general' > ORDER BY version; > > v_version VARCHAR(40); > > v_index INT; > > v_count INT; > > v_total_count INT; > > v_version_count INT; > > BEGIN > v_total_count := count(version) > FROM vdc_options > WHERE option_name = v_option_name; > > v_old_value := option_value > FROM vdc_options > WHERE option_name = v_option_name > AND version = 'general'; > > v_version_count := count(DISTINCT version) > FROM vdc_options > WHERE version <> 'general'; > > IF (v_total_count <= v_version_count) THEN > BEGIN > IF (v_old_value IS NULL) THEN > v_old_value := v_old_option_value; > END IF; > v_count := count(DISTINCT version) > FROM vdc_options > WHERE version <> 'general'; > > v_index := 1; > > OPEN v_cur; > > LOOP > > FETCH v_cur > INTO v_version; > > EXIT when NOT found; > > -- We shouldn't update if already exists > IF ( > NOT EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name = v_option_name > AND version = v_version > ) > ) THEN > -- Might not work well for versions such as 3.10, but we currently don't have any > IF (v_version >= v_update_from_version) THEN > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_new_option_value, > v_version, > v_new_option_value > ); > ELSE > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_old_value, > v_version, > v_old_value > ); > END IF; > > END IF; > v_index := v_index + 1; > END LOOP; > > CLOSE v_cur; > > DELETE > FROM vdc_options > WHERE option_name = v_option_name > AND version = 'general'; > END; >END IF; > >END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_grant_action_group_to_all_roles_filter ( > v_action_group_id INT, > uuid [] > ) >RETURNS void AS $BODY$ > >DECLARE v_role_id_to_filter alias >FOR $2; > >BEGIN > INSERT INTO roles_groups ( > role_id, > action_group_id > ) > SELECT DISTINCT role_id, > v_action_group_id > FROM roles_groups rg > WHERE NOT ARRAY [role_id] <@ v_role_id_to_filter > AND NOT EXISTS ( > SELECT 1 > FROM roles_groups > WHERE role_id = rg.role_id > AND action_group_id = v_action_group_id > ); >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object (v_object regclass) >RETURNS setof record AS $BODY$ > >DECLARE v_sql TEXT; > >v_table record; > >v_table_name TEXT; > >temprec record; > >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > SELECT c.relname, > n.nspname > INTO v_table > FROM pg_class c > INNER JOIN pg_namespace n > ON c.relnamespace = n.oid > WHERE c.oid = v_object; > > -- try to get filtered query syntax from previous execution > IF EXISTS ( > SELECT 1 > FROM object_column_white_list_sql > WHERE object_name = v_table.relname > ) THEN > SELECT sql > INTO v_sql > FROM object_column_white_list_sql > WHERE object_name = v_table.relname; > ELSE > v_table_name := quote_ident(v_table.nspname) || '.' || quote_ident(v_table.relname); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > FOR temprec IN > SELECT a.attname, > t.typname > FROM pg_attribute a > INNER JOIN pg_type t > ON a.atttypid = t.oid > WHERE a.attrelid = v_object > AND a.attnum > 0 > AND NOT a.attisdropped > ORDER BY a.attnum LOOP v_sql := coalesce(v_sql || ', ', 'SELECT '); > > IF EXISTS ( > SELECT 1 > FROM object_column_white_list > WHERE object_name = v_table.relname > AND column_name = temprec.attname > ) THEN v_sql := v_sql || quote_ident(temprec.attname); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident(temprec.typname) || ' as ' || quote_ident(temprec.attname); > END IF; > > END LOOP; > > v_sql := v_sql || ' FROM ' || v_table_name; > > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > > -- save generated query for further use > INSERT INTO object_column_white_list_sql ( > object_name, > sql > ) > VALUES ( > v_table.relname, > v_sql > ); > END IF; > > RETURN QUERY > > EXECUTE v_sql; >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_column_to_object_white_list ( > v_object_name VARCHAR(128), > v_column_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM object_column_white_list > WHERE object_name = v_object_name > AND column_name = v_column_name > ) > ) THEN > BEGIN > -- verify that there is such object in db > IF EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name = v_object_name > AND column_name = v_column_name > ) THEN > INSERT INTO object_column_white_list ( > object_name, > column_name > ) > VALUES ( > v_object_name, > v_column_name > ); > END IF; > > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_is_table_exists (v_table VARCHAR(64)) > RETURNS boolean STABLE AS $PROCEDURE$ > > DECLARE retvalue boolean; > > BEGIN > retvalue := EXISTS ( > SELECT * > FROM information_schema.tables > WHERE table_schema = 'public' > AND table_name ILIKE v_table > ); > > RETURN retvalue; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_create_index ( > v_index_name VARCHAR(128), > v_table_name VARCHAR(128), > v_column_names TEXT, > v_where_predicate TEXT, > v_unique boolean > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_sql TEXT; > unique_modifier varchar(6); > > BEGIN > unique_modifier = CASE WHEN v_unique THEN 'UNIQUE' > ELSE '' > END; > > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || '; CREATE ' || unique_modifier || ' INDEX ' || v_index_name || ' ON ' || v_table_name || '(' || v_column_names || ')'; > > IF v_where_predicate = '' THEN v_sql := v_sql || ';';ELSE > v_sql := v_sql || ' WHERE ' || v_where_predicate || ';'; > END IF; > > EXECUTE v_sql; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR replace FUNCTION fn_db_drop_index ( > v_index_name VARCHAR(128) > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_sql TEXT; > > BEGIN > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || ';' ; > EXECUTE v_sql; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_disk (v_id UUID) >RETURNS void AS $PROCEDURE$ >DECLARE OK INT; > >LOCKED INT; > >BEGIN > OK:= 1; > > LOCKED:= 2; > > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED > AND image_group_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_snapshot (v_id UUID) >RETURNS void AS $PROCEDURE$ >DECLARE OK VARCHAR; > >LOCKED VARCHAR; > >BEGIN > OK:= 'OK'; > > LOCKED:= 'LOCKED'; > > UPDATE snapshots > SET status = OK > WHERE status = LOCKED > AND snapshot_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_entity ( > v_object_type VARCHAR(10), > v_name VARCHAR(255), > v_recursive boolean > ) >RETURNS void AS $PROCEDURE$ >DECLARE DOWN INT; > >OK INT; > >LOCKED INT; > >TEMPLATE_OK INT; > >TEMPLATE_LOCKED INT; > >IMAGE_LOCKED INT; > >SNAPSHOT_OK VARCHAR; > >SNAPSHOT_LOCKED VARCHAR; > >v_id UUID; > >BEGIN > DOWN:= 0; > > OK:= 1; > > LOCKED:= 2; > > TEMPLATE_OK:= 0; > > TEMPLATE_LOCKED:= 1; > > IMAGE_LOCKED:= 15; > > SNAPSHOT_OK:= 'OK'; > > SNAPSHOT_LOCKED:= 'LOCKED'; > > v_id := vm_guid > FROM vm_static > WHERE vm_name = v_name > AND entity_type ilike v_object_type; > > -- set VM status to DOWN > IF (v_object_type = 'vm') THEN > UPDATE vm_dynamic > SET status = DOWN > WHERE status = IMAGE_LOCKED > AND vm_guid = v_id; > -- set Template status to OK > ELSE IF (v_object_type = 'template') THEN > UPDATE vm_static > SET template_status = TEMPLATE_OK > WHERE template_status = TEMPLATE_LOCKED > AND vm_guid = v_id; > END IF; > >END IF; > --unlock images and snapshots if recursive flag is set >IF (v_recursive) THEN > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED > AND image_group_id IN ( > SELECT device_id > FROM vm_device > WHERE vm_id = v_id > AND is_plugged > ); > > UPDATE snapshots > SET status = SNAPSHOT_OK > WHERE status ilike SNAPSHOT_LOCKED > AND vm_id = v_id; >END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_all () >RETURNS void AS $PROCEDURE$ >DECLARE DOWN INT; > >OK INT; > >LOCKED INT; > >TEMPLATE_OK INT; > >TEMPLATE_LOCKED INT; > >IMAGE_LOCKED INT; > >SNAPSHOT_OK VARCHAR; > >SNAPSHOT_LOCKED VARCHAR; > >BEGIN > DOWN:= 0; > > OK:= 1; > > LOCKED:= 2; > > TEMPLATE_OK:= 0; > > TEMPLATE_LOCKED:= 1; > > IMAGE_LOCKED:= 15; > > SNAPSHOT_OK:= 'OK'; > > SNAPSHOT_LOCKED:= 'LOCKED'; > > UPDATE vm_static > SET template_status = TEMPLATE_OK > WHERE template_status = TEMPLATE_LOCKED; > > UPDATE vm_dynamic > SET status = DOWN > WHERE status = IMAGE_LOCKED; > > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED; > > UPDATE snapshots > SET status = SNAPSHOT_OK > WHERE status ilike SNAPSHOT_LOCKED; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/* Displays DC id , DC name, SPM Host id , SPM Host name and number of async tasks awaiting. > >1) create a record type with DC name, DC id, SPM host id, SPM host name, count > >2) get all distinct DC ids from async_tasks table > >3) Run a cursor for each result in 2) > > a) get DC name > b) get SPM Host id & name if available > c) get count of tasks > > return current record > >4) return set of generated records >*/ >DROP TYPE IF EXISTS async_tasks_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE async_tasks_info_rs AS ( > dc_id uuid, > dc_name VARCHAR, > spm_host_id uuid, > spm_host_name VARCHAR, > task_count INT > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_get_async_tasks () >RETURNS SETOF async_tasks_info_rs STABLE AS $PROCEDURE$ >DECLARE v_record async_tasks_info_rs; > >-- selects storage_pool_id uuid found in async_tasks >v_tasks_cursor CURSOR >FOR > >SELECT DISTINCT storage_pool_id >FROM async_tasks; > >BEGIN > OPEN v_tasks_cursor; > > FETCH v_tasks_cursor > INTO v_record.dc_id; > > WHILE FOUND > LOOP > -- get dc_name and SPM Host id > v_record.dc_name := name FROM storage_pool WHERE id = v_record.dc_id; > v_record.spm_host_id := spm_vds_id > FROM storage_pool > WHERE id = v_record.dc_id; > > -- get Host name if we have non NULL SPM Host > IF (v_record.spm_host_id IS NOT NULL) THEN > v_record.spm_host_name := vds_name > FROM vds_static > WHERE vds_id = v_record.spm_host_id; > ELSE > v_record.spm_host_name:= ''; > END IF; > -- get tasks count for this DC > v_record.task_count := count(*) > FROM async_tasks > WHERE position(cast(v_record.dc_id AS VARCHAR) IN action_parameters) > 0; > > -- return the record > RETURN NEXT v_record; > > FETCH v_tasks_cursor > INTO v_record.dc_id; > > END LOOP; > >CLOSE v_tasks_cursor; > >-- return full set of generated records >RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_remove_csv_config_value ( > v_option_name VARCHAR(100), > v_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v VARCHAR []; > >e VARCHAR; > >v_result VARCHAR; > >v_sep VARCHAR(1); > >BEGIN > v_result := ''; > > v_sep := ''; > > v := string_to_array(option_value, ',') > FROM vdc_options > WHERE option_name = v_option_name > AND version = v_version; > FOR > > e IN > > SELECT unnest(v) LOOP > > IF (e != v_value) THEN v_result := v_result || v_sep || e; > v_sep := ','; > END IF; > >END >LOOP; > > UPDATE vdc_options > SET option_value = v_result > WHERE option_name = v_option_name > AND version = v_version; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_remove_uuid_from_csv ( > v_csv_text TEXT, > v_uuid uuid > ) >RETURNS TEXT STABLE AS $PROCEDURE$ >DECLARE v uuid []; > >e uuid; > >v_result TEXT; > >v_sep VARCHAR(1); > >BEGIN > v_result := ''; > > v_sep := ''; > > v := string_to_array(v_csv_text, ','); > FOR > > e IN > > SELECT unnest(v) LOOP > > IF (e != v_uuid) THEN v_result := v_result || v_sep || e; > v_sep := ','; > END IF; > > END LOOP; > > IF (v_result = '') THEN v_result := NULL; > END IF; > RETURN v_result; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_config_value_for_versions_up_to ( > v_option_name VARCHAR(100), > v_val VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >DECLARE i INT; > >arr VARCHAR [] := array ['4.1', '4.2', '4.3']; > >BEGIN > FOR i IN array_lower(arr, 1)..array_upper(arr, 1) LOOP PERFORM fn_db_add_config_value(v_option_name, v_val, arr [i]); > EXIT WHEN arr [i] = v_version; > END LOOP; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_varchar_to_jsonb(v_text VARCHAR, v_default_value JSONB) >RETURNS JSONB IMMUTABLE AS $PROCEDURE$ >BEGIN > RETURN v_text::jsonb; > EXCEPTION > WHEN SQLSTATE '22P02' THEN -- '22P02' stands for 'invalid_text_representation', 'invalid input syntax for type json' in this case > RETURN v_default_value; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_column_to_jsonb_compatible_values( > v_table VARCHAR, > v_column VARCHAR, > v_default_value JSONB > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE > default_value_string VARCHAR; >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name = v_table > AND column_name = v_column > AND data_type = 'character varying' > ) > ) THEN > BEGIN > default_value_string := CASE > WHEN v_default_value IS NULL THEN 'NULL' > ELSE '''' || v_default_value::VARCHAR || '''' > END; > EXECUTE 'UPDATE ' || v_table || ' SET ' || v_column || ' = (SELECT fn_db_varchar_to_jsonb(' || v_column || ', ' || default_value_string || '))'; > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_change_table_string_columns_to_empty_string ( > v_table VARCHAR(128), > v_column VARCHAR[] > ) >RETURNS void AS $PROCEDURE$ >DECLARE > v_sql TEXT; > v_num integer := array_length(v_column, 1); > v_index integer := 1; > >BEGIN > WHILE v_index <= v_num > LOOP > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column[v_index] > ) > ) THEN > BEGIN > v_sql := 'UPDATE ' || v_table || ' SET ' || v_column[v_index] || ' = '''' WHERE ' || v_column[v_index] || ' IS NULL' ; > EXECUTE v_sql; > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column[v_index] || ' SET DEFAULT '''''; > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'No column named % exists in table %', v_column[v_index] , v_table; > END IF; > v_index = v_index + 1; > END LOOP; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:37,857+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/update_sequence_numbers.sql >********* QUERY ********** >SELECT setval('vdc_options_seq', max(option_id)) FROM vdc_options; >************************** > > 574 > >********* QUERY ********** >SELECT setval('custom_actions_seq', max(action_id)) FROM custom_actions; >************************** > > > >********* QUERY ********** >SELECT setval('vdc_db_log_seq', max(error_id)) FROM vdc_db_log; >************************** > > > >********* QUERY ********** >SELECT setval('audit_log_seq', max(audit_log_id)) FROM audit_log; >************************** > > 54 > >********* QUERY ********** >SELECT setval('schema_version_seq', max(id)) FROM schema_version; >************************** > > 323 > >2019-02-26 17:06:37,873+0100 Running upgrade sql script '/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql'... >2019-02-26 17:06:37,874+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql >********* QUERY ********** >/************************************************************************************ > DATABASE APPLICATION CONFIGURATION FILE > >This file is used to update the vdc_options configuration table. >The following sections are available: > Add Section > Update section (w/o overriding current value) > Delete section - Deprecated, all config key removals should be done in an upgrade script! > Split config section > Simple upgrades not available using a fn_db* function call > Complex upgrades using temporary functions > >In each section (except simple/function sections), entries are ordered by key, >please keep this when modifying this file. > >PLEASE NOTE THAT THIS SCRIPT MUST REMAIN RE-ENTRANT! > >************************************************************************************/ > > > >select fn_db_add_column('vdc_options', 'default_value', 'VARCHAR(4000)'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('AuditLogAgingThreashold', 'AuditLogAgingThreshold', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('ClientConsoleModeDefault', 'ClientModeSpiceDefault', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('PowerClientAutoApprovePatterns','AutoApprovePatterns','general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('PowerClientAutoRegistrationDefaultClusterID','AutoRegistrationDefaultClusterID','general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('PowerClientAutoInstallCertificateOnApprove','AutoInstallCertificateOnApprove','general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('UseSecureConnectionWithServers', 'EncryptHostCommunication', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('SpiceReleaseCursorKeys', 'ConsoleReleaseCursorKeys', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('SpiceToggleFullScreenKeys', 'ConsoleToggleFullScreenKeys', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('SSHInactivityTimoutSeconds', 'SSHInactivityTimeoutSeconds', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('SSHInactivityHardTimoutSeconds', 'SSHInactivityHardTimeoutSeconds', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('StorageDomainFalureTimeoutInMinutes', 'StorageDomainFailureTimeoutInMinutes', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('VdsLoadBalancingeIntervalInMinutes', 'VdsLoadBalancingIntervalInMinutes', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('VdsRecoveryTimeoutInMintues', 'VdsRecoveryTimeoutInMinutes', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('UknownTaskPrePollingLapse', 'UnknownTaskPrePollingLapse', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('DefaultMtu', 'DefaultMTU', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('ManagementNetwork', 'DefaultManagementNetwork', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('FreeSpaceCriticalLowInGB','CriticalSpaceActionBlocker', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('FreeSpaceLow', 'WarningLowSpaceIndicator', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('ImageProxyURL', 'ImageProxyAddress', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('BootstrapMinimalVdsmVersion','4.9','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AffinityRulesEnforcementManagerEnabled', 'true', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AffinityRulesEnforcementManagerRegularInterval', '1', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AgentAppName','ovirt-guest-agent-common,ovirt-guest-agent','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AllowClusterWithVirtGlusterEnabled','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ApplicationMode','255','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AsyncCommandPollingLoopInSeconds','1','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AsyncCommandPollingRateInSeconds','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AsyncTaskPollingRate','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AsyncTaskStatusCacheRefreshRateInSeconds','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AsyncTaskStatusCachingTimeInMinutes','1','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AsyncTaskZombieTaskLifeInMinutes','300','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AuditLogAgingThreshold','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AuditLogCleanupTime','03:35:35','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CoCoLifeInMinutes','3000','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CoCoWaitForEventInMinutes','300','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CommandEntityAgingThreshold','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CommandEntityCleanupTime','03:35:35','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaintenanceVdsIgnoreExternalVms','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('OnlyRequiredNetworksMandatoryForVdsSelection','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('RepeatEndMethodsOnFailMaxRetries','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ForemanResponsePageSize','9999','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AutoApprovePatterns','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AutoInstallCertificateOnApprove','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AutoRecoverySchedule','0 0/5 * * * ?','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AutoRegistrationDefaultClusterID','99408929-82CF-4DC7-A532-9D998063FA95','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('BlockMigrationOnSwapUsagePercentage','0','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CipherSuite','DEFAULT','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ConnectToServerTimeoutInSeconds','20','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ClusterEmulatedMachines','pc-i440fx-rhel7.3.0,pc-i440fx-2.6,pseries-rhel7.5.0,s390-ccw-virtio-2.8','4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ClusterEmulatedMachines','pc-i440fx-rhel7.6.0,pc-i440fx-2.12,pseries-rhel7.6.0-sxxm,s390-ccw-virtio-2.12','4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CpuOverCommitDurationMinutes','2','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DataDir','/usr/share/engine','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DBEngine','Postgres','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DebugTimerLogging','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DefaultWindowsTimeZone','GMT Standard Time','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DefaultGeneralTimeZone','Etc/GMT','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DisableFenceAtStartupInSec','300','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PopulateDirectLUNDiskDescriptionWithLUNId','4','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EnableHostTimeDrift','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('RemoteViewerSupportedVersions','rhev-win64:2.0-128;rhev-win32:2.0-128;rhel7:2.0-6;rhel6:2.0-14','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('RemoteViewerNewerVersionUrl','${console_client_resources_url}','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EnableSpiceRootCertificateValidation','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EnableSwapCheck','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EnableUSBAsDefault','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EnableVdsLoadBalancing','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('BackupCheckPeriodInHours','6','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('BackupAlertPeriodInDays','1','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EngineMode','Active','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FailedJobCleanupTimeInMinutes','60','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceAgentDefaultParams','drac7:privlvl=OPERATOR,lanplus,delay=10;ilo3:lanplus,power_wait=4;ilo4:lanplus,power_wait=4','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CustomFenceAgentDefaultParams','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceAgentDefaultParamsForPPC','ilo3:lanplus=1,cipher=1,privlvl=administrator,power_wait=4;ilo4:ilanplus=1,cipher=1,privlvl=administrator,power_wait=4;ipmilan:lanplus=1,cipher=1,privlvl=administrator,power_wait=4','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CustomFenceAgentDefaultParamsForPPC','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceAgentMapping','drac7=ipmilan,ilo2=ilo,ilo3=ipmilan,ilo4=ipmilan','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CustomFenceAgentMapping','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CustomFencePowerWaitParam','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceProxyDefaultPreferences','cluster,dc','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceQuietTimeBetweenOperationsInSec','180','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceStartStatusDelayBetweenRetriesInSec','60','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceStartStatusRetries','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceStopStatusDelayBetweenRetriesInSec','60','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceStopStatusRetries','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FencePowerWaitParam','apc=power_wait,apc_snmp=power_wait,bladecenter=power_wait,cisco_ucs=power_wait,drac5=power_wait,drac7=power_wait,eps=delay,hpblade=power_wait,ilo=power_wait,ilo2=power_wait,ilo3=power_wait,ilo4=power_wait,ipmilan=power_wait,rsa=power_wait,rsb=power_wait,wti=power_wait','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FindFenceProxyDelayBetweenRetriesInSec','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FindFenceProxyRetries','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CriticalSpaceActionBlocker','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('WarningLowSpaceIndicator','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterRefreshRateHooks', '7200', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterRefreshRateLight', '15', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterRefreshRateHeavy', '300', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterRefreshRateStorageDevices', '7200', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterVolumeOptionGroupVirtValue','virt','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterVolumeOptionOwnerUserVirtValue','36','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterVolumeOptionOwnerGroupVirtValue','36','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterRefreshRateTasks', '60', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterPeerStatusRetries', '2', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterTaskMinWaitForCleanupInMins', '10', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterRefreshRateHealInfo', '600', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterUnSyncedEntriesHistoryLimit', '40', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('LibgfApiSupported', 'false', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('UseNativeIOForGluster', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('UseNativeIOForGluster', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterVolumeFreeSpaceThresholdInPercent', '20', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterRefreshRateGeoRepDiscoveryInSecs', '3600', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterRefreshRateGeoRepStatusInSecs', '300', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterRefreshRateSnapshotDiscovery', '300', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterMetaVolumeName', 'gluster_shared_storage', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterStorageDeviceListMountPointsToIgnore','/,/home,/boot,/run/gluster/snaps/.*','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterStorageDeviceListFileSystemTypesToIgnore','swap','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterDefaultBrickMountPoint','/gluster-bricks','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('GlusterEventingSupported', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('GlusterEventingSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ResetBrickSupported', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ResetBrickSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GuestToolsSetupIsoPrefix','ovirt-guest-tools-','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HighUtilizationForEvenlyDistribute','75','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HighUtilizationForPowerSave','75','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HostPreparingForMaintenanceIdleTime', '300', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HostTimeDriftInSec','300','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HotPlugCpuSupported','{"x86":"true","ppc":"true"}', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('HotPlugCpuSupported','{"x86":"true","ppc":"true","s390x":"true"}', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('HotUnplugCpuSupported', '{"x86":"true","ppc":"true"}', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('HotUnplugCpuSupported', '{"x86":"true","ppc":"true","s390x":"false"}', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('HotPlugMemorySupported', '{"x86":"true","ppc":"true","s390x":"false"}', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxMemorySlots','16','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HotPlugMemoryMultiplicationSizeMb','256','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('QemuimgCommitSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('AgentChannelNamingSupported', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('AgentChannelNamingSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HotUnplugMemorySupported', '{"x86":"false","ppc":"false"}', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('HotUnplugMemorySupported', '{"x86":"true","ppc":"true","s390x":"false"}', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ReduceVolumeSupported', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ReduceVolumeSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('CopyPreallocatedFileBasedDiskSupported', 'false', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('CopyPreallocatedFileBasedDiskSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ContentType', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ContentType', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('IsoOnDataDomain', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('IsoOnDataDomain', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ManagedBlockDomainSupported', 'false', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ManagedBlockDomainSupported', 'false', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ResumeBehaviorSupported', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ResumeBehaviorSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('MemoryDisksOnDifferentDomainsSupported', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('MemoryDisksOnDifferentDomainsSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('IsMigrationSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true"}','4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('IsMemorySnapshotSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true"}','4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('IsSuspendSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true"}','4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('OsRepositoryConfDir','/osinfo.conf.d','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('IterationsWithBalloonProblem','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DefaultSysprepLocale','en_US','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('Ipv6MigrationProperlyHandled', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('Ipv6MigrationProperlyHandled', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ClusterRequiredRngSourcesDefault', '', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ClusterRequiredRngSourcesDefault', '', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HostDevicePassthroughCapabilities', 'pci,scsi,usb_device', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HostPackagesUpdateTimeInHours','24','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CertificationValidityCheckTimeInHours','24','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxIoThreadsPerVm','127','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DisplayUncaughtUIExceptions', 'true', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SpiceProxyDefault','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('RemapCtrlAltDelDefault','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('InstallVds','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('IoOpTimeoutSec','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('IPTablesConfig', >'# oVirt default firewall configuration. Automatically generated by vdsm bootstrap script. >*filter >:INPUT ACCEPT [0:0] >:FORWARD ACCEPT [0:0] >:OUTPUT ACCEPT [0:0] >-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT >-A INPUT -p icmp -j ACCEPT >-A INPUT -i lo -j ACCEPT ># vdsm >-A INPUT -p tcp --dport @VDSM_PORT@ -j ACCEPT ># ovirt-imageio-daemon >-A INPUT -p tcp --dport 54322 -j ACCEPT ># libvirt tls >-A INPUT -p tcp --dport 16514 -j ACCEPT ># SSH >-A INPUT -p tcp --dport @SSH_PORT@ -j ACCEPT ># guest consoles >-A INPUT -p tcp -m multiport --dports 5900:6923 -j ACCEPT ># migration >-A INPUT -p tcp -m multiport --dports 49152:49216 -j ACCEPT ># snmp >-A INPUT -p udp --dport 161 -j ACCEPT ># Reject any other input traffic >-A INPUT -j REJECT --reject-with icmp-host-prohibited >-A FORWARD -m physdev ! --physdev-is-bridged -j REJECT --reject-with icmp-host-prohibited >COMMIT >','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('IPTablesConfigForGluster', >' ># glusterd >-A INPUT -p tcp -m tcp --dport 24007 -j ACCEPT > ># gluster swift >-A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT > ># portmapper >-A INPUT -p udp -m udp --dport 111 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 38465 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 38466 -j ACCEPT > ># nfs >-A INPUT -p tcp -m tcp --dport 38467 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 2049 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 38469 -j ACCEPT > ># nrpe >-A INPUT -p tcp --dport 5666 -j ACCEPT > ># status >-A INPUT -p tcp -m tcp --dport 39543 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 55863 -j ACCEPT > ># nlockmgr >-A INPUT -p tcp -m tcp --dport 38468 -j ACCEPT >-A INPUT -p udp -m udp --dport 963 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 965 -j ACCEPT > ># ctdbd >-A INPUT -p tcp -m tcp --dport 4379 -j ACCEPT > ># smbd >-A INPUT -p tcp -m tcp --dport 139 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 445 -j ACCEPT > ># Ports for gluster volume bricks (default 100 ports) ># Needed for gluster < 3.4.0 that may be still handled by the engine >-A INPUT -p tcp -m tcp --dport 24009:24108 -j ACCEPT > ># Ports for gluster volume bricks in Hyper Converged setup(default 100 ports) >-A INPUT -p tcp -m tcp --dport 49217:49316 -j ACCEPT >','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('IPTablesConfigForVirt', >' ># libvirt tls >-A INPUT -p tcp --dport 16514 -j ACCEPT > ># serial consoles >-A INPUT -p tcp -m multiport --dports 2223 -j ACCEPT > ># guest consoles >-A INPUT -p tcp -m multiport --dports 5900:6923 -j ACCEPT > ># migration >-A INPUT -p tcp -m multiport --dports 49152:49216 -j ACCEPT >', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ipv6IscsiSupported', 'false', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ipv6IscsiSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('DomainXML', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('DomainXML', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('IPTablesConfigSiteCustom','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('IsMultilevelAdministrationOn','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('JobCleanupRateInMinutes','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('JobPageSize','100','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LeaseRetries','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LeaseTimeSec','60','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LockPolicy','ON','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LockRenewalIntervalSec','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LogPhysicalMemoryThresholdInMB','1024','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LogSwapMemoryThresholdInMB','1024','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LowUtilizationForEvenlyDistribute','0','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LowUtilizationForPowerSave','20','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ManagedDevicesWhiteList','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DefaultManagementNetwork','ovirtmgmt','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxAuditLogMessageLength','10000','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxBlockDiskSize','8192','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxNumberOfHostsInStoragePool','250','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('MaxNumOfCpuPerSocket', '254', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('MaxNumOfThreadsPerCpu', '8', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxNumOfVmCpus', '288', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('MaxNumOfVmCpus', '384', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('MaxNumOfVmSockets', '16', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxRerunVmOnVdsCount','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxStorageVdsDelayCheckSec','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxStorageVdsTimeoutCheckSec','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxVdsMemOverCommit','200','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxVdsMemOverCommitForServers','150','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxVdsNameLength','255','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxVmNameLengthNonWindows','64','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxVmNameLengthWindows','15','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxVmsInPool','1000','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MinimalETLVersion','3.0.0','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('NicDHCPDelayGraceInMS','60','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('NumberOfFailedRunsOnVds','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('NumberOfUSBSlots','4','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('NumberVmRefreshesBeforeSave','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('NumberVdsRefreshesBeforeTryToStartUnknownVms','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('NumberVdsRefreshesBeforeRetryToStartUnknownVms','100','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EnableMACAntiSpoofingFilterRules','true', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxSchedulerWeight','1000','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SpeedOptimizationSchedulingThreshold','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SchedulerAllowOverBooking','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SchedulerOverBookingThreshold','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('IgnoreVmToVmAffinityForHostMaintenance', 'false', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('IgnoreVmToVmAffinityForHostMaintenance', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UploadFileMaxTimeInMinutes','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('RetrieveDataMaxTimeInMinutes','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('StorageDomainOvfStoreCount','2','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('OrganizationName','oVirt','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('OriginType','OVIRT','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('OvfVirtualSystemType','ENGINE','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('OvirtInitialSupportedIsoVersion','2.5.5:5.8','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('OvirtIsoPrefix','^ovirt-node-iso-([0-9].*)\.iso$:^rhevh-([0-9].*)\.iso$','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('OvirtNodeOS','^ovirt.*$:^rhev.*$','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('oVirtISOsRepositoryPath','/usr/share/ovirt-node-iso:/usr/share/rhev-hypervisor','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('oVirtUpgradeScriptName','/usr/share/vdsm-reg/vdsm-upgrade','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('oVirtUploadPath','/data/updates/ovirt-node-image.iso','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('OvfUpdateIntervalInMinutes','60','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('OvfItemsCountPerUpdate','100','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PayloadSize','8192','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PMHealthCheckEnabled','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PMHealthCheckIntervalInSec','3600','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PostgresI18NPrefix','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PostgresLikeSyntax','ILIKE','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PostgresPagingSyntax',E' OFFSET (%1$s -1) LIMIT %2$s','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PostgresPagingType','Offset','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PostgresSearchTemplate',E'SELECT * FROM (%2$s) %1$s) as T1 %3$s','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ProductRPMVersion','3.0.0.0','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('QuotaGraceStorage','20','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('QuotaGraceCluster','20','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('QuotaThresholdStorage','80','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('QuotaThresholdCluster','80','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('RhevhLocalFSPath','/data/images/','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SANWipeAfterDelete','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SearchResultsLimit','100','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SendSMPOnRunVm','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ServerCPUList', > '3:Intel Conroe Family:vmx,nx,model_Conroe:Conroe:x86_64; ' > || '4:Intel Penryn Family:vmx,nx,model_Penryn:Penryn:x86_64; ' > || '5:Intel Nehalem Family:vmx,nx,model_Nehalem:Nehalem:x86_64; ' > || '6:Intel Westmere Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; ' > || '7:Intel SandyBridge Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; ' > || '8:Intel Haswell-noTSX Family:vmx,nx,model_Haswell-noTSX:Haswell-noTSX:x86_64; ' > || '9:Intel Haswell Family:vmx,nx,model_Haswell:Haswell:x86_64; ' > || '10:Intel Broadwell-noTSX Family:vmx,nx,model_Broadwell-noTSX:Broadwell-noTSX:x86_64; ' > || '11:Intel Broadwell Family:vmx,nx,model_Broadwell:Broadwell:x86_64; ' > || '11:Intel Skylake Family:vmx,nx,model_Skylake-Client:Skylake-Client:x86_64; ' > || '2:AMD Opteron G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; ' > || '3:AMD Opteron G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; ' > || '4:AMD Opteron G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64; ' > || '5:AMD Opteron G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; ' > || '6:AMD Opteron G5:svm,nx,model_Opteron_G5:Opteron_G5:x86_64; ' > || '3:IBM POWER8:powernv,model_POWER8:POWER8:ppc64;', > '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ServerCPUList', > '3:Intel Conroe Family:vmx,nx,model_Conroe:Conroe:x86_64; ' > || '4:Intel Penryn Family:vmx,nx,model_Penryn:Penryn:x86_64; ' > || '5:Intel Nehalem Family:vmx,nx,model_Nehalem:Nehalem:x86_64; ' > || '6:Intel Westmere Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; ' > || '7:Intel SandyBridge Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; ' > || '8:Intel Haswell-noTSX Family:vmx,nx,model_Haswell-noTSX:Haswell-noTSX:x86_64; ' > || '9:Intel Haswell Family:vmx,nx,model_Haswell:Haswell:x86_64; ' > || '10:Intel Broadwell-noTSX Family:vmx,nx,model_Broadwell-noTSX:Broadwell-noTSX:x86_64; ' > || '11:Intel Broadwell Family:vmx,nx,model_Broadwell:Broadwell:x86_64; ' > || '11:Intel Skylake Family:vmx,nx,model_Skylake-Client:Skylake-Client:x86_64; ' > || '2:AMD Opteron G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; ' > || '3:AMD Opteron G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; ' > || '4:AMD Opteron G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64; ' > || '5:AMD Opteron G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; ' > || '6:AMD Opteron G5:svm,nx,model_Opteron_G5:Opteron_G5:x86_64; ' > || '3:IBM POWER8:powernv,model_POWER8:POWER8:ppc64;', > '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ServerCPUList', > '5:Intel Nehalem Family:vmx,nx,model_Nehalem:Nehalem:x86_64; ' > || '7:Intel Nehalem IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Nehalem:Nehalem,+spec-ctrl,+ssbd:x86_64; ' > || '8:Intel Westmere Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; ' > || '10:Intel Westmere IBRS SSBD Family:aes,vmx,nx,spec_ctrl,ssbd,model_Westmere:Westmere,+pcid,+spec-ctrl,+ssbd:x86_64; ' > || '11:Intel SandyBridge Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; ' > || '13:Intel SandyBridge IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_SandyBridge:SandyBridge,+pcid,+spec-ctrl,+ssbd:x86_64; ' > || '14:Intel Haswell-noTSX Family:vmx,nx,model_Haswell-noTSX:Haswell-noTSX:x86_64; ' > || '16:Intel Haswell-noTSX IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Haswell-noTSX:Haswell-noTSX,+spec-ctrl,+ssbd:x86_64; ' > || '17:Intel Haswell Family:vmx,nx,model_Haswell:Haswell:x86_64; ' > || '19:Intel Haswell IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Haswell:Haswell,+spec-ctrl,+ssbd:x86_64; ' > || '20:Intel Broadwell-noTSX Family:vmx,nx,model_Broadwell-noTSX:Broadwell-noTSX:x86_64; ' > || '22:Intel Broadwell-noTSX IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Broadwell-noTSX:Broadwell-noTSX,+spec-ctrl,+ssbd:x86_64; ' > || '23:Intel Broadwell Family:vmx,nx,model_Broadwell:Broadwell:x86_64; ' > || '25:Intel Broadwell IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Broadwell:Broadwell,+spec-ctrl,+ssbd:x86_64; ' > || '26:Intel Skylake Client Family:vmx,nx,model_Skylake-Client:Skylake-Client:x86_64; ' > || '28:Intel Skylake Client IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Skylake-Client:Skylake-Client,+spec-ctrl,+ssbd:x86_64; ' > || '29:Intel Skylake Server Family:vmx,nx,model_Skylake-Server:Skylake-Server:x86_64; ' > || '31:Intel Skylake Server IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Skylake-Server:Skylake-Server,+spec-ctrl,+ssbd:x86_64; ' > || '5:AMD Opteron G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; ' > || '6:AMD Opteron G5:svm,nx,model_Opteron_G5:Opteron_G5:x86_64; ' > || '7:AMD EPYC:svm,nx,model_EPYC:EPYC:x86_64; ' > || '9:AMD EPYC IBPB SSBD:svm,nx,ibpb,ssbd,model_EPYC:EPYC,+ibpb,+virt-ssbd:x86_64; ' > || '3:IBM POWER8:powernv,model_POWER8:POWER8:ppc64; ' > || '4:IBM POWER9:powernv,model_POWER9:POWER9:ppc64; ' > || '2:IBM z114, z196:sie,model_z196-base:z196-base:s390x; ' > || '3:IBM zBC12, zEC12:sie,model_zEC12-base:zEC12-base:s390x; ' > || '4:IBM z13s, z13:sie,model_z13-base:z13-base:s390x; ' > || '5:IBM z14:sie,model_z14-base:z14-base:s390x;', > '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ServerRebootTimeout','300','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SetupNetworksPollingTimeout','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SignCertTimeoutInSeconds','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SpiceDriverNameInGuest','RHEV-Spice','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ConsoleReleaseCursorKeys','shift+f12','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ConsoleToggleFullScreenKeys','shift+f11','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SpiceUsbAutoShare','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FullScreenWebadminDefault','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('WANDisableEffects','animation','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('WANColorDepth','16','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SpmCommandFailOverRetries','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SPMFailOverAttempts','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HsmCommandFailOverRetries','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SpmVCpuConsumption','1','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SSHInactivityTimeoutSeconds','300','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SSHInactivityHardTimeoutSeconds','1800','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SSLEnabled','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('StorageDomainFailureTimeoutInMinutes','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('StorageDomainNameSizeLimit','50','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('StoragePoolNameSizeLimit','40','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('StoragePoolNonOperationalResetTimeoutInMin','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('StoragePoolRefreshTimeInSeconds','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HostStorageConnectionAndPoolRefreshTimeInSeconds','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SucceededJobCleanupTimeInMinutes','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SupportedClusterLevels','3.0','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SupportedVDSMVersions','4.9,4.10,4.11,4.12,4.13,4.14','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SysPrepDefaultPassword','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SysPrepDefaultUser','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ThrottlerMaxWaitForVdsUpdateInMillis','10000','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('TimeoutToResetVdsInSeconds','60','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DelayResetForSpmInSeconds','20','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DelayResetPerVmInSeconds','0.5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EncryptHostCommunication','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsmSSLProtocol','TLS','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsmSSLCiphers', 'HIGH:!aNULL', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ExternalCommunicationProtocol','TLSv1.2','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsRequestQueueName','jms.topic.vdsm_requests','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsResponseQueueName','jms.topic.vdsm_responses','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('IrsRequestQueueName','jms.topic.vdsm_irs_requests','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('IrsResponseQueueName','jms.topic.vdsm_irs_responses','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EventQueueName','jms.queue.events','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EventProcessingPoolSize','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('TimeToReduceFailedRunOnVdsInMinutes','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UnknownTaskPrePollingLapse','60000','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('UserDefinedVMProperties', '','4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UserSessionTimeOutInterval','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UtilizationThresholdInPercent','80','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ValidNumOfMonitors','1,2,4','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VcpuConsumptionPercentage','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdcVersion','3.0.0.0','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VDSAttemptsToResetCount','2','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsCertificateValidityInYears','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('vdsConnectionTimeout','20','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsMaxConnectionsPerHost','2','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxTotalConnections','20','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CustomVdsFenceOptionMapping','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsFenceOptionTypes','encrypt_options=bool,secure=bool,port=int,slot=int','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CustomVdsFenceType','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('vdsHeartbeatInSeconds','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsLoadBalancingIntervalInMinutes','1','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsLocalDisksCriticallyLowFreeSpace','100','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsLocalDisksLowFreeSpace','100','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsRecoveryTimeoutInMinutes','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsRefreshRate','2','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('vdsRetries','0','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('vdsTimeout','180','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('VM32BitMaxMemorySizeInMB','20480','4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('VM64BitMaxMemorySizeInMB','4194304','4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('VMPpc64BitMaxMemorySizeInMB', '1048576', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VmGracefulShutdownMessage','System Administrator has initiated shutdown of this Virtual Machine. Virtual Machine is shutting down.','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VmGracefulShutdownTimeout','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VmPoolMaxSubsequentFailures','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VmPoolMonitorBatchSize','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VmPoolMonitorIntervalInMinutes','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VmPoolMonitorMaxAttempts','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VmPriorityMaxValue','100','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AutoStartVmsRunnerIntervalInSeconds','1','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('RetryToRunAutoStartVmIntervalInSeconds','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxNumOfTriesToRunFailedAutoStartVm','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DelayToRunAutoStartVmIntervalInSeconds','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxNumOfSkipsBeforeAutoStartVm','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VncKeyboardLayout','en-us','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VncKeyboardLayoutValidValues','ar,da,de,de-ch,en-gb,en-us,es,et,fi,fo,fr,fr-be,fr-ca,fr-ch,hr,hu,is,it,ja,lt,lv,mk,nl,nl-be,no,pl,pt,pt-br,ru,sl,sv,th,tr','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('WaitForVdsInitInSec','60','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('NetworkConnectivityCheckTimeoutInSeconds','120','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AutoRecoveryAllowedTypes','{"storage domains":"true","hosts":"true"}','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ClientModeSpiceDefault','Native','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ClientModeVncDefault','Native','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ClientModeRdpDefault','Auto','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UseFqdnForRdpIfAvailable','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('WebSocketProxy','Off','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('WebSocketProxyTicketValiditySeconds','120','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LogMaxPhysicalMemoryUsedThresholdInPercentage', '95', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LogMaxSwapMemoryUsedThresholdInPercentage', '95', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LogMaxCpuUsedThresholdInPercentage', '95', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('LogMaxNetworkUsedThresholdInPercentage', '95', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('CustomDeviceProperties', '{type=interface;prop={SecurityGroups=^(?:(?:[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}, *)*[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}|)$}}', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('PreDefinedNetworkCustomProperties', $q$bridge_opts=^[^\s=]+=[^\s=]+(\s+[^\s=]+=[^\s=]+)*$$q$, '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('UserDefinedNetworkCustomProperties', '', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SecureConnectionWithOATServers','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PollUri','AttestationService/resources/PollHosts','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AttestationTruststore','TrustStore.jks','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AttestationPort','8443','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AttestationTruststorePass','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AttestationServer','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AttestationFirstStageSize','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxAverageNetworkQoSValue','1024','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxPeakNetworkQoSValue','2048','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxBurstNetworkQoSValue','10240','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxHostNetworkQosShares', '100', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('QoSInboundAverageDefaultValue','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('QoSInboundPeakDefaultValue','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('QoSInboundBurstDefaultValue','100','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('QoSOutboundAverageDefaultValue','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('QoSOutboundPeakDefaultValue','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('QoSOutboundBurstDefaultValue','100','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ExternalSchedulerServiceURL','http://localhost:18781/','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ExternalSchedulerConnectionTimeout','100','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ExternalSchedulerEnabled','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ExternalSchedulerResponseTimeout','120000','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DwhHeartBeatInterval', '30', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DisconnectDwh', '0', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlanceImageListSize','20','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlanceImageTotalListSize','500','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('OverUtilizationForHaReservation','200','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ScaleDownForHaReservation','1','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VdsHaReservationIntervalInMinutes','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DefaultMaximumMigrationDowntime','0','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DefaultSerialNumberPolicy','HOST_ID','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DefaultCustomSerialNumber','Dummy serial number.','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DefaultMTU', '1500', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('TunnelledDefaultMTU', '1442', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceKdumpDestinationAddress','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceKdumpDestinationPort','7410','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceKdumpMessageInterval','5','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('FenceKdumpListenerTimeout','90','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('KdumpStartedTimeout','30','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AlertOnNumberOfLVs','300','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CSRFProtection','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CORSSupport','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CORSAllowedOrigins','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CORSAllowDefaultOrigins','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CORSDefaultOriginSuffixes',':9090','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CockpitPort','9090','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CockpitSSOPort','9986','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UsageHistoryLimit','40', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HostStorageLeaseAliveCheckingInterval', '90', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UnsupportedLocalesFilter','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DefaultAutoConvergence','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DefaultMigrationCompression','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MigrationPolicies','[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},"maxMigrations":2,"autoConvergence":true,"migrationCompression":false,"enableGuestEvents":true,"name":"Minimal downtime","description":"A policy that lets the VM migrate in typical situations. The VM should not experience any significant downtime. If the VM migration is not converging for a long time, the migration will be aborted. The guest agent hook mechanism is enabled.","config":{"convergenceItems":[{"stallingLimit":1,"convergenceItem":{"action":"setDowntime","params":["150"]}},{"stallingLimit":2,"convergenceItem":{"action":"setDowntime","params":["200"]}},{"stallingLimit":3,"convergenceItem":{"action":"setDowntime","params":["300"]}},{"stallingLimit":4,"convergenceItem":{"action":"setDowntime","params":["400"]}},{"stallingLimit":6,"convergenceItem":{"action":"setDowntime","params":["500"]}}],"initialItems":[{"action":"setDowntime","params":["100"]}],"lastItems":[{"action":"abort","params":[]}]}},{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827c"},"maxMigrations":1,"autoConvergence":true,"migrationCompression":true,"enableGuestEvents":true,"name":"Suspend workload if needed","description":"A policy that lets the VM migrate in most situations, including VMs running heavy workloads. On the other hand, the VM may experience a more significant downtime. The migration may still be aborted for extreme workloads. The guest agent hook mechanism is enabled.","config":{"convergenceItems":[{"stallingLimit":1,"convergenceItem":{"action":"setDowntime","params":["150"]}},{"stallingLimit":2,"convergenceItem":{"action":"setDowntime","params":["200"]}},{"stallingLimit":3,"convergenceItem":{"action":"setDowntime","params":["300"]}},{"stallingLimit":4,"convergenceItem":{"action":"setDowntime","params":["400"]}},{"stallingLimit":6,"convergenceItem":{"action":"setDowntime","params":["500"]}}],"initialItems":[{"action":"setDowntime","params":["100"]}],"lastItems":[{"action":"setDowntime","params":["5000"]},{"action":"abort","params":[]}]}},{"id":{"uuid":"a7aeedb2-8d66-4e51-bb22-32595027ce71"},"maxMigrations":2,"autoConvergence":true,"migrationCompression":false,"enableGuestEvents":true,"name":"Post-copy migration","description":"The VM should not experience any significant downtime. If the VM migration is not converging for a long time, the migration will be switched to post-copy. The guest agent hook mechanism is enabled.","config":{"convergenceItems":[{"stallingLimit":1,"convergenceItem":{"action":"setDowntime","params":["150"]}},{"stallingLimit":2,"convergenceItem":{"action":"setDowntime","params":["200"]}}],"initialItems":[{"action":"setDowntime","params":["100"]}],"lastItems":[{"action":"postcopy","params":[]},{"action":"abort","params":[]}]}}]','4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('MigrationPolicies','[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},"maxMigrations":2,"autoConvergence":true,"migrationCompression":false,"enableGuestEvents":true,"name":"Minimal downtime","description":"A policy that lets the VM migrate in typical situations. The VM should not experience any significant downtime. If the VM migration is not converging for a long time, the migration will be aborted. The guest agent hook mechanism is enabled.","config":{"convergenceItems":[{"stallingLimit":1,"convergenceItem":{"action":"setDowntime","params":["150"]}},{"stallingLimit":2,"convergenceItem":{"action":"setDowntime","params":["200"]}},{"stallingLimit":3,"convergenceItem":{"action":"setDowntime","params":["300"]}},{"stallingLimit":4,"convergenceItem":{"action":"setDowntime","params":["400"]}},{"stallingLimit":6,"convergenceItem":{"action":"setDowntime","params":["500"]}}],"initialItems":[{"action":"setDowntime","params":["100"]}],"lastItems":[{"action":"abort","params":[]}]}},{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827c"},"maxMigrations":1,"autoConvergence":true,"migrationCompression":true,"enableGuestEvents":true,"name":"Suspend workload if needed","description":"A policy that lets the VM migrate in most situations, including VMs running heavy workloads. On the other hand, the VM may experience a more significant downtime. The migration may still be aborted for extreme workloads. The guest agent hook mechanism is enabled.","config":{"convergenceItems":[{"stallingLimit":1,"convergenceItem":{"action":"setDowntime","params":["150"]}},{"stallingLimit":2,"convergenceItem":{"action":"setDowntime","params":["200"]}},{"stallingLimit":3,"convergenceItem":{"action":"setDowntime","params":["300"]}},{"stallingLimit":4,"convergenceItem":{"action":"setDowntime","params":["400"]}},{"stallingLimit":6,"convergenceItem":{"action":"setDowntime","params":["500"]}}],"initialItems":[{"action":"setDowntime","params":["100"]}],"lastItems":[{"action":"setDowntime","params":["5000"]},{"action":"abort","params":[]}]}},{"id":{"uuid":"a7aeedb2-8d66-4e51-bb22-32595027ce71"},"maxMigrations":2,"autoConvergence":true,"migrationCompression":false,"enableGuestEvents":true,"name":"Post-copy migration","description":"The VM should not experience any significant downtime. If the VM migration is not converging for a long time, the migration will be switched to post-copy. The guest agent hook mechanism is enabled.","config":{"convergenceItems":[{"stallingLimit":1,"convergenceItem":{"action":"setDowntime","params":["150"]}},{"stallingLimit":2,"convergenceItem":{"action":"setDowntime","params":["200"]}}],"initialItems":[{"action":"setDowntime","params":["100"]}],"lastItems":[{"action":"postcopy","params":[]},{"action":"abort","params":[]}]}}]','4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('DestroyOnRebootSupported','false','4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('DestroyOnRebootSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HostedEngineVmName','HostedEngine','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AutoImportHostedEngine','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AllowEditingHostedEngine','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HostedEngineConfigDiskSizeInBytes','20480','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HostedEngineConfigurationImageGuid','','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ImageProxyAddress','localhost:54323','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ImageProxySSLEnabled','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ImageDaemonPort','54322','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ImageTransferClientTicketValidityInSeconds','3600','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ImageTransferHostTicketValidityInSeconds','300','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ImageTransferHostTicketRefreshAllowanceInSeconds','60','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ImageTransferPausedLogIntervalInSeconds','1800','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('TransferImageClientInactivityTimeoutInSeconds','60','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UploadImageChunkSizeKB','8192','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UploadImageXhrTimeoutInSeconds','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UploadImageXhrRetryIntervalInSeconds','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UploadImageXhrMaxRetries','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('GetImageTicketSupported', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('GetImageTicketSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('DefaultRouteReportedByVdsm', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('DefaultRouteReportedByVdsm', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('LldpInformationSupported', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('LldpInformationSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('Ping2SupportedByVdsm', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('Ping2SupportedByVdsm', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ConfirmConnectivitySupportedByVdsm', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ConfirmConnectivitySupportedByVdsm', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ForceRefreshDomainFilesListByDefault','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('CustomBondNameSupported', 'false', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('CustomBondNameSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HystrixMonitoringEnabled','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('BiosTypeSupported', 'false', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('BiosTypeSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('VgpuPlacementSupported', 'false', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('VgpuPlacementSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DbJustRestored','0','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PredefinedVMProperties', 'sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$;mdev_type=^.*$', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('PredefinedVMProperties', 'sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$;mdev_type=^[^](,?[0-9A-Za-z-]+)+$;hugepages=^[0-9]+$', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UseHostNameIdentifier', 'false', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AffinityRulesEnforcementManagerInitialDelay', '1', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AttestationSecondStageSize', '20', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('BootstrapCacheRefreshInterval', '10000', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('BootstrapCommand', > 'umask 0077; MYTMP="$(TMPDIR="${OVIRT_TMPDIR}" mktemp -d -t ovirt-XXXXXXXXXX)"; trap "chmod -R u+rwX \"${MYTMP}\" > /dev/null 2>&1; rm -fr \"${MYTMP}\" > /dev/null 2>&1" 0; tar --warning=no-timestamp -C "${MYTMP}" -x && @ENVIRONMENT@ "${MYTMP}"/@ENTRY@ DIALOG/dialect=str:machine DIALOG/customization=bool:True', > 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('BootstrapPackageDirectory', '/usr/share/ovirt-host-deploy/interface-3', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('BootstrapPackageName', 'ovirt-host-deploy.tar', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CertExpirationAlertPeriodInDays', '7', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CertExpirationWarnPeriodInDays', '30', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DBI18NPrefix', '', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DBLikeSyntax', 'ILIKE', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DBPagingSyntax', ' WHERE RowNum BETWEEN %1$s AND %2$s', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DBPagingType', 'Range', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DBSearchTemplate', > 'SELECT * FROM (SELECT *, ROW_NUMBER() OVER(%1$s) as RowNum FROM (%2$s)) as T1 ) as T2 %3$s', > 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('DnsResolverConfigurationSupported', 'true', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EnableAutomaticHostPowerManagement', 'false', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ExternalNetworkProviderConnectionTimeout', '20', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ExternalNetworkProviderTimeout', '30', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('ExternalNetworkProviderSynchronizationRate', '300', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GetVdsmIdByVdsmToolCommand', '/usr/bin/vdsm-tool vdsm-id', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GlusterPeerStatusCommand', 'gluster peer status --xml', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HighUtilizationForScheduling', '90', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HighVmCountForEvenGuestDistribute', '10', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HostsInReserve', '0', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('HotPlugMemoryBlockSizeMb', '256', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxCpuLimitQosValue', '100', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxIopsUpperBoundQosValue', '1000000', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxReadIopsUpperBoundQosValue', '1000000', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxReadThroughputUpperBoundQosValue', '1000000', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxThroughputUpperBoundQosValue', '1000000', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxVmNameLength', '64', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxVmNameLengthSysprep', '15', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxWriteIopsUpperBoundQosValue', '1000000', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MaxWriteThroughputUpperBoundQosValue', '1000000', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MigrationThresholdForEvenGuestDistribute', '5', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MinimumPercentageToUpdateQuotaCache', '60', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('MultiFirewallSupportSince', '4.0', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('PgMajorRelease', '9', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('QuotaCacheIntervalInMinutes', '10', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('RepoDomainInvalidateCacheTimeInMinutes', '1', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SSHDefaultKeyDigest', 'SHA-256', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SSHKeyAlias', 'ovirt-engine', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('SpmVmGraceForEvenGuestDistribute', '5', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('UnsupportedLocalesFilterOverrides', '', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('VMConsoleTicketTolerance', '10000', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('SpiceSecureChannels', > 'smain,sinputs,scursor,splayback,srecord,sdisplay,ssmartcard,susbredir', > '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('SshHostRebootCommand', > 'systemctl reboot', > '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('SshSoftFencingCommand', '/usr/bin/vdsm-tool service-restart vdsmd', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('SshVdsPowerdownCommand', '/sbin/poweroff', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('VdsFenceOptionMapping', > 'apc:secure=secure,port=ipport,slot=port;apc_snmp:port=port,encrypt_options=encrypt_options;bladecenter:secure=secure,port=ipport,slot=port;cisco_ucs:secure=ssl,slot=port;drac5:secure=secure,slot=port;drac7:;eps:slot=port;hpblade:port=port;ilo:secure=ssl,port=ipport;ipmilan:;ilo2:secure=ssl,port=ipport;ilo3:;ilo4:;ilo_ssh:port=port;rsa:secure=secure,port=ipport;rsb:;wti:secure=secure,port=ipport,slot=port', > '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('VdsFenceType', > 'apc,apc_snmp,bladecenter,cisco_ucs,drac5,drac7,eps,hpblade,ilo,ilo2,ilo3,ilo4,ilo_ssh,ipmilan,rsa,rsb,wti', > '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('IsHighPerformanceTypeSupported', 'false', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('IsHighPerformanceTypeSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ScsiReservationSupported', 'false', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('ScsiReservationSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('AlwaysFilterResultsForWebUi', 'false', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('EnableKASLRDump','false','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('GuestNicNamesBlacklist','lo[0-9]*,Loopback.*','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('HyperVSynicStimerSupported', 'false', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value_for_versions_up_to('HyperVSynicStimerSupported', 'true', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('CinderlibCommandTimeoutInMinutes','2','general'); >************************** > > > >********* QUERY ********** >select fn_db_add_config_value('NumOfPciExpressPorts', '16', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('AutoRecoveryAllowedTypes','{"storage domains":"true","hosts":"true"}','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('BootstrapMinimalVdsmVersion','4.9','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('DBEngine','Postgres','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('DefaultTimeZone','(GMT) GMT Standard Time','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('FenceAgentDefaultParams','drac7:privlvl=OPERATOR,lanplus=1,delay=10;ilo3:power_wait=4;ilo4:power_wait=4;ilo_ssh:secure=1','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('FenceAgentDefaultParamsForPPC','ilo3:cipher=1,privlvl=OPERATOR,power_wait=4,retry_on=2;ilo4:cipher=1,privlvl=OPERATOR,power_wait=4,retry_on=2;ipmilan:lanplus=1,cipher=1,privlvl=OPERATOR,power_wait=4,retry_on=2;ilo_ssh:secure=1','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('FenceAgentMapping','drac7=ipmilan,ilo2=ilo','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('FenceStartStatusDelayBetweenRetriesInSec','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('FenceStartStatusRetries','18','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('FenceStopStatusDelayBetweenRetriesInSec','10','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('FenceStopStatusRetries','18','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('FencePowerWaitParam','apc=power_wait,apc_snmp=power_wait,bladecenter=power_wait,cisco_ucs=power_wait,drac5=power_wait,drac7=power_wait,eps=delay,hpblade=power_wait,ilo=power_wait,ilo2=power_wait,ilo3=power_wait,ilo4=power_wait,ilo_ssh=power_wait,ipmilan=power_wait,rsa=power_wait,rsb=power_wait,wti=power_wait','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('QemuimgCommitSupported','true','4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('AgentChannelNamingSupported','true','4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('GuestNicNamesBlacklist','lo[0-9]*,Loopback.*','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('IPTablesConfig',' ># oVirt default firewall configuration. Automatically generated by vdsm bootstrap script. >*filter >:INPUT ACCEPT [0:0] >:FORWARD ACCEPT [0:0] >:OUTPUT ACCEPT [0:0] >-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT >-A INPUT -p icmp -j ACCEPT >-A INPUT -i lo -j ACCEPT ># vdsm >-A INPUT -p tcp --dport @VDSM_PORT@ -j ACCEPT ># ovirt-imageio-daemon >-A INPUT -p tcp --dport 54322 -j ACCEPT ># rpc.statd >-A INPUT -p tcp --dport 111 -j ACCEPT >-A INPUT -p udp --dport 111 -j ACCEPT ># SSH >-A INPUT -p tcp --dport @SSH_PORT@ -j ACCEPT ># snmp >-A INPUT -p udp --dport 161 -j ACCEPT ># Cockpit >-A INPUT -p tcp --dport 9090 -j ACCEPT > >@CUSTOM_RULES@ > ># Reject any other input traffic >-A INPUT -j REJECT --reject-with icmp-host-prohibited >-A FORWARD -m physdev ! --physdev-is-bridged -j REJECT --reject-with icmp-host-prohibited >COMMIT >','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('IPTablesConfigForGluster', >' ># glusterd >-A INPUT -p tcp -m tcp --dport 24007 -j ACCEPT > ># gluster swift >-A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT > ># portmapper >-A INPUT -p tcp -m tcp --dport 38465 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 38466 -j ACCEPT > ># nfs >-A INPUT -p tcp -m tcp --dport 38467 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 2049 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 38469 -j ACCEPT > ># nrpe >-A INPUT -p tcp --dport 5666 -j ACCEPT > ># status >-A INPUT -p tcp -m tcp --dport 39543 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 55863 -j ACCEPT > ># nlockmgr >-A INPUT -p tcp -m tcp --dport 38468 -j ACCEPT >-A INPUT -p udp -m udp --dport 963 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 965 -j ACCEPT > ># ctdbd >-A INPUT -p tcp -m tcp --dport 4379 -j ACCEPT > ># smbd >-A INPUT -p tcp -m tcp --dport 139 -j ACCEPT >-A INPUT -p tcp -m tcp --dport 445 -j ACCEPT > ># Ports for gluster volume bricks (default 100 ports) ># Needed for Gluster < 3.4.0 compatibility >-A INPUT -p tcp -m tcp --dport 24009:24108 -j ACCEPT > ># Ports required for GlusterFS brick processes have changed in ># glusterfs 3.4.0 from 24009 onwards to 49152 onwards. >-A INPUT -p tcp -m tcp --dport 49152:49251 -j ACCEPT > ># Ports for gluster volume bricks in Hyper Converged setup(default 100 ports) >-A INPUT -p tcp -m tcp --dport 49217:49316 -j ACCEPT > >','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('IPTablesConfigForVirt', >' ># libvirt tls >-A INPUT -p tcp --dport 16514 -j ACCEPT > ># serial consoles >-A INPUT -p tcp -m multiport --dports 2223 -j ACCEPT > ># guest consoles >-A INPUT -p tcp -m multiport --dports 5900:6923 -j ACCEPT > ># migration >-A INPUT -p tcp -m multiport --dports 49152:49216 -j ACCEPT > ># OVN host tunnels >-A INPUT -p udp --dport 6081 -j ACCEPT >-A OUTPUT -p udp --dport 6081 -j ACCEPT >', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('IsMultilevelAdministrationOn','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('MinimalETLVersion','4.3.0','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('OvirtInitialSupportedIsoVersion','2.5.5:5.8','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('OvirtIsoPrefix','^ovirt-node-iso-([0-9].*)\.iso$:^rhevh-([0-9].*)\.iso$','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('OvirtNodeOS','^ovirt.*$:^rhev.*$','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('oVirtISOsRepositoryPath','/usr/share/ovirt-node-iso:/usr/share/rhev-hypervisor','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('PostgresPagingSyntax','OFFSET (%1$s -1) LIMIT %2$s','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('PostgresSearchTemplate','SELECT * FROM (%2$s) %1$s) as T1 %3$s','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('RhevhLocalFSPath','/data/images/rhev','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('ClusterEmulatedMachines','pc-i440fx-rhel7.3.0,pc-i440fx-2.6,pseries-rhel7.3.0','4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('ClusterEmulatedMachines','pc-i440fx-rhel7.3.0,pc-i440fx-2.6,pseries-rhel7.5.0,s390-ccw-virtio-2.8','4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('ClusterEmulatedMachines','pc-i440fx-rhel7.6.0,pc-i440fx-2.12,pseries-rhel7.6.0-sxxm,s390-ccw-virtio-2.12','4.3'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('SpiceDriverNameInGuest','{"windows": "RHEV-Spice", "linux" : "xorg-x11-drv-qxl" }','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('SupportedClusterLevels','4.1,4.2,4.3','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('SupportedVDSMVersions','4.17,4.18','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('VdcVersion','4.1.0.0','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('ProductRPMVersion','4.1.0.0','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('VdsFenceOptionMapping','apc:secure=secure,port=ipport,slot=port;apc_snmp:port=port,encrypt_options=encrypt_options;bladecenter:secure=secure,port=ipport,slot=port;cisco_ucs:secure=ssl,slot=port;drac5:secure=secure,slot=port;drac7:;eps:slot=port;hpblade:port=port;ilo:secure=ssl,port=ipport;ipmilan:;ilo2:secure=ssl,port=ipport;ilo3:;ilo4:;ilo_ssh:port=port;rsa:secure=secure,port=ipport;rsb:;wti:secure=secure,port=ipport,slot=port','4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('VdsFenceType','apc,apc_snmp,bladecenter,cisco_ucs,drac5,drac7,eps,hpblade,ilo,ilo2,ilo3,ilo4,ilo_ssh,ipmilan,rsa,rsb,wti','4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('VdsRefreshRate','3','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('VmGracefulShutdownMessage','System Administrator has initiated shutdown of this Virtual Machine. Virtual Machine is shutting down.','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('AgentAppName','ovirt-guest-agent-common,ovirt-guest-agent','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('AutoStartVmsRunnerIntervalInSeconds','1','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('AllowEditingHostedEngine','true','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('HotPlugCpuSupported', '{"x86":"true","ppc":"true"}', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('HotUnplugCpuSupported', '{"x86":"true","ppc":"true"}', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('IsMigrationSupported','{"undefined": "true", "x86": "true", "ppc" : "true" }','4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('IsMigrationSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true"}','4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('IsMemorySnapshotSupported','{"undefined": "true", "x86": "true", "ppc" : "true" }','4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('IsMemorySnapshotSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true"}','4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('IsSuspendSupported','{"undefined": "true", "x86": "true", "ppc" : "true" }','4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('IsSuspendSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true"}','4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('HotPlugCpuSupported', '{"x86":"true","ppc":"true","s390x":"true"}', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('HotUnplugCpuSupported', '{"x86":"true","ppc":"true","s390x":"false"}', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('PackageNamesForCheckUpdate','ioprocess,mom,libvirt-client,libvirt-daemon-config-nwfilter,libvirt-daemon-kvm,libvirt-lock-sanlock,libvirt-python,lvm2,ovirt-imageio-common,ovirt-imageio-daemon,ovirt-vmconsole,ovirt-vmconsole-host,python-ioprocess,qemu-kvm,qemu-img,sanlock,vdsm,vdsm-cli,collectd,collectd-disk,collectd-netlink,collectd-write_http,fluentd,rubygem-fluent-plugin-rewrite-tag-filter,rubygem-fluent-plugin-secure-forward,rubygem-fluent-plugin-collectd-nest,rubygem-fluent-plugin-viaq_data_model','4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('PackageNamesForCheckUpdate','ioprocess,mom,libvirt-client,libvirt-daemon-config-nwfilter,libvirt-daemon-kvm,libvirt-lock-sanlock,libvirt-python,lvm2,ovirt-imageio-common,ovirt-imageio-daemon,ovirt-vmconsole,ovirt-vmconsole-host,python-ioprocess,qemu-kvm,qemu-img,sanlock,vdsm,vdsm-client,collectd,collectd-disk,collectd-netlink,collectd-write_http,fluentd,rubygem-fluent-plugin-rewrite-tag-filter,rubygem-fluent-plugin-secure-forward,rubygem-fluent-plugin-collectd-nest,rubygem-fluent-plugin-viaq_data_model','4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('PackageNamesForCheckUpdate','ioprocess,mom,libvirt-client,libvirt-daemon-config-nwfilter,libvirt-daemon-kvm,libvirt-lock-sanlock,libvirt-python,lvm2,ovirt-imageio-common,ovirt-imageio-daemon,ovirt-vmconsole,ovirt-vmconsole-host,python-ioprocess,qemu-kvm,qemu-img,sanlock,vdsm,vdsm-client,collectd,collectd-disk,collectd-netlink,collectd-write_http,fluentd,rubygem-fluent-plugin-rewrite-tag-filter,rubygem-fluent-plugin-secure-forward,rubygem-fluent-plugin-collectd-nest,rubygem-fluent-plugin-viaq_data_model','4.3'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('PredefinedVMProperties', 'sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$;mdev_type=^.*$', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('PredefinedVMProperties', 'sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$;mdev_type=^.*$;hugepages=^[0-9]+$', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('PredefinedVMProperties', 'sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$;mdev_type=^[^,](,?[0-9A-Za-z-]+)+$;hugepages=^[0-9]+$', '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('HotPlugMemorySupported','{"x86":"true","ppc":"true"}','4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('HotPlugMemorySupported','{"x86":"true","ppc":"true","s390x":"false"}', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('HotUnplugMemorySupported', '{"x86":"false","ppc":"false"}', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('HotUnplugMemorySupported','{"x86":"true","ppc":"true","s390x":"false"}','4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('MaxNumOfVmCpus', '384', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('MaxNumOfCpuPerSocket', '254', '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('MaxNumOfCpuPerSocket', '254', '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('ServerCPUList', > '3:Intel Conroe Family:vmx,nx,model_Conroe:Conroe:x86_64; ' > || '4:Intel Penryn Family:vmx,nx,model_Penryn:Penryn:x86_64; ' > || '5:Intel Nehalem Family:vmx,nx,model_Nehalem:Nehalem:x86_64; ' > || '6:Intel Nehalem IBRS Family:vmx,nx,spec_ctrl,model_Nehalem:Nehalem,+spec-ctrl:x86_64; ' > || '7:Intel Nehalem IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Nehalem:Nehalem,+spec-ctrl,+ssbd:x86_64; ' > || '8:Intel Westmere Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; ' > || '9:Intel Westmere IBRS Family:aes,vmx,nx,spec_ctrl,model_Westmere:Westmere,+spec-ctrl:x86_64; ' > || '10:Intel Westmere IBRS SSBD Family:aes,vmx,nx,spec_ctrl,ssbd,model_Westmere:Westmere,+pcid,+spec-ctrl,+ssbd:x86_64; ' > || '11:Intel SandyBridge Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; ' > || '12:Intel SandyBridge IBRS Family:vmx,nx,spec_ctrl,model_SandyBridge:SandyBridge,+spec-ctrl:x86_64; ' > || '13:Intel SandyBridge IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_SandyBridge:SandyBridge,+pcid,+spec-ctrl,+ssbd:x86_64; ' > || '14:Intel Haswell-noTSX Family:vmx,nx,model_Haswell-noTSX:Haswell-noTSX:x86_64; ' > || '15:Intel Haswell-noTSX IBRS Family:vmx,nx,spec_ctrl,model_Haswell-noTSX:Haswell-noTSX,+spec-ctrl:x86_64; ' > || '16:Intel Haswell-noTSX IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Haswell-noTSX:Haswell-noTSX,+spec-ctrl,+ssbd:x86_64; ' > || '17:Intel Haswell Family:vmx,nx,model_Haswell:Haswell:x86_64; ' > || '18:Intel Haswell IBRS Family:vmx,nx,spec_ctrl,model_Haswell:Haswell,+spec-ctrl:x86_64; ' > || '19:Intel Haswell IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Haswell:Haswell,+spec-ctrl,+ssbd:x86_64; ' > || '20:Intel Broadwell-noTSX Family:vmx,nx,model_Broadwell-noTSX:Broadwell-noTSX:x86_64; ' > || '21:Intel Broadwell-noTSX IBRS Family:vmx,nx,spec_ctrl,model_Broadwell-noTSX:Broadwell-noTSX,+spec-ctrl:x86_64; ' > || '22:Intel Broadwell-noTSX IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Broadwell-noTSX:Broadwell-noTSX,+spec-ctrl,+ssbd:x86_64; ' > || '23:Intel Broadwell Family:vmx,nx,model_Broadwell:Broadwell:x86_64; ' > || '24:Intel Broadwell IBRS Family:vmx,nx,spec_ctrl,model_Broadwell:Broadwell,+spec-ctrl:x86_64; ' > || '25:Intel Broadwell IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Broadwell:Broadwell,+spec-ctrl,+ssbd:x86_64; ' > || '26:Intel Skylake Client Family:vmx,nx,model_Skylake-Client:Skylake-Client:x86_64; ' > || '27:Intel Skylake Client IBRS Family:vmx,nx,spec_ctrl,model_Skylake-Client:Skylake-Client,+spec-ctrl:x86_64; ' > || '28:Intel Skylake Client IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Skylake-Client:Skylake-Client,+spec-ctrl,+ssbd:x86_64; ' > || '2:AMD Opteron G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; ' > || '3:AMD Opteron G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; ' > || '4:AMD Opteron G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64; ' > || '5:AMD Opteron G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; ' > || '6:AMD Opteron G5:svm,nx,model_Opteron_G5:Opteron_G5:x86_64; ' > || '3:IBM POWER8:powernv,model_POWER8:POWER8:ppc64;', > '4.1'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('ServerCPUList', > '3:Intel Conroe Family:vmx,nx,model_Conroe:Conroe:x86_64; ' > || '4:Intel Penryn Family:vmx,nx,model_Penryn:Penryn:x86_64; ' > || '5:Intel Nehalem Family:vmx,nx,model_Nehalem:Nehalem:x86_64; ' > || '6:Intel Nehalem IBRS Family:vmx,nx,spec_ctrl,model_Nehalem:Nehalem,+spec-ctrl:x86_64; ' > || '7:Intel Nehalem IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Nehalem:Nehalem,+spec-ctrl,+ssbd:x86_64; ' > || '8:Intel Westmere Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; ' > || '9:Intel Westmere IBRS Family:aes,vmx,nx,spec_ctrl,model_Westmere:Westmere,+spec-ctrl:x86_64; ' > || '10:Intel Westmere IBRS SSBD Family:aes,vmx,nx,spec_ctrl,ssbd,model_Westmere:Westmere,+pcid,+spec-ctrl,+ssbd:x86_64; ' > || '11:Intel SandyBridge Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; ' > || '12:Intel SandyBridge IBRS Family:vmx,nx,spec_ctrl,model_SandyBridge:SandyBridge,+spec-ctrl:x86_64; ' > || '13:Intel SandyBridge IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_SandyBridge:SandyBridge,+pcid,+spec-ctrl,+ssbd:x86_64; ' > || '14:Intel Haswell-noTSX Family:vmx,nx,model_Haswell-noTSX:Haswell-noTSX:x86_64; ' > || '15:Intel Haswell-noTSX IBRS Family:vmx,nx,spec_ctrl,model_Haswell-noTSX:Haswell-noTSX,+spec-ctrl:x86_64; ' > || '16:Intel Haswell-noTSX IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Haswell-noTSX:Haswell-noTSX,+spec-ctrl,+ssbd:x86_64; ' > || '17:Intel Haswell Family:vmx,nx,model_Haswell:Haswell:x86_64; ' > || '18:Intel Haswell IBRS Family:vmx,nx,spec_ctrl,model_Haswell:Haswell,+spec-ctrl:x86_64; ' > || '19:Intel Haswell IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Haswell:Haswell,+spec-ctrl,+ssbd:x86_64; ' > || '20:Intel Broadwell-noTSX Family:vmx,nx,model_Broadwell-noTSX:Broadwell-noTSX:x86_64; ' > || '21:Intel Broadwell-noTSX IBRS Family:vmx,nx,spec_ctrl,model_Broadwell-noTSX:Broadwell-noTSX,+spec-ctrl:x86_64; ' > || '22:Intel Broadwell-noTSX IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Broadwell-noTSX:Broadwell-noTSX,+spec-ctrl,+ssbd:x86_64; ' > || '23:Intel Broadwell Family:vmx,nx,model_Broadwell:Broadwell:x86_64; ' > || '24:Intel Broadwell IBRS Family:vmx,nx,spec_ctrl,model_Broadwell:Broadwell,+spec-ctrl:x86_64; ' > || '25:Intel Broadwell IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Broadwell:Broadwell,+spec-ctrl,+ssbd:x86_64; ' > || '26:Intel Skylake Client Family:vmx,nx,model_Skylake-Client:Skylake-Client:x86_64; ' > || '27:Intel Skylake Client IBRS Family:vmx,nx,spec_ctrl,model_Skylake-Client:Skylake-Client,+spec-ctrl:x86_64; ' > || '28:Intel Skylake Client IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Skylake-Client:Skylake-Client,+spec-ctrl,+ssbd:x86_64; ' > || '2:AMD Opteron G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; ' > || '3:AMD Opteron G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; ' > || '4:AMD Opteron G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64; ' > || '5:AMD Opteron G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; ' > || '6:AMD Opteron G5:svm,nx,model_Opteron_G5:Opteron_G5:x86_64; ' > || '3:IBM POWER8:powernv,model_POWER8:POWER8:ppc64;', > '4.2'); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('ServerCPUList', > '5:Intel Nehalem Family:vmx,nx,model_Nehalem:Nehalem:x86_64; ' > || '7:Intel Nehalem IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Nehalem:Nehalem,+spec-ctrl,+ssbd:x86_64; ' > || '8:Intel Westmere Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; ' > || '10:Intel Westmere IBRS SSBD Family:aes,vmx,nx,spec_ctrl,ssbd,model_Westmere:Westmere,+pcid,+spec-ctrl,+ssbd:x86_64; ' > || '11:Intel SandyBridge Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; ' > || '13:Intel SandyBridge IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_SandyBridge:SandyBridge,+pcid,+spec-ctrl,+ssbd:x86_64; ' > || '14:Intel Haswell-noTSX Family:vmx,nx,model_Haswell-noTSX:Haswell-noTSX:x86_64; ' > || '16:Intel Haswell-noTSX IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Haswell-noTSX:Haswell-noTSX,+spec-ctrl,+ssbd:x86_64; ' > || '17:Intel Haswell Family:vmx,nx,model_Haswell:Haswell:x86_64; ' > || '19:Intel Haswell IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Haswell:Haswell,+spec-ctrl,+ssbd:x86_64; ' > || '20:Intel Broadwell-noTSX Family:vmx,nx,model_Broadwell-noTSX:Broadwell-noTSX:x86_64; ' > || '22:Intel Broadwell-noTSX IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Broadwell-noTSX:Broadwell-noTSX,+spec-ctrl,+ssbd:x86_64; ' > || '23:Intel Broadwell Family:vmx,nx,model_Broadwell:Broadwell:x86_64; ' > || '25:Intel Broadwell IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Broadwell:Broadwell,+spec-ctrl,+ssbd:x86_64; ' > || '26:Intel Skylake Client Family:vmx,nx,model_Skylake-Client:Skylake-Client:x86_64; ' > || '28:Intel Skylake Client IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Skylake-Client:Skylake-Client,+spec-ctrl,+ssbd:x86_64; ' > || '29:Intel Skylake Server Family:vmx,nx,model_Skylake-Server:Skylake-Server:x86_64; ' > || '31:Intel Skylake Server IBRS SSBD Family:vmx,nx,spec_ctrl,ssbd,model_Skylake-Server:Skylake-Server,+spec-ctrl,+ssbd:x86_64; ' > || '5:AMD Opteron G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; ' > || '6:AMD Opteron G5:svm,nx,model_Opteron_G5:Opteron_G5:x86_64; ' > || '7:AMD EPYC:svm,nx,model_EPYC:EPYC:x86_64; ' > || '9:AMD EPYC IBPB SSBD:svm,nx,ibpb,ssbd,model_EPYC:EPYC,+ibpb,+virt-ssbd:x86_64; ' > || '3:IBM POWER8:powernv,model_POWER8:POWER8:ppc64; ' > || '4:IBM POWER9:powernv,model_POWER9:POWER9:ppc64; ' > || '2:IBM z114, z196:sie,model_z196-base:z196-base:s390x; ' > || '3:IBM zBC12, zEC12:sie,model_zEC12-base:zEC12-base:s390x; ' > || '4:IBM z13s, z13:sie,model_z13-base:z13-base:s390x; ' > || '5:IBM z14:sie,model_z14-base:z14-base:s390x;', > '4.3'); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('AsyncTaskZombieTaskLifeInMinutes','300','3000','general',false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('VdsLocalDisksCriticallyLowFreeSpace','100','500','general',false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('VdsLocalDisksLowFreeSpace','500', '1000','general',false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('VdsLocalDisksLowFreeSpace','1000', '100','general',false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('GuestToolsSetupIsoPrefix','RHEV-toolsSetup_', 'ovirt-guest-tools-','general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('vdsConnectionTimeout', '180', '2', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('vdsRetries', '3', '0', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('VdsmSSLProtocol','SSLv3','TLSv1','general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('VdsmSSLProtocol','TLSv1','TLS','general',false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('VdsmSSLProtocol','TLS','TLSv1.2','general',false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('ExternalCommunicationProtocol','SSLv3','TLSv1.2','general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('ExternalCommunicationProtocol','TLSv1','TLSv1.2','general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('GlusterStorageDeviceListMountPointsToIgnore','/,/home,/boot,/run/gluster/snaps/.*', '/,/home,/boot,/run/gluster/snaps/.*,/var/run/gluster/snaps/.*','general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('vdsHeartbeatInSeconds','10','30','general',false); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('MaxVmNameLengthNonWindows', 'MaxVmNameLength', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_rename_config_key('MaxVmNameLengthWindows', 'MaxVmNameLengthSysprep', 'general'); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('ClientModeSpiceDefault','Plugin','Native','general',false); >************************** > > > >********* QUERY ********** >select fn_db_update_config_value('RemoteViewerSupportedVersions','rhev-win64:2.0-160;rhev-win32:2.0-160;rhel7:2.0-6;rhel6:99.0-1','general'); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('vdsConnectionTimeout','2','20','general',false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('ProtocolFallbackRetries','3','25','general',false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('DwhHeartBeatInterval', '30', '15', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('UploadImageXhrTimeoutInSeconds', '10', '120', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('UploadImageXhrTimeoutInSeconds','120', '300', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('UploadImageXhrTimeoutInSeconds','300', '600', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('UploadImageChunkSizeKB','8192', '102400', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('ImageTransferClientTicketValidityInSeconds','3600', '36000', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('ImageTransferHostTicketRefreshAllowanceInSeconds', '60', '240', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('AlertOnNumberOfLVs', '300', '1300', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('AlertOnNumberOfLVs', '1000', '1300', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('MaxAverageNetworkQoSValue', '1024', '17179', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('MaxPeakNetworkQoSValue', '2048', '34359', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_update_default_config_value('GlusterRefreshRateLight', '5', '15', 'general', false); >************************** > > > >********* QUERY ********** >select fn_db_split_config_value('GlusterTunedProfile', 'rhs-high-throughput,rhs-virtualization', 'virtual-host,rhgs-sequential-io,rhgs-random-io', '4.1'); >************************** > > > >********* QUERY ********** >create or replace function __temp_set_pg_major_release() >RETURNS void >AS $procedure$ >DECLARE > v_pg_major_release char(1); >BEGIN > -- the folowing evaluates currently to 8 on PG 8.x and to 9 on PG 9.x > v_pg_major_release:=substring ((string_to_array(version(),' '))[2],1,1); > perform fn_db_add_config_value('PgMajorRelease',v_pg_major_release,'general'); > -- ensure that if PG was upgraded we will get the right value > perform fn_db_update_config_value('PgMajorRelease',v_pg_major_release,'general'); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >SELECT __temp_set_pg_major_release(); >************************** > > > >********* QUERY ********** >DROP FUNCTION __temp_set_pg_major_release(); >************************** > >DROP FUNCTION >********* QUERY ********** >select fn_db_change_column_type('vdc_options', 'default_value', 'VARCHAR(4000)', 'VARCHAR(4000) NOT NULL'); >************************** > > > >2019-02-26 17:06:38,252+0100 Running upgrade sql script '/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0010_custom.sql'... >2019-02-26 17:06:38,253+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0010_custom.sql >********* QUERY ********** >/********************************************************************************************** > Currently we have a bug that upgarde 03010250 was cherry-picked and installed after 03010130 > This caused all scripts between 03010140 and 03010240 not to run. > This scripts removes the 03010250 from schema_version and updates 03010130 to be the curent version > So, after that , all scripts from 03010140 and up will run > Since 03010250 was a configuration change that is already handled in the new config.sql, no other handling is needed. >**********************************************************************************************/ >update schema_version set current = true where version = '03010130' >and exists(select 1 from schema_version where version = '03010250' and current = true); >************************** > >UPDATE 0 >********* QUERY ********** >delete from schema_version >where version = '03010250' and current = true; >************************** > >DELETE 0 >********* QUERY ********** >select fn_db_add_column('vds_dynamic','supported_engines','varchar(40)'); >************************** > > > >2019-02-26 17:06:38,272+0100 Running upgrade sql script '/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0040_extend_installed_by_column.sql'... >2019-02-26 17:06:38,273+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0040_extend_installed_by_column.sql >********* QUERY ********** >ALTER TABLE schema_version ALTER COLUMN installed_by TYPE varchar(63); >************************** > >ALTER TABLE >2019-02-26 17:06:38,285+0100 Running upgrade sql script '/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0050_check_uuid_ossp_extension_installation.sql'... >2019-02-26 17:06:38,286+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0050_check_uuid_ossp_extension_installation.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION __temp_check_uuid_ossp_extension_installation() >RETURNS void >AS $PROCEDURE$ >BEGIN > > IF EXISTS (SELECT 1 from pg_available_extensions WHERE name = 'uuid-ossp' AND installed_version IS NULL) THEN > RAISE EXCEPTION 'UUID generation function does not exist or is not valid, > Please run the following commands as a database administrator from pgsql prompt and retry running engine-setup again' > USING DETAIL='DROP FUNCTION IF EXISTS uuid_generate_v1(); > CREATE EXTENSION "uuid-ossp";'; > > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >SELECT __temp_check_uuid_ossp_extension_installation(); >************************** > > > >********* QUERY ********** >DROP FUNCTION __temp_check_uuid_ossp_extension_installation(); >************************** > >DROP FUNCTION >********* QUERY ********** >copy ( > select version > from schema_version > where current = true > order by id > LIMIT 1 > ) to stdout with delimiter as '|'; >************************** > >2019-02-26 17:06:38,314+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0000_set_version.sql, its version 04000000 is <= current version 04030800 >2019-02-26 17:06:38,319+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0001_index_base_disks.sql, its version 04000001 is <= current version 04030800 >2019-02-26 17:06:38,324+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0010_set_mgmt_network_in_network_cluster.sql, its version 04000010 is <= current version 04030800 >2019-02-26 17:06:38,329+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0020_add_sso_client_registration_and_scope_dependency.sql, its version 04000020 is <= current version 04030800 >2019-02-26 17:06:38,333+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0030_add_source_ip_column_to_engine_sessions.sql, its version 04000030 is <= current version 04030800 >2019-02-26 17:06:38,338+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0040_convert_hibernation_volumes_to_disks.sql, its version 04000040 is <= current version 04030800 >2019-02-26 17:06:38,343+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0050_remove_deprecated_config_value.sql, its version 04000050 is <= current version 04030800 >2019-02-26 17:06:38,348+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0060_rename_cpu_type_ibm_power_8.sql, its version 04000060 is <= current version 04030800 >2019-02-26 17:06:38,353+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0070_enable_ballon_for_blank_template.sql, its version 04000070 is <= current version 04030800 >2019-02-26 17:06:38,358+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0080_rename_architecture_family.sql, its version 04000080 is <= current version 04030800 >2019-02-26 17:06:38,363+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0090_add_vm_static_threads_per_cpu.sql, its version 04000090 is <= current version 04030800 >2019-02-26 17:06:38,368+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0100_add_compatibility_version_to_vm.sql, its version 04000100 is <= current version 04030800 >2019-02-26 17:06:38,373+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0110_add_index_on_vm_static.sql, its version 04000110 is <= current version 04030800 >2019-02-26 17:06:38,378+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0120_fix_invalid_macs.sql, its version 04000120 is <= current version 04030800 >2019-02-26 17:06:38,383+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0130_add_host_device_column_to_vm_device.sql, its version 04000130 is <= current version 04030800 >2019-02-26 17:06:38,387+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0140_convert_memory_snapshots_to_disks.sql, its version 04000140 is <= current version 04030800 >2019-02-26 17:06:38,392+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0150_remove_internal_policy_units.sql, its version 04000150 is <= current version 04030800 >2019-02-26 17:06:38,397+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0160_fix_migratedowntime_option.sql, its version 04000160 is <= current version 04030800 >2019-02-26 17:06:38,402+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0170_chance_min_allocated_mem_of_blank.sql, its version 04000170 is <= current version 04030800 >2019-02-26 17:06:38,407+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0180_attach_cpu_profile_permissions.sql, its version 04000180 is <= current version 04030800 >2019-02-26 17:06:38,412+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0190_create_index_cpu_profiles.sql, its version 04000190 is <= current version 04030800 >2019-02-26 17:06:38,417+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0200_vds_group_to_cluster.sql, its version 04000200 is <= current version 04030800 >2019-02-26 17:06:38,422+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0210_add_vds_group_view.sql, its version 04000210 is <= current version 04030800 >2019-02-26 17:06:38,427+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0220_add_data_column_to_command_entities.sql, its version 04000220 is <= current version 04030800 >2019-02-26 17:06:38,431+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0230_add_profile_perms_to_import_export.sql, its version 04000230 is <= current version 04030800 >2019-02-26 17:06:38,436+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0240_add_authz_name_column_to_engine_sessions.sql, its version 04000240 is <= current version 04030800 >2019-02-26 17:06:38,441+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0250-add-index-on-origin-in-vm-static.sql, its version 04000250 is <= current version 04030800 >2019-02-26 17:06:38,446+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0260_add_cluster_migration_bandwidth.sql, its version 04000260 is <= current version 04030800 >2019-02-26 17:06:38,451+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0270_rename_command_entity_failed_restarted.sql, its version 04000270 is <= current version 04030800 >2019-02-26 17:06:38,456+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0280_add_authz_search_scope_to_sso_client_registration_and_scope_dependency.sql, its version 04000280 is <= current version 04030800 >2019-02-26 17:06:38,461+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0290_create_image_transfers_table.sql, its version 04000290 is <= current version 04030800 >2019-02-26 17:06:38,466+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0300_delete_old_version_values.sql, its version 04000300 is <= current version 04030800 >2019-02-26 17:06:38,471+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0310_delete_init_storage_sparse_size_in_gb.sql, its version 04000310 is <= current version 04030800 >2019-02-26 17:06:38,476+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0320_delete_user_message_of_the_day.sql, its version 04000320 is <= current version 04030800 >2019-02-26 17:06:38,481+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0330_delete_unused_vdc_options.sql, its version 04000330 is <= current version 04030800 >2019-02-26 17:06:38,486+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0340_add_unregistered_disks.sql, its version 04000340 is <= current version 04030800 >2019-02-26 17:06:38,491+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0350_set_timezone_priority_for_he.sql, its version 04000350 is <= current version 04030800 >2019-02-26 17:06:38,496+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0360_mark_audit_log_rows_of_deleted_audit_log_types_as_deleted.sql, its version 04000360 is <= current version 04030800 >2019-02-26 17:06:38,501+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0370_add_imageid_column_to_unregistered_disks.sql, its version 04000370 is <= current version 04030800 >2019-02-26 17:06:38,506+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0380_add_attach_disk_profile_permissions_to_power_user_role.sql, its version 04000380 is <= current version 04030800 >2019-02-26 17:06:38,510+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0390_delete_move_vm_auditlog.sql, its version 04000390 is <= current version 04030800 >2019-02-26 17:06:38,515+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0400_delete_copy_template_auditlog.sql, its version 04000400 is <= current version 04030800 >2019-02-26 17:06:38,520+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0410_drop_action_group_map.sql, its version 04000410 is <= current version 04030800 >2019-02-26 17:06:38,525+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0420_add_index_event_notification_hist.sql, its version 04000420 is <= current version 04030800 >2019-02-26 17:06:38,530+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0430_updating_cpu_profile_roles.sql, its version 04000430 is <= current version 04030800 >2019-02-26 17:06:38,535+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0440_add_read_only_in_providers.sql, its version 04000440 is <= current version 04030800 >2019-02-26 17:06:38,540+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0450_fix_admin_at_internal_username.sql, its version 04000450 is <= current version 04030800 >2019-02-26 17:06:38,545+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0460_unregistered_disks_use_date_with_timezone.sql, its version 04000460 is <= current version 04030800 >2019-02-26 17:06:38,550+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0470_network_attachments_add_ipv6.sql, its version 04000470 is <= current version 04030800 >2019-02-26 17:06:38,555+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0480_nic_add_ipv6.sql, its version 04000480 is <= current version 04030800 >2019-02-26 17:06:38,560+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0490_revmove_35_version.sql, its version 04000490 is <= current version 04030800 >2019-02-26 17:06:38,565+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0500_hostdevice_add_column_driver.sql, its version 04000500 is <= current version 04030800 >2019-02-26 17:06:38,570+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0510_remove_live_merge_support_check.sql, its version 04000510 is <= current version 04030800 >2019-02-26 17:06:38,575+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0520_remove_live_snapshot_support_check.sql, its version 04000520 is <= current version 04030800 >2019-02-26 17:06:38,579+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0530_add_engine_session_seq_id_to_command_entities.sql, its version 04000530 is <= current version 04030800 >2019-02-26 17:06:38,584+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0540_add_engine_session_seq_id_to_jobs.sql, its version 04000540 is <= current version 04030800 >2019-02-26 17:06:38,589+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0550_add_host_device_is_assignable.sql, its version 04000550 is <= current version 04030800 >2019-02-26 17:06:38,594+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0560_add_netwrok_filter_table.sql, its version 04000560 is <= current version 04030800 >2019-02-26 17:06:38,599+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0570_updating_cpu_profile_creator_role.sql, its version 04000570 is <= current version 04030800 >2019-02-26 17:06:38,604+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0580_add_migration_policy_to_cluster.sql, its version 04000580 is <= current version 04030800 >2019-02-26 17:06:38,609+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0590_remove_deprecated_config_value.sql, its version 04000590 is <= current version 04030800 >2019-02-26 17:06:38,614+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0600_add_network_filter_id_to_vnic_profile.sql, its version 04000600 is <= current version 04030800 >2019-02-26 17:06:38,619+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0610_add_migration_policy_to_vm.sql, its version 04000610 is <= current version 04030800 >2019-02-26 17:06:38,624+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0620_add_add_partner_mac_to_vds_interface.sql, its version 04000620 is <= current version 04030800 >2019-02-26 17:06:38,629+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0630_add_openstack_network_provider_host_id_vdsstatic.sql, its version 04000630 is <= current version 04030800 >2019-02-26 17:06:38,634+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0640_add_index_on_vm_device.sql, its version 04000640 is <= current version 04030800 >2019-02-26 17:06:38,639+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0650_add_stateful_to_vm_pools.sql, its version 04000650 is <= current version 04030800 >2019-02-26 17:06:38,643+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0660_add_gluster_self_heal_monitoring_related_columns_to_volume_and_bricks.sql, its version 04000660 is <= current version 04030800 >2019-02-26 17:06:38,648+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0670_add_guest_container_list_to_vm_dynamic.sql, its version 04000670 is <= current version 04030800 >2019-02-26 17:06:38,653+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0680_vds_add_kernel_args_columns.sql, its version 04000680 is <= current version 04030800 >2019-02-26 17:06:38,658+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0690_add_disk_vm_element_table_and_copy_disk_values.sql, its version 04000690 is <= current version 04030800 >2019-02-26 17:06:38,663+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0700_create_label_tables.sql, its version 04000700 is <= current version 04030800 >2019-02-26 17:06:38,668+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0710_add_kernel_args_to_vds_dynamic.sql, its version 04000710 is <= current version 04030800 >2019-02-26 17:06:38,673+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0720_fix_duplicate_audit_log_type_ids.sql, its version 04000720 is <= current version 04030800 >2019-02-26 17:06:38,678+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0730_remove_filter_from_passthrough_vnics.sql, its version 04000730 is <= current version 04030800 >2019-02-26 17:06:38,683+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0740_remove_allow_dhcp_server_filter.sql, its version 04000740 is <= current version 04030800 >2019-02-26 17:06:38,687+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_00_0750_change_cluster_default_policy.sql, its version 04000750 is <= current version 04030800 >2019-02-26 17:06:38,692+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0010_add_mac_pool_id_to_vds_group.sql, its version 04010010 is <= current version 04030800 >2019-02-26 17:06:38,697+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0020_empty_current_cd_to_null.sql, its version 04010020 is <= current version 04030800 >2019-02-26 17:06:38,702+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0030_remove_mac_pool_id_from_storage_pool.sql, its version 04010030 is <= current version 04030800 >2019-02-26 17:06:38,707+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0040_move_guest_mem_fields_to_statistics.sql, its version 04010040 is <= current version 04030800 >2019-02-26 17:06:38,712+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0050_remove_el7_upgrade_policy_units.sql, its version 04010050 is <= current version 04030800 >2019-02-26 17:06:38,717+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0060_add_switch_type_to_vds_interface_and_cluster.sql, its version 04010060 is <= current version 04030800 >2019-02-26 17:06:38,722+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0070_set_pool_vms_stateless.sql, its version 04010070 is <= current version 04030800 >2019-02-26 17:06:38,727+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0080_add_gluster_server_peer_status.sql, its version 04010080 is <= current version 04030800 >2019-02-26 17:06:38,731+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0090_drop_unique_constraint.sql, its version 04010090 is <= current version 04030800 >2019-02-26 17:06:38,736+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0100_remove_hosted_engine_storage_domain_name_config_value.sql, its version 04010100 is <= current version 04030800 >2019-02-26 17:06:38,741+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0110_change_disk_status_to_ok.sql, its version 04010110 is <= current version 04030800 >2019-02-26 17:06:38,746+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0120_add_vds_dynamic_pretty_name.sql, its version 04010120 is <= current version 04030800 >2019-02-26 17:06:38,751+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0130_change_vm_device_null_plugged_values_to_false.sql, its version 04010130 is <= current version 04030800 >2019-02-26 17:06:38,756+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0140_external_mac_events.sql, its version 04010140 is <= current version 04030800 >2019-02-26 17:06:38,761+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0150_delete_datacenterwithoutspm_conf_value.sql, its version 04010150 is <= current version 04030800 >2019-02-26 17:06:38,766+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0160_update_macs_to_lower_case.sql, its version 04010160 is <= current version 04030800 >2019-02-26 17:06:38,771+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0170_remove_deprecated_config_EnableDeprecatedClientModeSpicePlugin.sql, its version 04010170 is <= current version 04030800 >2019-02-26 17:06:38,776+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0180_add_fencing_policy_for_gluster_bricks.sql, its version 04010180 is <= current version 04030800 >2019-02-26 17:06:38,780+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0190_add_default_quota.sql, its version 04010190 is <= current version 04030800 >2019-02-26 17:06:38,785+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0200_update_instancetype_defaultdisplaytype.sql, its version 04010200 is <= current version 04030800 >2019-02-26 17:06:38,790+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0210_add_ad_aggregator_id_to_interface.sql, its version 04010210 is <= current version 04030800 >2019-02-26 17:06:38,795+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0220_memory_and_disk_images_storage_domain_view_join_indexes.sql, its version 04010220 is <= current version 04030800 >2019-02-26 17:06:38,800+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0230_automatic_storage_select.sql, its version 04010230 is <= current version 04030800 >2019-02-26 17:06:38,805+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0240_add_step_subject_entites.sql, its version 04010240 is <= current version 04030800 >2019-02-26 17:06:38,810+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0250_add_progress_column_to_step_table.sql, its version 04010250 is <= current version 04030800 >2019-02-26 17:06:38,815+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0260_fix_null_cpu_profile_id.sql, its version 04010260 is <= current version 04030800 >2019-02-26 17:06:38,820+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0270_add_vm_auto_login_column_to_user_profiles_table.sql, its version 04010270 is <= current version 04030800 >2019-02-26 17:06:38,825+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0280_display_migration_cluster_network.sql, its version 04010280 is <= current version 04030800 >2019-02-26 17:06:38,830+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0290_delete_audit_log_records_of_reverted_audit_log_type.sql, its version 04010290 is <= current version 04030800 >2019-02-26 17:06:38,835+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0300_do_not_allow_null_boot_protocol.sql, its version 04010300 is <= current version 04030800 >2019-02-26 17:06:38,839+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0310_disallow_boot_protocol_to_be_null.sql, its version 04010310 is <= current version 04030800 >2019-02-26 17:06:38,844+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0320_set_display_migration_cluster_network.sql, its version 04010320 is <= current version 04030800 >2019-02-26 17:06:38,849+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0330_set_host_protocol_to_jsonrpc.sql, its version 04010330 is <= current version 04030800 >2019-02-26 17:06:38,854+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0340_random_rng_source_required.sql, its version 04010340 is <= current version 04030800 >2019-02-26 17:06:38,859+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0350_update_ClusterRequiredRngSourcesDefault_random_removed.sql, its version 04010350 is <= current version 04030800 >2019-02-26 17:06:38,864+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0360_add_bond_active_slave_to_vds_interface.sql, its version 04010360 is <= current version 04030800 >2019-02-26 17:06:38,869+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0370_drop_table_vds_cpu_statistics.sql, its version 04010370 is <= current version 04030800 >2019-02-26 17:06:38,874+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0380_move_scsi_reservation_to_disk_vm_element.sql, its version 04010380 is <= current version 04030800 >2019-02-26 17:06:38,879+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0390_remove_vm_related_usage_histories.sql, its version 04010390 is <= current version 04030800 >2019-02-26 17:06:38,884+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0400_drop_kvm_enable_from_vm_dynamic.sql, its version 04010400 is <= current version 04030800 >2019-02-26 17:06:38,889+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0410_drop_vm_pid_from_vm_dynamic.sql, its version 04010410 is <= current version 04030800 >2019-02-26 17:06:38,894+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0420_drop_last_vds_run_on.sql, its version 04010420 is <= current version 04030800 >2019-02-26 17:06:38,899+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0430_add_first_metadata_device_col_to_storage_domain_static.sql, its version 04010430 is <= current version 04030800 >2019-02-26 17:06:38,904+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0440_add_vg_metadata_device_col_to_storage_domain_static.sql, its version 04010440 is <= current version 04030800 >2019-02-26 17:06:38,909+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0450_remove_legacy_usb_policy.sql, its version 04010450 is <= current version 04030800 >2019-02-26 17:06:38,914+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0460_add_sparsify_disk_action_group_to_roles.sql, its version 04010460 is <= current version 04030800 >2019-02-26 17:06:38,919+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0470_remove_uneeded_fields_in_vm_statistics.sql, its version 04010470 is <= current version 04030800 >2019-02-26 17:06:38,924+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0480_add_discard_max_size_and_discard_zeroes_data_to_luns_table.sql, its version 04010480 is <= current version 04030800 >2019-02-26 17:06:38,928+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0490_drop_numa_map_id.sql, its version 04010490 is <= current version 04030800 >2019-02-26 17:06:38,933+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0500_update_noncluster_entities_to_urandom_rng_source.sql, its version 04010500 is <= current version 04030800 >2019-02-26 17:06:38,938+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0510_qcow2v3_compat.sql, its version 04010510 is <= current version 04030800 >2019-02-26 17:06:38,943+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0520_add_pass_discard_column_to_vm_element_table.sql, its version 04010520 is <= current version 04030800 >2019-02-26 17:06:38,948+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0530_add_is_arbiter_column_to_gluster_volumes_and_brick.sql, its version 04010530 is <= current version 04030800 >2019-02-26 17:06:38,953+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0540_remove_vds_protocol.sql, its version 04010540 is <= current version 04030800 >2019-02-26 17:06:38,958+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0550_add_virtio_scsi_controller_to_non_cluster_entities.sql, its version 04010550 is <= current version 04030800 >2019-02-26 17:06:38,963+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0560_vm_has_rng_device_by_default.sql, its version 04010560 is <= current version 04030800 >2019-02-26 17:06:38,968+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0570_add_vm_affinity_to_host_structure.sql, its version 04010570 is <= current version 04030800 >2019-02-26 17:06:38,973+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0580_add_migratable_to_vnic_profiles.sql, its version 04010580 is <= current version 04030800 >2019-02-26 17:06:38,978+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0590_remove_MigrationPolicies_general_config_value.sql, its version 04010590 is <= current version 04030800 >2019-02-26 17:06:38,983+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0600_update_sso_clients_notification_callback_protocol.sql, its version 04010600 is <= current version 04030800 >2019-02-26 17:06:38,988+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0610_add_he_deployed_to_vds_dynamic.sql, its version 04010610 is <= current version 04030800 >2019-02-26 17:06:38,993+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0620_add_discard_after_delete_column_to_storage_domain_static_table.sql, its version 04010620 is <= current version 04030800 >2019-02-26 17:06:38,998+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0630_remove_sd_static_luns_fk.sql, its version 04010630 is <= current version 04030800 >2019-02-26 17:06:39,003+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_01_0640_add_max_memory_size_column.sql, its version 04010640 is <= current version 04030800 >2019-02-26 17:06:39,007+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0010_add_vm_leases.sql, its version 04020010 is <= current version 04030800 >2019-02-26 17:06:39,012+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0020_add_glustervolume_id_to_storage_server_connection.sql, its version 04020020 is <= current version 04030800 >2019-02-26 17:06:39,017+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0030_remove_PackageNamesForCheckUpdate_general_config_value.sql, its version 04020030 is <= current version 04030800 >2019-02-26 17:06:39,022+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0040_add_vm_configuration_broken_to_snapshots.sql, its version 04020040 is <= current version 04030800 >2019-02-26 17:06:39,027+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0050_set_blank_template_version_name.sql, its version 04020050 is <= current version 04030800 >2019-02-26 17:06:39,032+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0060_add_network_usage_to_vm_statistics.sql, its version 04020060 is <= current version 04030800 >2019-02-26 17:06:39,037+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0070_create_storage_dr.sql, its version 04020070 is <= current version 04030800 >2019-02-26 17:06:39,042+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0080_add_command_conext_to_command_entities.sql, its version 04020080 is <= current version 04030800 >2019-02-26 17:06:39,047+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0090_create_vm_interface_filter_parameters.sql, its version 04020090 is <= current version 04030800 >2019-02-26 17:06:39,052+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0100_remove_el7_upgrade_policy.sql, its version 04020100 is <= current version 04030800 >2019-02-26 17:06:39,056+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0110_add_elapset_time_to_vm_statistics.sql, its version 04020110 is <= current version 04030800 >2019-02-26 17:06:39,061+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0120_fix_default_qcow_version.sql, its version 04020120 is <= current version 04030800 >2019-02-26 17:06:39,066+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0130_remove_boot_order.sql, its version 04020130 is <= current version 04030800 >2019-02-26 17:06:39,071+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0135_fix_max_memory_size_limit.sql, its version 04020135 is <= current version 04030800 >2019-02-26 17:06:39,076+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0140_add_max_memory_constraint.sql, its version 04020140 is <= current version 04030800 >2019-02-26 17:06:39,081+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0150_remove_VM64BitMaxMemorySizeInMB_vdc_option.sql, its version 04020150 is <= current version 04030800 >2019-02-26 17:06:39,086+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0160_add_vm_snapshot_id_to_glance_disks.sql, its version 04020160 is <= current version 04030800 >2019-02-26 17:06:39,091+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0170_add_default_route_network_role_to_network_cluster.sql, its version 04020170 is <= current version 04030800 >2019-02-26 17:06:39,096+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0180_disable_cluster_over_commitment_if_no_ksm_or_balloning_enabled.sql, its version 04020180 is <= current version 04030800 >2019-02-26 17:06:39,101+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0190_add_configure_mac_pool_role_to_data_center_admin.sql, its version 04020190 is <= current version 04030800 >2019-02-26 17:06:39,106+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0200_add_disk_content_type.sql, its version 04020200 is <= current version 04030800 >2019-02-26 17:06:39,111+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0210_add_openid_scope_to_sso_clients.sql, its version 04020210 is <= current version 04030800 >2019-02-26 17:06:39,115+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0220_add_password_access_to_restapi_scope_dependency.sql, its version 04020220 is <= current version 04030800 >2019-02-26 17:06:39,120+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0230_HotPlugMemoryMultiplicationSizeMb_config_value_renamed.sql, its version 04020230 is <= current version 04030800 >2019-02-26 17:06:39,125+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0240_add_name_servers_column_to_vds_interface.sql, its version 04020240 is <= current version 04030800 >2019-02-26 17:06:39,130+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0250_update_rng_to_use_urandom_in_hostedengine_vm.sql, its version 04020250 is <= current version 04030800 >2019-02-26 17:06:39,135+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0260_set_host_type_for_ngn_hosts.sql, its version 04020260 is <= current version 04030800 >2019-02-26 17:06:39,140+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0270_drop_memory_snapshot_constraints.sql, its version 04020270 is <= current version 04030800 >2019-02-26 17:06:39,145+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0280_add_default_route_column_to_vds_interface.sql, its version 04020280 is <= current version 04030800 >2019-02-26 17:06:39,150+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0290_remove_disconnect_pool_on_reconstruct_config_val.sql, its version 04020290 is <= current version 04030800 >2019-02-26 17:06:39,155+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0300_malformed_memory_devices_removed.sql, its version 04020300 is <= current version 04030800 >2019-02-26 17:06:39,160+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0310_add_vds_statistics_hugepages.sql, its version 04020310 is <= current version 04030800 >2019-02-26 17:06:39,165+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0320_drop_materialized_views_table.sql, its version 04020320 is <= current version 04030800 >2019-02-26 17:06:39,169+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0330_add_boot_time_to_vm_dynamic.sql, its version 04020330 is <= current version 04030800 >2019-02-26 17:06:39,174+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0340_add_addresses_of_host_devices.sql, its version 04020340 is <= current version 04030800 >2019-02-26 17:06:39,179+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0350_change_cluster_default_policy.sql, its version 04020350 is <= current version 04030800 >2019-02-26 17:06:39,184+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0360_add_downtime_to_vm_dynamic.sql, its version 04020360 is <= current version 04030800 >2019-02-26 17:06:39,189+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0370_delete_command_coordinator_threadpool_size_config.sql, its version 04020370 is <= current version 04030800 >2019-02-26 17:06:39,194+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0380_delete_default_min_and_max_threadpool_size_config.sql, its version 04020380 is <= current version 04030800 >2019-02-26 17:06:39,199+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0390_delete_userportal_config.sql, its version 04020390 is <= current version 04030800 >2019-02-26 17:06:39,204+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0400_remove_vm_auto_login_column_from_user_profiles_table.sql, its version 04020400 is <= current version 04030800 >2019-02-26 17:06:39,209+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0410_remove_auto_repo_refresh_config_value.sql, its version 04020410 is <= current version 04030800 >2019-02-26 17:06:39,214+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0420_add_backup_flag.sql, its version 04020420 is <= current version 04030800 >2019-02-26 17:06:39,219+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0430_add_libgfapi_additional_feature.sql, its version 04020430 is <= current version 04030800 >2019-02-26 17:06:39,224+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0440_add_vm_lease_info.sql, its version 04020440 is <= current version 04030800 >2019-02-26 17:06:39,229+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0450_add_vdsm_name_to_network.sql, its version 04020450 is <= current version 04030800 >2019-02-26 17:06:39,233+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0460_increase_vnic_profile_name_size.sql, its version 04020460 is <= current version 04030800 >2019-02-26 17:06:39,238+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0470_increase_vds_interface_network_name_size.sql, its version 04020470 is <= current version 04030800 >2019-02-26 17:06:39,243+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0480_add_vm_dynamic_in_fence_flow.sql, its version 04020480 is <= current version 04030800 >2019-02-26 17:06:39,248+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0490_disallow_file_type_to_be_null.sql, its version 04020490 is <= current version 04030800 >2019-02-26 17:06:39,253+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0500_add_firewall_type_to_cluster.sql, its version 04020500 is <= current version 04030800 >2019-02-26 17:06:39,258+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0510_drop_redundant_indexes.sql, its version 04020510 is <= current version 04030800 >2019-02-26 17:06:39,263+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0520_remove_pm_rs_unused_type.sql, its version 04020520 is <= current version 04030800 >2019-02-26 17:06:39,268+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0530_update_memory_disks_description.sql, its version 04020530 is <= current version 04030800 >2019-02-26 17:06:39,273+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0540_add_audit_log_custom_id.sql, its version 04020540 is <= current version 04030800 >2019-02-26 17:06:39,278+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0550_increase_rate_precision_interface_statistics.sql, its version 04020550 is <= current version 04030800 >2019-02-26 17:06:39,283+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0560_delete_irs_max_connections_per_host.sql, its version 04020560 is <= current version 04030800 >2019-02-26 17:06:39,287+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0570-remove-UserSessionHardLimit.sql, its version 04020570 is <= current version 04030800 >2019-02-26 17:06:39,292+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0580-remove-DefaultMaxThreadWaitQueueSize.sql, its version 04020580 is <= current version 04030800 >2019-02-26 17:06:39,297+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0590_remove_general_version_of_nongeneral_vdc_options.sql, its version 04020590 is <= current version 04030800 >2019-02-26 17:06:39,302+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0600_remove_not_used_vdc_options.sql, its version 04020600 is <= current version 04030800 >2019-02-26 17:06:39,307+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0610_remove_general_version_for_nongeneral_vdc_options.sql, its version 04020610 is <= current version 04030800 >2019-02-26 17:06:39,312+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0620_add_default_network_provider_column_to_cluster.sql, its version 04020620 is <= current version 04030800 >2019-02-26 17:06:39,317+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0630_updating_vnic_profile_user_role.sql, its version 04020630 is <= current version 04030800 >2019-02-26 17:06:39,322+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0640_restore_image_templates_images.sql, its version 04020640 is <= current version 04030800 >2019-02-26 17:06:39,327+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0650_restore_snapshots_dump_disk_id_constraints.sql, its version 04020650 is <= current version 04030800 >2019-02-26 17:06:39,332+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0660_update_memory_disks_to_active.sql, its version 04020660 is <= current version 04030800 >2019-02-26 17:06:39,337+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0670_vds_static_install_required_column.sql, its version 04020670 is <= current version 04030800 >2019-02-26 17:06:39,342+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0680_add_mdev_type_to_host_device.sql, its version 04020680 is <= current version 04030800 >2019-02-26 17:06:39,346+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0690_remove_old_config_values.sql, its version 04020690 is <= current version 04030800 >2019-02-26 17:06:39,351+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0700_remove_max_images_in_chain.sql, its version 04020700 is <= current version 04030800 >2019-02-26 17:06:39,356+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0710_add_entity_status_column_for_unregistered_VM_on_ovf_update.sql, its version 04020710 is <= current version 04030800 >2019-02-26 17:06:39,361+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0720_add_resume_behavior_to_vm_static.sql, its version 04020720 is <= current version 04030800 >2019-02-26 17:06:39,366+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0730_add_volatile_run_to_vm_dynamic.sql, its version 04020730 is <= current version 04030800 >2019-02-26 17:06:39,371+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0740_vm_icons_update.sql, its version 04020740 is <= current version 04030800 >2019-02-26 17:06:39,376+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0750_add_type_column_to_image_transfers.sql, its version 04020750 is <= current version 04030800 >2019-02-26 17:06:39,381+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0760_add_active_column_to_image_transfers.sql, its version 04020760 is <= current version 04030800 >2019-02-26 17:06:39,386+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0770_add_daemon_uri_column_to_image_transfers.sql, its version 04020770 is <= current version 04030800 >2019-02-26 17:06:39,391+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0780_remove_unique_from_idx_unregistered_disks_storage_to_vms.sql, its version 04020780 is <= current version 04030800 >2019-02-26 17:06:39,396+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0790_missing_indexes.sql, its version 04020790 is <= current version 04030800 >2019-02-26 17:06:39,401+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0800_set_vm_desc_and_comment_default_to_empty_string.sql, its version 04020800 is <= current version 04030800 >2019-02-26 17:06:39,406+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0810_providers_unique_name.sql, its version 04020810 is <= current version 04030800 >2019-02-26 17:06:39,411+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0820_remove_libgfapi_additional_feature.sql, its version 04020820 is <= current version 04030800 >2019-02-26 17:06:39,415+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0830_deprecate_discard_zeroes_data.sql, its version 04020830 is <= current version 04030800 >2019-02-26 17:06:39,420+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0840_add_provider_physical_network_column_network.sql, its version 04020840 is <= current version 04030800 >2019-02-26 17:06:39,425+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0850_drop_discard_zeroes_data_column_from_luns_table.sql, its version 04020850 is <= current version 04030800 >2019-02-26 17:06:39,430+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0860_add_unmanaged_boolean_to_provider.sql, its version 04020860 is <= current version 04030800 >2019-02-26 17:06:39,435+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0870_fix_max_memory_size_limit.sql, its version 04020870 is <= current version 04030800 >2019-02-26 17:06:39,440+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0880_add_auto_sync_providers.sql, its version 04020880 is <= current version 04030800 >2019-02-26 17:06:39,445+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0890_network_unique_external_network.sql, its version 04020890 is <= current version 04030800 >2019-02-26 17:06:39,450+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0900_vds_dynamic_kernel_features.sql, its version 04020900 is <= current version 04030800 >2019-02-26 17:06:39,455+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0910_move_vm_lease_info.sql, its version 04020910 is <= current version 04030800 >2019-02-26 17:06:39,460+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0920_ensure_images_lastmodified_is_not_null.sql, its version 04020920 is <= current version 04030800 >2019-02-26 17:06:39,465+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0930_fix_skylake_cpu_name.sql, its version 04020930 is <= current version 04030800 >2019-02-26 17:06:39,469+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0940_kernel_features_column_migration.sql, its version 04020940 is <= current version 04030800 >2019-02-26 17:06:39,474+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0950_delete_UploadImageUiInactivityTimeoutInSeconds_from_vdc_options.sql, its version 04020950 is <= current version 04030800 >2019-02-26 17:06:39,479+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0960_default_all_search_engine_fields_to_empty_string.sql, its version 04020960 is <= current version 04030800 >2019-02-26 17:06:39,484+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0970_set_cluster_cpu_and_machine_to_null.sql, its version 04020970 is <= current version 04030800 >2019-02-26 17:06:39,489+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0980_add_host_provider_binding_ids.sql, its version 04020980 is <= current version 04030800 >2019-02-26 17:06:39,494+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_02_0990_remove_snapshot_memory_volume.sql, its version 04020990 is <= current version 04030800 >2019-02-26 17:06:39,499+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0010_add_vds_affinity_enabled_column.sql, its version 04030010 is <= current version 04030800 >2019-02-26 17:06:39,504+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0020_remove_disk_alignment.sql, its version 04030020 is <= current version 04030800 >2019-02-26 17:06:39,509+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0030_set_network_label_to_null.sql, its version 04030030 is <= current version 04030800 >2019-02-26 17:06:39,514+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0040_add_confirmed_free_size_col.sql, its version 04030040 is <= current version 04030800 >2019-02-26 17:06:39,519+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0050_add_confirmed_free_size_volume_col.sql, its version 04030050 is <= current version 04030800 >2019-02-26 17:06:39,524+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0060_add_confirmed_free_size_sd_col.sql, its version 04030060 is <= current version 04030800 >2019-02-26 17:06:39,528+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0070_add_missing_indexes.sql, its version 04030070 is <= current version 04030800 >2019-02-26 17:06:39,533+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0080_enforce_null_in_network_attachment_ip_config.sql, its version 04030080 is <= current version 04030800 >2019-02-26 17:06:39,538+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0090_set_addressless_devices_as_plugged.sql, its version 04030090 is <= current version 04030800 >2019-02-26 17:06:39,543+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0100_add_client_inactivity_timeout_column_to_image_transfers.sql, its version 04030100 is <= current version 04030800 >2019-02-26 17:06:39,548+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0110_add_bios_type_column_to_vm_static.sql, its version 04030110 is <= current version 04030800 >2019-02-26 17:06:39,553+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0120_remove_dns_resolver_configuration_id_from_vds_dynamic.sql, its version 04030120 is <= current version 04030800 >2019-02-26 17:06:39,558+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0130_remove_test_imageio_connection_config_value.sql, its version 04030130 is <= current version 04030800 >2019-02-26 17:06:39,563+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0140_add_confirmed_size_warning.sql, its version 04030140 is <= current version 04030800 >2019-02-26 17:06:39,568+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0150_add_confirmed_size_total_col.sql, its version 04030150 is <= current version 04030800 >2019-02-26 17:06:39,573+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0160_enlarge_custom_cpu_type.sql, its version 04030160 is <= current version 04030800 >2019-02-26 17:06:39,578+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0170_add_reduce_disk_action_group_to_roles.sql, its version 04030170 is <= current version 04030800 >2019-02-26 17:06:39,583+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0180_default_all_search_engine_string_fields_to_not_null.sql, its version 04030180 is <= current version 04030800 >2019-02-26 17:06:39,587+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0190_enable_large_network_qos.sql, its version 04030190 is <= current version 04030800 >2019-02-26 17:06:39,592+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0200_set_empty_cpu_name_to_auto_detect.sql, its version 04030200 is <= current version 04030800 >2019-02-26 17:06:39,597+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0210_revert_cpu_name.sql, its version 04030210 is <= current version 04030800 >2019-02-26 17:06:39,602+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0220_vds_openvswitch_version.sql, its version 04030220 is <= current version 04030800 >2019-02-26 17:06:39,607+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0230_add_multi_queues_enabled_to_vm_static.sql, its version 04030230 is <= current version 04030800 >2019-02-26 17:06:39,612+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0240_iothreads_enabled_by_default.sql, its version 04030240 is <= current version 04030800 >2019-02-26 17:06:39,617+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0250_add_index_on_vdsm_name.sql, its version 04030250 is <= current version 04030800 >2019-02-26 17:06:39,622+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0260_add_vm_runtime_name.sql, its version 04030260 is <= current version 04030800 >2019-02-26 17:06:39,627+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0265_remove_foreign_key_in_image_transfers.sql, its version 04030265 is <= current version 04030800 >2019-02-26 17:06:39,632+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0270_add_foreign_key_to_image_transfers.sql, its version 04030270 is <= current version 04030800 >2019-02-26 17:06:39,637+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0280_add_clean_traffic_gateway_into_nwfilters.sql, its version 04030280 is <= current version 04030800 >2019-02-26 17:06:39,641+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0290_larger_vm_cpuname.sql, its version 04030290 is <= current version 04030800 >2019-02-26 17:06:39,646+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0300_change_unknown_vm_icon.sql, its version 04030300 is <= current version 04030800 >2019-02-26 17:06:39,651+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0310_remove_cpu_pin_migration_enabled.sql, its version 04030310 is <= current version 04030800 >2019-02-26 17:06:39,656+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0320_add_vdo_savings_to_brick_properties.sql, its version 04030320 is <= current version 04030800 >2019-02-26 17:06:39,661+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0330_add_vdo_savings_to_volume_properties.sql, its version 04030330 is <= current version 04030800 >2019-02-26 17:06:39,666+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0340_add_vdo_savings_to_sd.sql, its version 04030340 is <= current version 04030800 >2019-02-26 17:06:39,671+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0350_update_clean_traffic_gateway_cluster_compatibility.sql, its version 04030350 is <= current version 04030800 >2019-02-26 17:06:39,676+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0360_add_log_max_memory_used_threshold_and_type_to_cluster.sql, its version 04030360 is <= current version 04030800 >2019-02-26 17:06:39,681+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0370_make_storage_and_disk_comment_and_description_not_null.sql, its version 04030370 is <= current version 04030800 >2019-02-26 17:06:39,686+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0380_add_auth_v3_providers.sql, its version 04030380 is <= current version 04030800 >2019-02-26 17:06:39,691+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0390_add_auth_url_valid_constraint.sql, its version 04030390 is <= current version 04030800 >2019-02-26 17:06:39,695+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0400_add_vnc_enabled_to_cluster.sql, its version 04030400 is <= current version 04030800 >2019-02-26 17:06:39,700+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0410_remove_deprecated_cpu_types_from_cluster.sql, its version 04030410 is <= current version 04030800 >2019-02-26 17:06:39,705+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0420_remove_fail_back_column_from_vm_static.sql, its version 04030420 is <= current version 04030800 >2019-02-26 17:06:39,710+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0430_add_vnc_encryption_enabled_to_vds_dynamic.sql, its version 04030430 is <= current version 04030800 >2019-02-26 17:06:39,715+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0440_remove_support_numa_migration_config_value.sql, its version 04030440 is <= current version 04030800 >2019-02-26 17:06:39,720+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0450_change_default_graphics.sql, its version 04030450 is <= current version 04030800 >2019-02-26 17:06:39,725+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0460_index_ad_groups_on_name_and_domain.sql, its version 04030460 is <= current version 04030800 >2019-02-26 17:06:39,730+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0470_remove_3_6_vdc_options.sql, its version 04030470 is <= current version 04030800 >2019-02-26 17:06:39,735+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0480_add_vgpu_placement.sql, its version 04030480 is <= current version 04030800 >2019-02-26 17:06:39,740+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0490_remove_deprecated_ibrs_cpu_types_from_cluster.sql, its version 04030490 is <= current version 04030800 >2019-02-26 17:06:39,745+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0500_remove_vdc_option_GlusterSelfHealMonitoringSupported.sql, its version 04030500 is <= current version 04030800 >2019-02-26 17:06:39,750+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0510_remove_vdc_option_GlusterServicesEnabled.sql, its version 04030510 is <= current version 04030800 >2019-02-26 17:06:39,755+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0520_remove_vdc_option_LegacyGraphicsDisplay.sql, its version 04030520 is <= current version 04030800 >2019-02-26 17:06:39,759+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0530_remove_vdc_option_MigrationPoliciesSupported.sql, its version 04030530 is <= current version 04030800 >2019-02-26 17:06:39,764+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0540_remove_vdc_option_AdPartnerMacSupported.sql, its version 04030540 is <= current version 04030800 >2019-02-26 17:06:39,769+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0550_remove_vdc_option_OvsSupported.sql, its version 04030550 is <= current version 04030800 >2019-02-26 17:06:39,774+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0560_remove_vdc_option_SriovHotPlugSupported.sql, its version 04030560 is <= current version 04030800 >2019-02-26 17:06:39,779+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0570_set_network_label_to_null.sql, its version 04030570 is <= current version 04030800 >2019-02-26 17:06:39,784+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0580_remove_vdc_option_BackupSupported.sql, its version 04030580 is <= current version 04030800 >2019-02-26 17:06:39,789+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0590_remove_maintenance_and_optional_reason_required.sql, its version 04030590 is <= current version 04030800 >2019-02-26 17:06:39,794+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0600_add_cloud_init__protocol_to_vm_init.sql, its version 04030600 is <= current version 04030800 >2019-02-26 17:06:39,799+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0610_add_cinder_storage_table.sql, its version 04030610 is <= current version 04030800 >2019-02-26 17:06:39,804+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0620_remove_4_0_vdc_options.sql, its version 04030620 is <= current version 04030800 >2019-02-26 17:06:39,809+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0630_remove_vdc_option_DataOperationsByHSM.sql, its version 04030630 is <= current version 04030800 >2019-02-26 17:06:39,814+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0640_remove_vdc_option_DiscardAfterDeleteSupported.sql, its version 04030640 is <= current version 04030800 >2019-02-26 17:06:39,819+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0650_remove_vdc_option_GetNamesOfVmsFromExternalProviderSupported.sql, its version 04030650 is <= current version 04030800 >2019-02-26 17:06:39,823+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0660_remove_vdc_option_GlusterSupportArbiterVolume.sql, its version 04030660 is <= current version 04030800 >2019-02-26 17:06:39,828+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0670_remove_vdc_option_Ipv6Supported.sql, its version 04030670 is <= current version 04030800 >2019-02-26 17:06:39,833+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0680_remove_vdc_option_QcowCompatSupported.sql, its version 04030680 is <= current version 04030800 >2019-02-26 17:06:39,838+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0690_add_connector_info_to_vds_dynamic.sql, its version 04030690 is <= current version 04030800 >2019-02-26 17:06:39,843+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0700_remove_vdc_option_ReduceDeviceFromStorageDomain.sql, its version 04030700 is <= current version 04030800 >2019-02-26 17:06:39,848+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0710_remove_vdc_option_VirtIOScsiIOThread.sql, its version 04030710 is <= current version 04030800 >2019-02-26 17:06:39,853+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0720_remove_vdc_option_VmLeasesSupported.sql, its version 04030720 is <= current version 04030800 >2019-02-26 17:06:39,858+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0730_remove_vdc_option_PassDiscardSupported.sql, its version 04030730 is <= current version 04030800 >2019-02-26 17:06:39,863+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0740_add_backup_column_to_base_disks_table.sql, its version 04030740 is <= current version 04030800 >2019-02-26 17:06:39,868+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0750_add_backup_disk_action_group_to_roles.sql, its version 04030750 is <= current version 04030800 >2019-02-26 17:06:39,873+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0760_two_guest_agents.sql, its version 04030760 is <= current version 04030800 >2019-02-26 17:06:39,877+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0770_add_vm_backups_and_checkpoints_tables.sql, its version 04030770 is <= current version 04030800 >2019-02-26 17:06:39,882+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0780_add_blocksize_column.sql, its version 04030780 is <= current version 04030800 >2019-02-26 17:06:39,887+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0790_upgrade_spicexml_devices_to_domain_xml.sql, its version 04030790 is <= current version 04030800 >2019-02-26 17:06:39,892+0100 Skipping upgrade script /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0800_remove_vds_strength_column_from_vds_static.sql, its version 04030800 is <= current version 04030800 >********* QUERY ********** >copy ( > select max(id) > from schema_version > where state in ('INSTALLED','SKIPPED') > ) to stdout with delimiter as '|'; >************************** > >2019-02-26 17:06:39,902+0100 dbfunc_psql_die --command= > update schema_version > set current=(id=323); > >********* QUERY ********** > > update schema_version > set current=(id=323); > >************************** > >UPDATE 323 >********* QUERY ********** >copy ( > select count(*) > from pg_available_extensions > where > name = 'uuid-ossp' and > installed_version IS NOT NULL > ) to stdout with delimiter as '|'; >************************** > >2019-02-26 17:06:39,922+0100 Creating views... >2019-02-26 17:06:39,924+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/create_views.sql >********* QUERY ********** >CREATE OR REPLACE VIEW domains_with_unregistered_entities_view AS >SELECT storage_domain_id >FROM unregistered_ovf_of_entities >UNION >SELECT storage_domain_id >FROM unregistered_disks; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW storage_domain_shared_status AS >SELECT storage_id, > CASE WHEN COUNT(CASE status WHEN 3 THEN 1 END) > 0 > THEN CASE WHEN COUNT(DISTINCT status) > 1 THEN 3 ELSE 1 END > ELSE 2 > END AS status >FROM storage_pool_iso_map >GROUP BY storage_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vms_for_disk_view AS >SELECT array_agg(vm_name) AS array_vm_names, > device_id, > entity_type, > array_agg(template_version_name) AS array_template_version_name >FROM vm_static >INNER JOIN vm_device > ON vm_static.vm_guid = vm_device.vm_id >WHERE device = 'disk' >GROUP BY device_id, > entity_type; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW step_progress AS > SELECT s.step_id, s.job_id, COALESCE(s.progress, CASE s.status WHEN 'FINISHED' THEN 100 END, 0) as progress > FROM step s; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW entity_step_progress AS >SELECT sse.entity_id, SUM(s.progress*sse.step_entity_weight/100) AS progress >FROM step_subject_entity sse >INNER JOIN step_progress s > ON s.step_id = sse.step_id >INNER JOIN job j > ON s.job_id = j.job_id >WHERE sse.step_entity_weight IS NOT NULL > AND j.status = 'STARTED' > AND s.progress IS NOT NULL >GROUP BY sse.entity_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW images_storage_domain_view AS >SELECT images.image_guid AS image_guid, > storage_domain_static.storage_name AS storage_name, > storage_pool_iso_map.storage_pool_id AS storage_pool_id, > storage_domain_static.storage_type AS storage_type, > images.creation_date AS creation_date, > images.size AS size, > images.it_guid AS it_guid, > snap.description AS description, > images.ParentId AS ParentId, > images.lastModified AS lastModified, > snap.app_list AS app_list, > image_storage_domain_map.storage_domain_id AS storage_id, > images.vm_snapshot_id AS vm_snapshot_id, > images.volume_type AS volume_type, > images.volume_format AS volume_format, > images.qcow_compat AS qcow_compat, > images.imageStatus AS imageStatus, > images.image_group_id AS image_group_id, > images.active, > images.volume_classification, > vms_for_disk_view.entity_type AS entity_type, > array_to_string(vms_for_disk_view.array_vm_names, ',') AS vm_names, > COALESCE(array_upper(vms_for_disk_view.array_vm_names, 1), 0) AS number_of_vms, > array_to_string(vms_for_disk_view.array_template_version_name, ',') AS template_version_names, > base_disks.disk_id, > base_disks.disk_alias AS disk_alias, > base_disks.disk_description AS disk_description, > base_disks.shareable AS shareable, > base_disks.wipe_after_delete AS wipe_after_delete, > base_disks.propagate_errors, > base_disks.sgio AS sgio, > base_disks.disk_content_type AS disk_content_type, > base_disks.backup AS backup, > image_storage_domain_map.quota_id AS quota_id, > quota.quota_name AS quota_name, > storage_pool.quota_enforcement_type, > image_storage_domain_map.disk_profile_id AS disk_profile_id, > disk_profiles.name AS disk_profile_name, > disk_image_dynamic.actual_size AS actual_size, > disk_image_dynamic.read_rate AS read_rate, > disk_image_dynamic.write_rate AS write_rate, > disk_image_dynamic.read_latency_seconds AS read_latency_seconds, > disk_image_dynamic.write_latency_seconds AS write_latency_seconds, > disk_image_dynamic.flush_latency_seconds AS flush_latency_seconds, > base_disks.disk_storage_type AS disk_storage_type, > base_disks.cinder_volume_type AS cinder_volume_type, > image_transfers.phase AS image_transfer_phase, > image_transfers.type AS image_transfer_type, > image_transfers.bytes_sent AS image_transfer_bytes_sent, > image_transfers.bytes_total AS image_transfer_bytes_total, > entity_step_progress.progress AS progress >FROM images >LEFT JOIN disk_image_dynamic > ON images.image_guid = disk_image_dynamic.image_id >LEFT JOIN base_disks > ON images.image_group_id = base_disks.disk_id >LEFT JOIN vms_for_disk_view > ON vms_for_disk_view.device_id = images.image_group_id >LEFT JOIN image_storage_domain_map > ON image_storage_domain_map.image_id = images.image_guid >LEFT JOIN storage_domain_static > ON image_storage_domain_map.storage_domain_id = storage_domain_static.id >LEFT JOIN snapshots snap > ON images.vm_snapshot_id = snap.snapshot_id >LEFT JOIN quota > ON image_storage_domain_map.quota_id = quota.id >LEFT JOIN disk_profiles > ON image_storage_domain_map.disk_profile_id = disk_profiles.id >LEFT JOIN storage_pool_iso_map > ON storage_pool_iso_map.storage_id = storage_domain_static.id >LEFT JOIN storage_pool > ON storage_pool.id = storage_pool_iso_map.storage_pool_id >LEFT JOIN image_transfers > ON images.image_group_id = image_transfers.disk_id >LEFT JOIN entity_step_progress > ON images.image_group_id = entity_step_progress.entity_id >WHERE images.image_guid != '00000000-0000-0000-0000-000000000000'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW storage_domain_file_repos AS >SELECT storage_domain_static.id AS storage_domain_id, > storage_domain_static.storage_domain_type AS storage_domain_type, > storage_pool_iso_map.storage_pool_id AS storage_pool_id, > storage_pool_iso_map.status AS storage_domain_status, > repo_file_meta_data.repo_image_id AS repo_image_id, > repo_file_meta_data.size AS size, > repo_file_meta_data.date_created AS date_created, > repo_file_meta_data.last_refreshed AS last_refreshed, > repo_file_meta_data.file_type AS file_type, > vds_dynamic.status AS vds_status, > storage_pool.status AS storage_pool_status >FROM storage_domain_static >INNER JOIN storage_pool_iso_map > ON storage_domain_static.id = storage_pool_iso_map.storage_id >INNER JOIN storage_pool > ON storage_pool.id = storage_pool_iso_map.storage_pool_id >INNER JOIN vds_dynamic > ON vds_dynamic.vds_id = storage_pool.spm_vds_id >LEFT JOIN repo_file_meta_data > ON storage_pool_iso_map.storage_id = repo_file_meta_data.repo_domain_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW storage_for_image_view AS >SELECT images.image_guid AS image_id, > array_to_string(array_agg(storage_domain_static.id), ',') storage_id, > array_to_string(array_agg(storage_domain_static.storage_type), ',') storage_type, > array_to_string(array_agg(storage_domain_static.storage_name), ',') AS storage_name, > array_to_string(array_agg(COALESCE(CAST(quota.id AS VARCHAR), '')), ',') AS quota_id, > array_to_string(array_agg(COALESCE(quota.quota_name, '')), ',') AS quota_name, > array_to_string(array_agg(COALESCE(CAST(disk_profiles.id AS VARCHAR), '')), ',') AS disk_profile_id, > array_to_string(array_agg(COALESCE(disk_profiles.name, '')), ',') AS disk_profile_name >FROM images >LEFT JOIN image_storage_domain_map > ON image_storage_domain_map.image_id = images.image_guid >LEFT JOIN storage_domain_static > ON image_storage_domain_map.storage_domain_id = storage_domain_static.id >LEFT JOIN quota > ON image_storage_domain_map.quota_id = quota.id >LEFT JOIN disk_profiles > ON image_storage_domain_map.disk_profile_id = disk_profiles.id >GROUP BY images.image_guid; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_images_view AS >SELECT storage_for_image_view.storage_id AS storage_id, > storage_for_image_view.storage_name AS storage_name, > storage_for_image_view.storage_type, > images_storage_domain_view.storage_pool_id AS storage_pool_id, > images_storage_domain_view.image_guid AS image_guid, > images_storage_domain_view.creation_date AS creation_date, > disk_image_dynamic.actual_size AS actual_size, > disk_image_dynamic.read_rate AS read_rate, > disk_image_dynamic.read_latency_seconds AS read_latency_seconds, > disk_image_dynamic.write_latency_seconds AS write_latency_seconds, > disk_image_dynamic.flush_latency_seconds AS flush_latency_seconds, > disk_image_dynamic.write_rate AS write_rate, > images_storage_domain_view.size AS size, > images_storage_domain_view.it_guid AS it_guid, > images_storage_domain_view.description AS description, > images_storage_domain_view.ParentId AS ParentId, > images_storage_domain_view.imageStatus AS imageStatus, > images_storage_domain_view.lastModified AS lastModified, > images_storage_domain_view.app_list AS app_list, > images_storage_domain_view.vm_snapshot_id AS vm_snapshot_id, > images_storage_domain_view.volume_type AS volume_type, > images_storage_domain_view.image_group_id AS image_group_id, > images_storage_domain_view.active AS active, > images_storage_domain_view.volume_classification AS volume_classification, > images_storage_domain_view.volume_format AS volume_format, > images_storage_domain_view.qcow_compat AS qcow_compat, > images_storage_domain_view.wipe_after_delete AS wipe_after_delete, > images_storage_domain_view.propagate_errors AS propagate_errors, > images_storage_domain_view.sgio AS sgio, > images_storage_domain_view.disk_content_type AS disk_content_type, > images_storage_domain_view.backup AS backup, > images_storage_domain_view.entity_type AS entity_type, > images_storage_domain_view.number_of_vms AS number_of_vms, > images_storage_domain_view.vm_names AS vm_names, > images_storage_domain_view.template_version_names AS template_version_names, > storage_for_image_view.quota_id AS quota_id, > storage_for_image_view.quota_name AS quota_name, > images_storage_domain_view.quota_enforcement_type, > storage_for_image_view.disk_profile_id AS disk_profile_id, > storage_for_image_view.disk_profile_name AS disk_profile_name, > images_storage_domain_view.disk_id, > images_storage_domain_view.disk_alias AS disk_alias, > images_storage_domain_view.disk_description AS disk_description, > images_storage_domain_view.shareable AS shareable, > images_storage_domain_view.image_transfer_phase AS image_transfer_phase, > images_storage_domain_view.image_transfer_type AS image_transfer_type, > images_storage_domain_view.image_transfer_bytes_sent AS image_transfer_bytes_sent, > images_storage_domain_view.image_transfer_bytes_total AS image_transfer_bytes_total, > images_storage_domain_view.progress AS progress, > images_storage_domain_view.disk_storage_type AS disk_storage_type, > images_storage_domain_view.cinder_volume_type AS cinder_volume_type >FROM images_storage_domain_view >INNER JOIN disk_image_dynamic > ON images_storage_domain_view.image_guid = disk_image_dynamic.image_id >INNER JOIN storage_for_image_view > ON images_storage_domain_view.image_guid = storage_for_image_view.image_id >WHERE images_storage_domain_view.active = TRUE; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW all_disks_including_snapshots AS >SELECT storage_impl.*, > bd.disk_id, > > bd.wipe_after_delete, > bd.propagate_errors, > bd.disk_alias, > bd.disk_description, > bd.shareable, > bd.sgio, > bd.disk_storage_type, > bd.cinder_volume_type, > bd.disk_content_type, > bd.backup >FROM ( > SELECT storage_for_image_view.storage_id AS storage_id, > > storage_for_image_view.storage_name AS storage_name, > storage_for_image_view.storage_type AS storage_type, > storage_pool_id, > image_guid, > > creation_date, > actual_size, > read_rate, > write_rate, > read_latency_seconds, > write_latency_seconds, > flush_latency_seconds, > size, > it_guid, > imageStatus, > lastModified, > volume_type, > volume_format, > qcow_compat, > image_group_id, > description, > > ParentId, > app_list, > vm_snapshot_id, > active, > volume_classification, > entity_type, > number_of_vms, > vm_names, > template_version_names, > storage_for_image_view.quota_id AS quota_id, > > storage_for_image_view.quota_name AS quota_name, > quota_enforcement_type, > image_transfer_phase, > image_transfer_type, > image_transfer_bytes_sent, > image_transfer_bytes_total, > progress, > storage_for_image_view.disk_profile_id AS disk_profile_id, > > storage_for_image_view.disk_profile_name AS disk_profile_name, > NULL AS lun_id, > > NULL AS physical_volume_id, > NULL AS volume_group_id, > NULL AS serial, > NULL AS lun_mapping, > NULL AS vendor_id, > NULL AS product_id, > NULL AS device_size, > NULL AS discard_max_size > FROM images_storage_domain_view > INNER JOIN storage_for_image_view > ON images_storage_domain_view.image_guid = storage_for_image_view.image_id > GROUP BY storage_for_image_view.storage_id, > storage_for_image_view.storage_name, > storage_for_image_view.storage_type, > storage_pool_id, > image_guid, > > creation_date, > actual_size, > read_rate, > write_rate, > read_latency_seconds, > write_latency_seconds, > flush_latency_seconds, > size, > it_guid, > imageStatus, > lastModified, > volume_type, > volume_format, > qcow_compat, > image_group_id, > description, > > ParentId, > app_list, > vm_snapshot_id, > active, > volume_classification, > entity_type, > number_of_vms, > vm_names, > template_version_names, > storage_for_image_view.quota_id, > storage_for_image_view.quota_name, > quota_enforcement_type, > image_transfer_phase, > image_transfer_type, > image_transfer_bytes_sent, > image_transfer_bytes_total, > progress, > storage_for_image_view.disk_profile_id, > storage_for_image_view.disk_profile_name > UNION ALL > SELECT NULL AS storage_id, > > NULL AS storage_name, > NULL AS storage_type, > NULL AS storage_pool_id, > NULL AS image_guid, > > NULL AS creation_date, > NULL AS actual_size, > NULL AS read_rate, > NULL AS write_rate, > NULL AS read_latency_seconds, > NULL AS write_latency_seconds, > NULL AS flush_latency_seconds, > NULL AS size, > NULL AS it_guid, > NULL AS imageStatus, > NULL AS lastModified, > NULL AS volume_type, > NULL AS volume_format, > NULL AS qcow_compat, > dlm.disk_id AS image_group_id, > NULL AS description, > > NULL AS ParentId, > NULL AS app_list, > NULL AS vm_snapshot_id, > NULL AS active, > NULL AS volume_classification, > vms_for_disk_view.entity_type, > COALESCE(array_upper(vms_for_disk_view.array_vm_names, 1), 0) AS number_of_vms, > array_to_string(vms_for_disk_view.array_vm_names, ',') AS vm_names, > array_to_string(vms_for_disk_view.array_template_version_name, ',') AS template_version_names, > NULL AS quota_id, > > NULL AS quota_name, > NULL AS quota_enforcement_type, > NULL AS image_transfer_phase, > NULL AS image_transfer_type, > NULL AS image_transfer_bytes_sent, > NULL AS image_transfer_bytes_total, > NULL AS progress, > NULL AS disk_profile_id, > > NULL AS disk_profile_name, > l.lun_id, > > l.physical_volume_id, > l.volume_group_id, > l.serial, > l.lun_mapping, > l.vendor_id, > l.product_id, > l.device_size, > l.discard_max_size > FROM disk_lun_map dlm > INNER JOIN luns l > ON l.lun_id = dlm.lun_id > LEFT JOIN vms_for_disk_view > ON vms_for_disk_view.device_id = dlm.disk_id > ) AS storage_impl >INNER JOIN base_disks bd > ON bd.disk_id = storage_impl.image_group_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW all_disks_including_snapshots_and_memory AS >SELECT storage_impl.*, > bd.disk_id, > > bd.wipe_after_delete, > bd.propagate_errors, > bd.disk_alias, > bd.disk_description, > bd.shareable, > bd.sgio, > bd.disk_storage_type, > bd.cinder_volume_type, > bd.disk_content_type, > bd.backup >FROM ( > SELECT storage_for_image_view.storage_id AS storage_id, > > storage_for_image_view.storage_name AS storage_name, > storage_for_image_view.storage_type AS storage_type, > storage_pool_id, > image_guid, > > creation_date, > actual_size, > read_rate, > write_rate, > read_latency_seconds, > write_latency_seconds, > flush_latency_seconds, > size, > it_guid, > imageStatus, > lastModified, > volume_type, > volume_format, > qcow_compat, > image_group_id, > description, > > ParentId, > app_list, > vm_snapshot_id, > active, > volume_classification, > entity_type, > number_of_vms, > vm_names, > template_version_names, > storage_for_image_view.quota_id AS quota_id, > > storage_for_image_view.quota_name AS quota_name, > quota_enforcement_type, > image_transfer_phase, > image_transfer_type, > image_transfer_bytes_sent, > image_transfer_bytes_total, > progress, > storage_for_image_view.disk_profile_id AS disk_profile_id, > > storage_for_image_view.disk_profile_name AS disk_profile_name, > NULL AS lun_id, > > NULL AS physical_volume_id, > NULL AS volume_group_id, > NULL AS serial, > NULL AS lun_mapping, > NULL AS vendor_id, > NULL AS product_id, > NULL AS device_size, > NULL AS discard_max_size > FROM images_storage_domain_view > INNER JOIN storage_for_image_view > ON images_storage_domain_view.image_guid = storage_for_image_view.image_id > GROUP BY storage_for_image_view.storage_id, > storage_for_image_view.storage_name, > storage_for_image_view.storage_type, > storage_pool_id, > image_guid, > > creation_date, > actual_size, > read_rate, > write_rate, > read_latency_seconds, > write_latency_seconds, > flush_latency_seconds, > size, > it_guid, > imageStatus, > lastModified, > volume_type, > volume_format, > qcow_compat, > image_group_id, > description, > > ParentId, > app_list, > vm_snapshot_id, > active, > volume_classification, > entity_type, > number_of_vms, > vm_names, > template_version_names, > storage_for_image_view.quota_id, > storage_for_image_view.quota_name, > quota_enforcement_type, > image_transfer_phase, > image_transfer_type, > image_transfer_bytes_sent, > image_transfer_bytes_total, > progress, > storage_for_image_view.disk_profile_id, > storage_for_image_view.disk_profile_name > UNION ALL > SELECT NULL AS storage_id, > > NULL AS storage_name, > NULL AS storage_type, > NULL AS storage_pool_id, > NULL AS image_guid, > > NULL AS creation_date, > NULL AS actual_size, > NULL AS read_rate, > NULL AS write_rate, > NULL AS read_latency_seconds, > NULL AS write_latency_seconds, > NULL AS flush_latency_seconds, > NULL AS size, > NULL AS it_guid, > NULL AS imageStatus, > NULL AS lastModified, > NULL AS volume_type, > NULL AS volume_format, > NULL AS qcow_compat, > dlm.disk_id AS image_group_id, > NULL AS description, > > NULL AS ParentId, > NULL AS app_list, > NULL AS vm_snapshot_id, > NULL AS active, > NULL AS volume_classification, > vms_for_disk_view.entity_type, > COALESCE(array_upper(vms_for_disk_view.array_vm_names, 1), 0) AS number_of_vms, > array_to_string(vms_for_disk_view.array_vm_names, ',') AS vm_names, > array_to_string(vms_for_disk_view.array_template_version_name, ',') AS template_version_names, > NULL AS quota_id, > > NULL AS quota_name, > NULL AS quota_enforcement_type, > NULL AS image_transfer_phase, > NULL AS image_transfer_type, > NULL AS image_transfer_bytes_sent, > NULL AS image_transfer_bytes_total, > NULL AS progress, > NULL AS disk_profile_id, > > NULL AS disk_profile_name, > l.lun_id, > > l.physical_volume_id, > l.volume_group_id, > l.serial, > l.lun_mapping, > l.vendor_id, > l.product_id, > l.device_size, > l.discard_max_size > FROM disk_lun_map dlm > INNER JOIN luns l > ON l.lun_id = dlm.lun_id > LEFT JOIN vms_for_disk_view > ON vms_for_disk_view.device_id = dlm.disk_id > ) AS storage_impl >INNER JOIN base_disks bd > ON bd.disk_id = storage_impl.image_group_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW all_disks AS >SELECT * >FROM all_disks_including_snapshots_and_memory >WHERE active IS NULL > OR active = TRUE; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW all_disks_for_vms AS >SELECT all_disks_including_snapshots_and_memory.*, > vm_device.is_plugged, > vm_device.logical_name, > vm_device.vm_id >FROM all_disks_including_snapshots_and_memory >INNER JOIN vm_device > ON vm_device.device_id = all_disks_including_snapshots_and_memory.image_group_id >WHERE ( > ( > vm_device.snapshot_id IS NULL > AND all_disks_including_snapshots_and_memory.active IS NOT FALSE > ) > OR vm_device.snapshot_id = all_disks_including_snapshots_and_memory.vm_snapshot_id > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW storage_domains_image_sizes AS >SELECT storage_domain_id, > CAST(COALESCE(SUM( > CASE WHEN active = TRUE > AND( > entity_type IS NULL > OR entity_type <> 'TEMPLATE' > ) > THEN size > ELSE actual_size > END), 0) * 0.000000000931322574615478515625 AS BIGINT) > AS commited_disk_size, > CAST(COALESCE(SUM(actual_size), 0) > * 0.000000000931322574615478515625 AS BIGINT) > AS actual_images_size >FROM images i >INNER JOIN image_storage_domain_map isdm > ON i.image_guid = isdm.image_id >LEFT JOIN disk_image_dynamic din > ON i.image_guid = din.image_id >LEFT JOIN vms_for_disk_view vfdv > ON i.image_group_id = vfdv.device_id >GROUP BY storage_domain_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vg_discard_support_view AS >SELECT volume_group_id, > BOOL_AND(COALESCE(luns.discard_max_size, 0) > 0) AS supports_discard >FROM luns >WHERE volume_group_id <> '' >GROUP BY volume_group_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW hosted_engine_storage_domains_ids_view AS >SELECT image_storage_domain_map.storage_domain_id AS id >FROM vm_static > JOIN vm_device > ON vm_device.vm_id = vm_static.vm_guid > JOIN images > ON images.image_group_id = vm_device.device_id > JOIN image_storage_domain_map > ON image_storage_domain_map.image_id = images.image_guid >WHERE vm_static.origin IN (5,6) > AND images.active; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW storage_domains AS >SELECT storage_domain_static.id AS id, > storage_domain_static.storage AS storage, > storage_domain_static.storage_name AS storage_name, > storage_domain_static.storage_description AS storage_description, > storage_domain_static.storage_comment AS storage_comment, > storage_pool_iso_map.storage_pool_id AS storage_pool_id, > storage_domain_dynamic.available_disk_size AS available_disk_size, > storage_domain_dynamic.confirmed_available_disk_size AS confirmed_available_disk_size, > storage_domain_dynamic.vdo_savings AS vdo_savings, > storage_domain_dynamic.used_disk_size AS used_disk_size, > storage_domains_image_sizes.commited_disk_size, > storage_domains_image_sizes.actual_images_size, > storage_pool_iso_map.status AS status, > storage_pool.name AS storage_pool_name, > storage_domain_static.storage_type AS storage_type, > storage_domain_static.storage_domain_type AS storage_domain_type, > storage_domain_static.storage_domain_format_type AS storage_domain_format_type, > storage_domain_static.last_time_used_as_master AS last_time_used_as_master, > storage_domain_static.wipe_after_delete AS wipe_after_delete, > storage_domain_static.discard_after_delete AS discard_after_delete, > storage_domain_static.first_metadata_device AS first_metadata_device, > storage_domain_static.vg_metadata_device AS vg_metadata_device, > storage_domain_static.backup AS backup, > storage_domain_static.block_size AS block_size, > COALESCE(storage_domain_shared_status.status, 0) AS storage_domain_shared_status, > storage_domain_static.recoverable AS recoverable, > domains_with_unregistered_entities_view.storage_domain_id IS NOT NULL AS contains_unregistered_entities, > storage_domain_static.warning_low_space_indicator AS warning_low_space_indicator, > storage_domain_static.critical_space_action_blocker AS critical_space_action_blocker, > storage_domain_static.warning_low_confirmed_space_indicator AS warning_low_confirmed_space_indicator, > storage_domain_dynamic.external_status AS external_status, > vg_discard_support_view.supports_discard AS supports_discard, > EXISTS ( > SELECT 1 > FROM hosted_engine_storage_domains_ids_view > WHERE hosted_engine_storage_domains_ids_view.id = storage_domain_static.id > ) AS is_hosted_engine_storage >FROM storage_domain_static >INNER JOIN storage_domain_dynamic > ON storage_domain_static.id = storage_domain_dynamic.id >LEFT JOIN storage_pool_iso_map > ON storage_domain_static.id = storage_pool_iso_map.storage_id >LEFT JOIN storage_pool > ON storage_pool_iso_map.storage_pool_id = storage_pool.id >LEFT JOIN domains_with_unregistered_entities_view > ON domains_with_unregistered_entities_view.storage_domain_id = storage_domain_static.id >LEFT JOIN storage_domains_image_sizes > ON storage_domains_image_sizes.storage_domain_id = storage_domain_static.id >LEFT JOIN storage_domain_shared_status > ON storage_domain_shared_status.storage_id = storage_domain_static.id >LEFT JOIN vg_discard_support_view > ON storage_domain_static.storage = vg_discard_support_view.volume_group_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW storage_domains_without_storage_pools AS >SELECT DISTINCT storage_domain_static.id AS id, > storage_domain_static.storage AS storage, > storage_domain_static.storage_name AS storage_name, > storage_domain_static.storage_description AS storage_description, > storage_domain_static.storage_comment AS storage_comment, > storage_domain_static.storage_type AS storage_type, > storage_domain_static.storage_domain_type AS storage_domain_type, > storage_domain_static.storage_domain_format_type AS storage_domain_format_type, > storage_domain_static.last_time_used_as_master AS last_time_used_as_master, > storage_domain_static.wipe_after_delete AS wipe_after_delete, > storage_domain_static.discard_after_delete AS discard_after_delete, > storage_domain_static.first_metadata_device AS first_metadata_device, > storage_domain_static.vg_metadata_device AS vg_metadata_device, > storage_domain_static.backup AS backup, > storage_domain_static.block_size as block_size, > NULL AS storage_pool_id, > NULL AS storage_pool_name, > storage_domain_dynamic.available_disk_size AS available_disk_size, > storage_domain_dynamic.confirmed_available_disk_size AS confirmed_available_disk_size, > storage_domain_dynamic.vdo_savings AS vdo_savings, > storage_domain_dynamic.used_disk_size AS used_disk_size, > storage_domains_image_sizes.commited_disk_size, > storage_domains_image_sizes.actual_images_size, > NULL AS status, > COALESCE(storage_domain_shared_status.status, 0) AS storage_domain_shared_status, > storage_domain_static.recoverable AS recoverable, > domains_with_unregistered_entities_view.storage_domain_id IS NOT NULL AS contains_unregistered_entities, > storage_domain_static.warning_low_space_indicator AS warning_low_space_indicator, > storage_domain_static.critical_space_action_blocker AS critical_space_action_blocker, > storage_domain_static.warning_low_confirmed_space_indicator AS warning_low_confirmed_space_indicator, > storage_domain_dynamic.external_status AS external_status, > vg_discard_support_view.supports_discard AS supports_discard, > EXISTS ( > SELECT 1 > FROM hosted_engine_storage_domains_ids_view > WHERE hosted_engine_storage_domains_ids_view.id = storage_domain_static.id > ) AS is_hosted_engine_storage >FROM storage_domain_static >INNER JOIN storage_domain_dynamic > ON storage_domain_static.id = storage_domain_dynamic.id >LEFT JOIN storage_pool_iso_map > ON storage_domain_static.id = storage_pool_iso_map.storage_id >LEFT JOIN storage_domain_shared_status > ON storage_domain_shared_status.storage_id = storage_domain_static.id >LEFT JOIN domains_with_unregistered_entities_view > ON domains_with_unregistered_entities_view.storage_domain_id = storage_domain_static.id >LEFT JOIN storage_domains_image_sizes > ON storage_domains_image_sizes.storage_domain_id = storage_domain_static.id >LEFT JOIN vg_discard_support_view > ON storage_domain_static.storage = vg_discard_support_view.volume_group_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW storage_domains_for_search AS >SELECT storage_domain_static.id AS id, > storage_domain_static.storage AS storage, > storage_domain_static.storage_name AS storage_name, > storage_domain_static.storage_description AS storage_description, > storage_domain_static.storage_comment AS storage_comment, > storage_domain_static.storage_type AS storage_type, > storage_domain_static.storage_domain_type AS storage_domain_type, > storage_domain_static.storage_domain_format_type AS storage_domain_format_type, > storage_domain_static.last_time_used_as_master AS last_time_used_as_master, > storage_domain_static.wipe_after_delete AS wipe_after_delete, > storage_domain_static.discard_after_delete AS discard_after_delete, > storage_domain_static.first_metadata_device AS first_metadata_device, > storage_domain_static.vg_metadata_device AS vg_metadata_device, > storage_domain_static.backup AS backup, > CASE > WHEN status_table.is_multi_domain > THEN NULL > WHEN status_table.status IS NULL > THEN 2 > ELSE status_table.status > END AS status, > storage_domain_static.block_size AS block_size, > status_table.storage_pool_ids [ 1 ] AS storage_pool_id, > status_table.pool_names AS storage_pool_name, > storage_domain_dynamic.available_disk_size AS available_disk_size, > storage_domain_dynamic.confirmed_available_disk_size AS confirmed_available_disk_size, > storage_domain_dynamic.vdo_savings AS vdo_savings, > storage_domain_dynamic.used_disk_size AS used_disk_size, > storage_domains_image_sizes.commited_disk_size, > storage_domains_image_sizes.actual_images_size, > COALESCE(storage_domain_shared_status.status, 0) AS storage_domain_shared_status, > storage_domain_static.recoverable AS recoverable, > domains_with_unregistered_entities_view.storage_domain_id IS NOT NULL AS contains_unregistered_entities, > storage_domain_static.warning_low_space_indicator AS warning_low_space_indicator, > storage_domain_static.critical_space_action_blocker AS critical_space_action_blocker, > storage_domain_static.warning_low_confirmed_space_indicator AS warning_low_confirmed_space_indicator, > storage_domain_dynamic.external_status AS external_status, > vg_discard_support_view.supports_discard AS supports_discard, > EXISTS ( > SELECT 1 > FROM hosted_engine_storage_domains_ids_view > WHERE hosted_engine_storage_domains_ids_view.id = storage_domain_static.id > ) AS is_hosted_engine_storage >FROM storage_domain_static >INNER JOIN storage_domain_dynamic > ON storage_domain_static.id = storage_domain_dynamic.id >LEFT JOIN ( > SELECT storage_id, > COUNT(storage_id) > 1 AS is_multi_domain, > MAX(storage_pool_iso_map.status) AS status, > array_to_string(array_agg(storage_pool.name), ',') AS pool_names, > CASE > WHEN COUNT(DISTINCT storage_pool.id) = 1 > THEN array_agg(storage_pool.id) > ELSE NULL > END AS storage_pool_ids > FROM storage_pool_iso_map > INNER JOIN storage_pool > ON storage_pool_iso_map.storage_pool_id = storage_pool.id > GROUP BY storage_id > ) AS status_table > ON storage_domain_static.id = status_table.storage_id >LEFT JOIN storage_domain_shared_status > ON storage_domain_shared_status.storage_id = storage_domain_static.id >LEFT JOIN domains_with_unregistered_entities_view > ON domains_with_unregistered_entities_view.storage_domain_id = storage_domain_static.id >LEFT JOIN storage_domains_image_sizes > ON storage_domains_image_sizes.storage_domain_id = storage_domain_static.id >LEFT JOIN vg_discard_support_view > ON storage_domain_static.storage = vg_discard_support_view.volume_group_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW luns_view AS >SELECT luns.*, > storage_domain_static.id AS storage_id, > storage_domain_static.storage_name AS storage_name, > disk_lun_map.disk_id AS disk_id, > all_disks.disk_alias AS disk_alias >FROM luns >LEFT JOIN storage_domain_static > ON luns.volume_group_id = storage_domain_static.storage >LEFT JOIN disk_lun_map > ON luns.lun_id = disk_lun_map.lun_id >LEFT JOIN all_disks > ON disk_lun_map.disk_id = all_disks.disk_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_templates_based_view AS >SELECT vm_templates.vm_guid AS vmt_guid, > vm_templates.vm_name AS name, > vm_templates.mem_size_mb AS mem_size_mb, > vm_templates.max_memory_size_mb AS max_memory_size_mb, > vm_templates.num_of_io_threads AS num_of_io_threads, > vm_templates.os AS os, > vm_templates.creation_date AS creation_date, > vm_templates.child_count AS child_count, > vm_templates.num_of_sockets AS num_of_sockets, > vm_templates.cpu_per_socket AS cpu_per_socket, > vm_templates.threads_per_cpu AS threads_per_cpu, > vm_templates.fn_get_num_of_vcpus AS num_of_cpus, > vm_templates.description AS description, > vm_templates.free_text_comment AS free_text_comment, > vm_templates.cluster_id AS cluster_id, > vm_templates.num_of_monitors AS num_of_monitors, > vm_templates.single_qxl_pci AS single_qxl_pci, > vm_templates.allow_console_reconnect AS allow_console_reconnect, > vm_templates.template_status AS status, > vm_templates.usb_policy AS usb_policy, > vm_templates.time_zone AS time_zone, > cluster.name AS cluster_name, > cluster.compatibility_version AS cluster_compatibility_version, > cluster.trusted_service AS trusted_service, > vm_templates.vm_type AS vm_type, > vm_templates.nice_level AS nice_level, > vm_templates.cpu_shares AS cpu_shares, > storage_pool.id AS storage_pool_id, > storage_pool.name AS storage_pool_name, > storage_pool.quota_enforcement_type AS quota_enforcement_type, > vm_templates.default_boot_sequence AS default_boot_sequence, > vm_templates.default_display_type AS default_display_type, > vm_templates.priority AS priority, > vm_templates.auto_startup AS auto_startup, > vm_templates.lease_sd_id AS lease_sd_id, > vm_templates.is_stateless AS is_stateless, > vm_templates.is_smartcard_enabled AS is_smartcard_enabled, > vm_templates.is_delete_protected AS is_delete_protected, > vm_templates.sso_method AS sso_method, > vm_templates.iso_path AS iso_path, > vm_templates.origin AS origin, > vm_templates.initrd_url AS initrd_url, > vm_templates.kernel_url AS kernel_url, > vm_templates.kernel_params AS kernel_params, > vm_templates.quota_id AS quota_id, > quota.quota_name AS quota_name, > vm_templates.db_generation AS db_generation, > vm_templates.migration_support, > fn_get_dedicated_hosts_ids_by_vm_id(vm_templates.vm_guid) AS dedicated_vm_for_vds, > vm_templates.is_disabled, > vm_templates.tunnel_migration, > vm_templates.vnc_keyboard_layout AS vnc_keyboard_layout, > vm_templates.min_allocated_mem AS min_allocated_mem, > vm_templates.is_run_and_pause AS is_run_and_pause, > vm_templates.created_by_user_id AS created_by_user_id, > vm_templates.entity_type, > vm_templates.migration_downtime AS migration_downtime, > cluster.architecture AS architecture, > vm_templates.template_version_number AS template_version_number, > vm_templates.vmt_guid AS base_template_id, > vm_templates.template_version_name AS template_version_name, > vm_templates.serial_number_policy AS serial_number_policy, > vm_templates.custom_serial_number AS custom_serial_number, > vm_templates.is_boot_menu_enabled AS is_boot_menu_enabled, > vm_templates.is_spice_file_transfer_enabled AS is_spice_file_transfer_enabled, > vm_templates.is_spice_copy_paste_enabled AS is_spice_copy_paste_enabled, > vm_templates.cpu_profile_id AS cpu_profile_id, > vm_templates.numatune_mode AS numatune_mode, > vm_templates.is_auto_converge AS is_auto_converge, > vm_templates.is_migrate_compressed AS is_migrate_compressed, > vm_templates.predefined_properties AS predefined_properties, > vm_templates.userdefined_properties AS userdefined_properties, > vm_templates.custom_emulated_machine AS custom_emulated_machine, > vm_templates.bios_type AS bios_type, > vm_templates.custom_cpu_name AS custom_cpu_name, > vm_templates.small_icon_id AS small_icon_id, > vm_templates.large_icon_id AS large_icon_id, > vm_templates.migration_policy_id as migration_policy_id, > vm_templates.console_disconnect_action AS console_disconnect_action, > vm_templates.resume_behavior AS resume_behavior, > vm_templates.custom_compatibility_version as custom_compatibility_version, > vm_templates.multi_queues_enabled AS multi_queues_enabled >FROM vm_static AS vm_templates >LEFT JOIN cluster > ON vm_templates.cluster_id = cluster.cluster_id >LEFT JOIN storage_pool > ON storage_pool.id = cluster.storage_pool_id >LEFT JOIN quota > ON vm_templates.quota_id = quota.id >WHERE entity_type = 'TEMPLATE' > OR entity_type = 'INSTANCE_TYPE' > OR entity_type = 'IMAGE_TYPE'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_templates_based_with_plug_info AS >SELECT vm_templates_based_view.*, > image_guid, > image_group_id, > is_plugged >FROM vm_templates_based_view >INNER JOIN vm_device vd > ON vd.vm_id = vm_templates_based_view.vmt_guid >INNER JOIN images > ON images.image_group_id = vd.device_id > AND images.active = TRUE; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_templates_based_storage_domain AS >SELECT vm_templates.vm_guid AS vmt_guid, > vm_templates.vm_name AS name, > vm_templates.mem_size_mb, > vm_templates.max_memory_size_mb, > vm_templates.num_of_io_threads, > vm_templates.os, > vm_templates.creation_date, > vm_templates.child_count, > vm_templates.num_of_sockets, > vm_templates.cpu_per_socket, > vm_templates.threads_per_cpu, > vm_templates.fn_get_num_of_vcpus AS num_of_cpus, > vm_templates.description, > vm_templates.free_text_comment, > vm_templates.cluster_id, > vm_templates.num_of_monitors, > vm_templates.single_qxl_pci, > vm_templates.allow_console_reconnect, > vm_templates.template_status AS status, > vm_templates.usb_policy, > vm_templates.time_zone, > cluster.name AS cluster_name, > vm_templates.vm_type, > vm_templates.nice_level, > vm_templates.cpu_shares, > storage_pool.id AS storage_pool_id, > storage_pool.name AS storage_pool_name, > vm_templates.default_boot_sequence, > vm_templates.default_display_type, > vm_templates.priority, > vm_templates.auto_startup, > vm_templates.lease_sd_id, > vm_templates.is_stateless, > vm_templates.iso_path, > vm_templates.origin, > vm_templates.initrd_url, > vm_templates.kernel_url, > vm_templates.kernel_params, > image_storage_domain_map.storage_domain_id AS storage_id, > quota.quota_name AS quota_name, > vm_templates.is_disabled, > vm_templates.min_allocated_mem, > vm_templates.is_run_and_pause, > vm_templates.created_by_user_id, > vm_templates.migration_downtime, > vm_templates.entity_type, > cluster.architecture, > vm_templates.template_version_number AS template_version_number, > vm_templates.vmt_guid AS base_template_id, > vm_templates.template_version_name AS template_version_name, > vm_templates.serial_number_policy AS serial_number_policy, > vm_templates.custom_serial_number AS custom_serial_number, > vm_templates.is_boot_menu_enabled AS is_boot_menu_enabled, > vm_templates.is_spice_file_transfer_enabled AS is_spice_file_transfer_enabled, > vm_templates.is_spice_copy_paste_enabled AS is_spice_copy_paste_enabled, > vm_templates.cpu_profile_id AS cpu_profile_id, > vm_templates.numatune_mode AS numatune_mode, > vm_templates.is_auto_converge AS is_auto_converge, > vm_templates.is_migrate_compressed AS is_migrate_compressed, > vm_templates.predefined_properties AS predefined_properties, > vm_templates.userdefined_properties AS userdefined_properties >FROM vm_static AS vm_templates >LEFT JOIN cluster > ON vm_templates.cluster_id = cluster.cluster_id >LEFT JOIN storage_pool > ON storage_pool.id = cluster.storage_pool_id >INNER JOIN vm_device > ON vm_device.vm_id = vm_templates.vm_guid >LEFT JOIN images > ON images.image_group_id = vm_device.device_id >LEFT JOIN image_storage_domain_map > ON image_storage_domain_map.image_id = images.image_guid >LEFT JOIN quota quota > ON quota.id = vm_templates.quota_id >WHERE entity_type = 'TEMPLATE' > OR entity_type = 'INSTANCE_TYPE' > OR entity_type = 'IMAGE_TYPE' >UNION >SELECT vm_templates_1.vm_guid AS vmt_guid, > vm_templates_1.vm_name AS name, > vm_templates_1.mem_size_mb, > vm_templates_1.max_memory_size_mb, > vm_templates_1.num_of_io_threads, > vm_templates_1.os, > vm_templates_1.creation_date, > vm_templates_1.child_count, > vm_templates_1.num_of_sockets, > vm_templates_1.cpu_per_socket, > vm_templates_1.threads_per_cpu, > vm_templates_1.fn_get_num_of_vcpus AS num_of_cpus, > vm_templates_1.description, > vm_templates_1.free_text_comment, > vm_templates_1.cluster_id, > vm_templates_1.num_of_monitors, > vm_templates_1.single_qxl_pci, > vm_templates_1.allow_console_reconnect, > vm_templates_1.template_status AS status, > vm_templates_1.usb_policy, > vm_templates_1.time_zone, > cluster_1.name AS cluster_name, > vm_templates_1.vm_type, > vm_templates_1.nice_level, > vm_templates_1.cpu_shares, > storage_pool_1.id AS storage_pool_id, > storage_pool_1.name AS storage_pool_name, > vm_templates_1.default_boot_sequence, > vm_templates_1.default_display_type, > vm_templates_1.priority, > vm_templates_1.auto_startup, > vm_templates_1.lease_sd_id, > vm_templates_1.is_stateless, > vm_templates_1.iso_path, > vm_templates_1.origin, > vm_templates_1.initrd_url, > vm_templates_1.kernel_url, > vm_templates_1.kernel_params, > image_storage_domain_map.storage_domain_id AS storage_id, > quota.quota_name AS quota_name, > vm_templates_1.is_disabled, > vm_templates_1.min_allocated_mem, > vm_templates_1.is_run_and_pause, > vm_templates_1.created_by_user_id, > vm_templates_1.migration_downtime, > vm_templates_1.entity_type, > cluster_1.architecture, > vm_templates_1.template_version_number AS template_version_number, > vm_templates_1.vmt_guid AS base_template_id, > vm_templates_1.template_version_name AS template_version_name, > vm_templates_1.serial_number_policy AS serial_number_policy, > vm_templates_1.custom_serial_number AS custom_serial_number, > vm_templates_1.is_boot_menu_enabled AS is_boot_menu_enabled, > vm_templates_1.is_spice_file_transfer_enabled AS is_spice_file_transfer_enabled, > vm_templates_1.is_spice_copy_paste_enabled AS is_spice_copy_paste_enabled, > vm_templates_1.cpu_profile_id AS cpu_profile_id, > vm_templates_1.numatune_mode AS numatune_mode, > vm_templates_1.is_auto_converge AS is_auto_converge, > vm_templates_1.is_migrate_compressed AS is_migrate_compressed, > vm_templates_1.predefined_properties AS predefined_properties, > vm_templates_1.userdefined_properties AS userdefined_properties >FROM vm_static AS vm_templates_1 >LEFT JOIN cluster AS cluster_1 > ON vm_templates_1.cluster_id = cluster_1.cluster_id >LEFT JOIN storage_pool AS storage_pool_1 > ON storage_pool_1.id = cluster_1.storage_pool_id >INNER JOIN vm_device AS vm_device_1 > ON vm_device_1.vm_id = vm_templates_1.vm_guid >INNER JOIN images AS images_1 > ON images_1.image_group_id = vm_device_1.device_id >INNER JOIN image_storage_domain_map > ON image_storage_domain_map.image_id = images_1.image_guid >LEFT JOIN quota quota > ON quota.id = vm_templates_1.quota_id >WHERE entity_type = 'TEMPLATE' > OR entity_type = 'INSTANCE_TYPE' > OR entity_type = 'IMAGE_TYPE'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_templates_view AS >SELECT * >FROM vm_templates_based_view >WHERE entity_type = 'TEMPLATE'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_templates_storage_domain AS >SELECT * >FROM vm_templates_based_storage_domain >WHERE entity_type = 'TEMPLATE'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW instance_types_view AS >SELECT * >FROM vm_templates_based_view >WHERE entity_type = 'INSTANCE_TYPE'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW instance_types_storage_domain AS >SELECT * >FROM vm_templates_based_storage_domain >WHERE entity_type = 'INSTANCE_TYPE'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW image_types_view AS >SELECT * >FROM vm_templates_based_view >WHERE entity_type = 'IMAGE_TYPE'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW image_types_storage_domain AS >SELECT * >FROM vm_templates_based_storage_domain >WHERE entity_type = 'IMAGE_TYPE'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_pool_map_view AS >SELECT vm_pool_map.vm_guid AS vm_guid, > vm_pool_map.vm_pool_id AS vm_pool_id, > vm_pools.vm_pool_name AS vm_pool_name, > vm_pools.spice_proxy AS vm_pool_spice_proxy >FROM vm_pool_map >INNER JOIN vm_pools > ON vm_pool_map.vm_pool_id = vm_pools.vm_pool_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW tags_vm_pool_map_view AS >SELECT tags.tag_id AS tag_id, > tags.tag_name AS tag_name, > tags.parent_id AS parent_id, > tags.readonly AS readonly, > tags.type AS type, > tags_vm_pool_map.vm_pool_id AS vm_pool_id >FROM tags >INNER JOIN tags_vm_pool_map > ON tags.tag_id = tags_vm_pool_map.tag_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW tags_vm_map_view AS >SELECT tags.tag_id AS tag_id, > tags.tag_name AS tag_name, > tags.parent_id AS parent_id, > tags.readonly AS readonly, > tags.type AS type, > tags_vm_map.vm_id AS vm_id >FROM tags >INNER JOIN tags_vm_map > ON tags.tag_id = tags_vm_map.tag_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW tags_vds_map_view AS >SELECT tags.tag_id AS tag_id, > tags.tag_name AS tag_name, > tags.parent_id AS parent_id, > tags.readonly AS readonly, > tags.type AS type, > tags_vds_map.vds_id AS vds_id >FROM tags >INNER JOIN tags_vds_map > ON tags.tag_id = tags_vds_map.tag_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW tags_user_map_view AS >SELECT tags.tag_id AS tag_id, > tags.tag_name AS tag_name, > tags.parent_id AS parent_id, > tags.readonly AS readonly, > tags.type AS type, > tags_user_map.user_id AS user_id >FROM tags >INNER JOIN tags_user_map > ON tags.tag_id = tags_user_map.tag_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW tags_user_group_map_view AS >SELECT tags.tag_id AS tag_id, > tags.tag_name AS tag_name, > tags.parent_id AS parent_id, > tags.readonly AS readonly, > tags.type AS type, > tags_user_group_map.group_id AS group_id >FROM tags_user_group_map >INNER JOIN tags > ON tags_user_group_map.tag_id = tags.tag_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vms AS >SELECT vm_static.vm_name AS vm_name, > vm_static.mem_size_mb AS mem_size_mb, > vm_static.max_memory_size_mb AS max_memory_size_mb, > vm_static.num_of_io_threads AS num_of_io_threads, > vm_static.nice_level AS nice_level, > vm_static.cpu_shares AS cpu_shares, > vm_static.vmt_guid AS vmt_guid, > vm_static.os AS os, > vm_static.description AS description, > vm_static.free_text_comment AS free_text_comment, > vm_static.cluster_id AS cluster_id, > vm_static.creation_date AS creation_date, > vm_static.auto_startup AS auto_startup, > vm_static.lease_sd_id AS lease_sd_id, > vm_dynamic.lease_info AS lease_info, > vm_static.is_stateless AS is_stateless, > vm_static.is_smartcard_enabled AS is_smartcard_enabled, > vm_static.is_delete_protected AS is_delete_protected, > vm_static.sso_method AS sso_method, > fn_get_dedicated_hosts_ids_by_vm_id(vm_static.vm_guid) AS dedicated_vm_for_vds, > vm_static.default_boot_sequence AS default_boot_sequence, > vm_static.vm_type AS vm_type, > vm_pool_map_view.vm_pool_spice_proxy AS vm_pool_spice_proxy, > cluster.name AS cluster_name, > cluster.transparent_hugepages AS transparent_hugepages, > cluster.trusted_service AS trusted_service, > storage_pool.id AS storage_pool_id, > storage_pool.name AS storage_pool_name, > cluster.spice_proxy AS cluster_spice_proxy, > vm_templates.vm_name AS vmt_name, > vm_dynamic.status AS status, > vm_dynamic.vm_ip AS vm_ip, > fn_get_comparable_ip_list(vm_ip) AS vm_ip_inet_array, > vm_dynamic.vm_host AS vm_host, > vm_dynamic.last_start_time AS last_start_time, > vm_dynamic.boot_time AS boot_time, > vm_dynamic.downtime AS downtime, > vm_dynamic.guest_cur_user_name AS guest_cur_user_name, > vm_dynamic.console_cur_user_name AS console_cur_user_name, > vm_dynamic.runtime_name AS runtime_name, > vm_dynamic.guest_os AS guest_os, > vm_dynamic.console_user_id AS console_user_id, > vm_dynamic.guest_agent_nics_hash AS guest_agent_nics_hash, > vm_dynamic.run_on_vds AS run_on_vds, > vm_dynamic.migrating_to_vds AS migrating_to_vds, > vm_dynamic.app_list AS app_list, > vm_pool_map_view.vm_pool_name AS vm_pool_name, > vm_pool_map_view.vm_pool_id AS vm_pool_id, > vm_static.vm_guid AS vm_guid, > vm_static.num_of_monitors AS num_of_monitors, > vm_static.single_qxl_pci AS single_qxl_pci, > vm_static.allow_console_reconnect AS allow_console_reconnect, > vm_static.is_initialized AS is_initialized, > vm_static.num_of_sockets AS num_of_sockets, > vm_static.cpu_per_socket AS cpu_per_socket, > vm_static.threads_per_cpu AS threads_per_cpu, > vm_static.usb_policy AS usb_policy, > vm_dynamic.acpi_enable AS acpi_enable, > vm_dynamic.session AS SESSION, > vm_static.fn_get_num_of_vcpus AS num_of_cpus, > vm_static.quota_id AS quota_id, > quota.quota_name AS quota_name, > storage_pool.quota_enforcement_type AS quota_enforcement_type, > vm_dynamic.boot_sequence AS boot_sequence, > vm_dynamic.utc_diff AS utc_diff, > vm_dynamic.client_ip AS client_ip, > vm_dynamic.guest_requested_memory AS guest_requested_memory, > vm_static.time_zone AS time_zone, > vm_statistics.cpu_user AS cpu_user, > vm_statistics.cpu_sys AS cpu_sys, > vm_statistics.elapsed_time AS elapsed_time, > vm_statistics.usage_network_percent AS usage_network_percent, > vm_statistics.disks_usage AS disks_usage, > vm_statistics.usage_mem_percent AS usage_mem_percent, > vm_statistics.usage_cpu_percent AS usage_cpu_percent, > vds_static.vds_name AS run_on_vds_name, > cluster.cpu_name AS cluster_cpu_name, > vm_static.default_display_type AS default_display_type, > vm_static.priority AS priority, > vm_static.iso_path AS iso_path, > vm_static.origin AS origin, > cluster.compatibility_version AS cluster_compatibility_version, > vm_static.initrd_url AS initrd_url, > vm_static.kernel_url AS kernel_url, > vm_static.kernel_params AS kernel_params, > vm_dynamic.pause_status AS pause_status, > vm_dynamic.exit_message AS exit_message, > vm_dynamic.exit_status AS exit_status, > vm_static.migration_support AS migration_support, > vm_static.predefined_properties AS predefined_properties, > vm_static.userdefined_properties AS userdefined_properties, > vm_static.min_allocated_mem AS min_allocated_mem, > vm_dynamic.HASH AS HASH, > vm_static.cpu_pinning AS cpu_pinning, > vm_static.db_generation AS db_generation, > vm_static.host_cpu_flags AS host_cpu_flags, > vm_static.tunnel_migration AS tunnel_migration, > vm_static.vnc_keyboard_layout AS vnc_keyboard_layout, > vm_static.is_run_and_pause AS is_run_and_pause, > vm_static.created_by_user_id AS created_by_user_id, > vm_dynamic.last_watchdog_event AS last_watchdog_event, > vm_dynamic.last_watchdog_action AS last_watchdog_action, > vm_dynamic.is_run_once AS is_run_once, > vm_dynamic.volatile_run AS volatile_run, > vm_dynamic.vm_fqdn AS vm_fqdn, > vm_dynamic.cpu_name AS cpu_name, > vm_dynamic.emulated_machine AS emulated_machine, > vm_dynamic.current_cd AS current_cd, > vm_dynamic.reason AS reason, > vm_dynamic.exit_reason AS exit_reason, > vm_static.instance_type_id AS instance_type_id, > vm_static.image_type_id AS image_type_id, > cluster.architecture AS architecture, > vm_static.original_template_id AS original_template_id, > vm_static.original_template_name AS original_template_name, > vm_dynamic.last_stop_time AS last_stop_time, > vm_static.migration_downtime AS migration_downtime, > vm_static.template_version_number AS template_version_number, > vm_static.serial_number_policy AS serial_number_policy, > vm_static.custom_serial_number AS custom_serial_number, > vm_static.is_boot_menu_enabled AS is_boot_menu_enabled, > vm_dynamic.guest_cpu_count AS guest_cpu_count, > vm_snapshots.next_run_config_exists AS next_run_config_exists, > vm_snapshots.is_previewing_snapshot AS is_previewing_snapshot, > vm_static.numatune_mode AS numatune_mode, > vm_static.is_spice_file_transfer_enabled AS is_spice_file_transfer_enabled, > vm_static.is_spice_copy_paste_enabled AS is_spice_copy_paste_enabled, > vm_static.cpu_profile_id AS cpu_profile_id, > vm_static.is_auto_converge AS is_auto_converge, > vm_static.is_migrate_compressed AS is_migrate_compressed, > vm_static.custom_emulated_machine AS custom_emulated_machine, > vm_static.bios_type AS bios_type, > vm_static.custom_cpu_name AS custom_cpu_name, > vm_dynamic.spice_port AS spice_port, > vm_dynamic.spice_tls_port AS spice_tls_port, > vm_dynamic.spice_ip AS spice_ip, > vm_dynamic.vnc_port AS vnc_port, > vm_dynamic.vnc_ip AS vnc_ip, > vm_dynamic.ovirt_guest_agent_status AS ovirt_guest_agent_status, > vm_dynamic.qemu_guest_agent_status AS qemu_guest_agent_status, > vm_statistics.guest_mem_buffered AS guest_mem_buffered, > vm_statistics.guest_mem_cached AS guest_mem_cached, > vm_static.small_icon_id AS small_icon_id, > vm_static.large_icon_id AS large_icon_id, > vm_static.migration_policy_id as migration_policy_id, > vm_static.provider_id AS provider_id, > vm_static.console_disconnect_action AS console_disconnect_action, > vm_static.resume_behavior AS resume_behavior, > vm_dynamic.guest_timezone_offset AS guest_timezone_offset, > vm_dynamic.guest_timezone_name AS guest_timezone_name, > vm_dynamic.guestos_arch AS guestos_arch, > vm_dynamic.guestos_codename AS guestos_codename, > vm_dynamic.guestos_distribution AS guestos_distribution, > vm_dynamic.guestos_kernel_version AS guestos_kernel_version, > vm_dynamic.guestos_type AS guestos_type, > vm_dynamic.guestos_version AS guestos_version, > vm_static.custom_compatibility_version as custom_compatibility_version, > vm_dynamic.guest_containers AS guest_containers, > image_details.has_illegal_images, > vm_static.multi_queues_enabled AS multi_queues_enabled >FROM vm_static >INNER JOIN vm_dynamic > ON vm_static.vm_guid = vm_dynamic.vm_guid >INNER JOIN vm_static AS vm_templates > ON vm_static.vmt_guid = vm_templates.vm_guid >INNER JOIN vm_statistics > ON vm_static.vm_guid = vm_statistics.vm_guid >INNER JOIN cluster > ON vm_static.cluster_id = cluster.cluster_id >LEFT JOIN storage_pool > ON vm_static.cluster_id = cluster.cluster_id > AND cluster.storage_pool_id = storage_pool.id >LEFT JOIN quota > ON vm_static.quota_id = quota.id >LEFT JOIN vds_static > ON vm_dynamic.run_on_vds = vds_static.vds_id >LEFT JOIN vm_pool_map_view > ON vm_static.vm_guid = vm_pool_map_view.vm_guid >LEFT JOIN ( > SELECT vm_id, > COUNT(CASE snapshot_type > WHEN 'NEXT_RUN' > THEN 1 > END) > 0 AS next_run_config_exists, > COUNT(CASE snapshot_type > WHEN 'PREVIEW' > THEN 1 > END) > 0 AS is_previewing_snapshot > FROM snapshots > GROUP BY vm_id > ) vm_snapshots > ON vm_static.vm_guid = vm_snapshots.vm_id >LEFT JOIN ( > SELECT vm_id, COUNT(CASE imagestatus WHEN 4 THEN 1 END) > 0 AS has_illegal_images > FROM disk_vm_element > JOIN images > ON images.image_group_id = disk_vm_element.disk_id > GROUP BY vm_id > HAVING BOOL_OR(images.active) = TRUE > ) image_details ON image_details.vm_id = vm_static.vm_guid >WHERE vm_static.entity_type = 'VM'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vms_monitoring_view AS >SELECT vm_dynamic.*, > vm_static.vm_name, > vm_static.origin, > vm_static.auto_startup, > vm_static.mem_size_mb, > vm_static.min_allocated_mem, > vm_static.num_of_sockets, > vm_static.cpu_per_socket, > vm_static.threads_per_cpu, > vm_static.fn_get_num_of_vcpus AS num_of_cpus >FROM vm_dynamic >INNER JOIN vm_static > ON vm_static.vm_guid = vm_dynamic.vm_guid; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vms_with_tags AS >SELECT DISTINCT vms.vm_name, > vms.lease_sd_id, > vms.lease_info, > vms.mem_size_mb, > vms.max_memory_size_mb, > vms.num_of_io_threads, > vms.nice_level, > vms.cpu_shares, > vms.vmt_guid, > vms.os, > vms.description, > vms.free_text_comment, > vms.cluster_id, > vms.creation_date, > vms.auto_startup, > vms.is_stateless, > vms.is_smartcard_enabled, > vms.is_delete_protected, > vms.sso_method, > fn_get_dedicated_hosts_ids_by_vm_id(vms.vm_guid) AS dedicated_vm_for_vds, > vms.default_boot_sequence, > vms.vm_type, > vms.cluster_name, > vms.storage_pool_id, > vms.storage_pool_name, > vms.vmt_name, > vms.status, > vms.vm_ip, > vms.vm_ip_inet_array, > vms.vm_host, > vms.last_start_time, > vms.boot_time, > vms.downtime, > vms.last_stop_time, > vms.guest_cur_user_name, > vms.console_cur_user_name, > vms.runtime_name, > vms.console_user_id, > vms.guest_os, > vms.run_on_vds, > vms.migrating_to_vds, > vms.app_list, > vms.vm_pool_name, > vms.vm_pool_id, > vms.vm_guid, > vms.num_of_monitors, > vms.single_qxl_pci, > vms.allow_console_reconnect, > vms.is_initialized, > vms.num_of_sockets, > vms.cpu_per_socket, > vms.threads_per_cpu, > vms.usb_policy, > vms.acpi_enable, > vms.session, > vms.num_of_cpus AS num_of_cpus, > vms.boot_sequence, > vms.utc_diff, > vms.client_ip, > vms.guest_requested_memory, > vms.time_zone, > vms.cpu_user, > vms.cpu_sys, > vms.elapsed_time, > vms.usage_network_percent, > vms.disks_usage, > vms.usage_mem_percent, > vms.usage_cpu_percent, > vms.run_on_vds_name, > vms.cluster_cpu_name, > tags_vm_map_view.tag_name, > tags_vm_map_view.tag_id, > vms.default_display_type, > vms.priority, > vms.cluster_compatibility_version, > vms.initrd_url, > vms.kernel_url, > vms.kernel_params, > vms.pause_status, > vms.exit_status, > vms.exit_message, > vms.min_allocated_mem, > image_storage_domain_map.storage_domain_id AS storage_id, > vms.quota_id AS quota_id, > vms.quota_name AS quota_name, > vms.tunnel_migration AS tunnel_migration, > vms.vnc_keyboard_layout AS vnc_keyboard_layout, > vms.is_run_and_pause AS is_run_and_pause, > vms.created_by_user_id AS created_by_user_id, > vms.vm_fqdn, > vms.cpu_name AS cpu_name, > vms.emulated_machine AS emulated_machine, > vms.custom_emulated_machine AS custom_emulated_machine, > vms.bios_type AS bios_type, > vms.custom_cpu_name AS custom_cpu_name, > vms.vm_pool_spice_proxy AS vm_pool_spice_proxy, > vms.cluster_spice_proxy AS cluster_spice_proxy, > vms.instance_type_id AS instance_type_id, > vms.image_type_id AS image_type_id, > vms.architecture AS architecture, > vms.original_template_id AS original_template_id, > vms.original_template_name AS original_template_name, > vms.migration_downtime AS migration_downtime, > vms.template_version_number AS template_version_number, > vms.current_cd AS current_cd, > vms.reason AS reason, > vms.serial_number_policy AS serial_number_policy, > vms.custom_serial_number AS custom_serial_number, > vms.exit_reason AS exit_reason, > vms.is_boot_menu_enabled AS is_boot_menu_enabled, > vms.guest_cpu_count AS guest_cpu_count, > vms.next_run_config_exists, > vms.is_previewing_snapshot, > vms.numatune_mode, > vms.is_spice_file_transfer_enabled, > vms.is_spice_copy_paste_enabled, > vms.cpu_profile_id, > vms.is_auto_converge, > vms.is_migrate_compressed, > vms.spice_port, > vms.spice_tls_port, > vms.spice_ip, > vms.vnc_port, > vms.vnc_ip, > vms.ovirt_guest_agent_status, > vms.qemu_guest_agent_status, > vms.guest_mem_buffered AS guest_mem_buffered, > vms.guest_mem_cached AS guest_mem_cached, > vms.small_icon_id AS small_icon_id, > vms.large_icon_id AS large_icon_id, > vms.migration_policy_id as migration_policy_id, > vms.console_disconnect_action, > vms.resume_behavior AS resume_behavior, > vms.guest_timezone_offset AS guest_timezone_offset, > vms.guest_timezone_name AS guest_timezone_name, > vms.guestos_arch AS guestos_arch, > vms.guestos_codename AS guestos_codename, > vms.guestos_distribution AS guestos_distribution, > vms.guestos_kernel_version AS guestos_kernel_version, > vms.guestos_type AS guestos_type, > vms.guestos_version AS guestos_version, > vms.custom_compatibility_version as custom_compatibility_version, > vms.guest_containers as guest_containers, > vms.has_illegal_images, > vms.multi_queues_enabled >FROM vms >LEFT JOIN tags_vm_map_view > ON vms.vm_guid = tags_vm_map_view.vm_id >LEFT JOIN vm_device > ON vm_device.vm_id = vms.vm_guid >LEFT JOIN images > ON images.image_group_id = vm_device.device_id >LEFT JOIN image_storage_domain_map > ON image_storage_domain_map.image_id = images.image_guid >WHERE (vm_device.device='disk' AND > (images.active IS NULL OR images.active = TRUE)) OR > vms.vm_guid NOT IN (SELECT DISTINCT vm_id FROM vm_device WHERE device='disk'); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW server_vms AS >SELECT * >FROM vms >WHERE vm_type = '1'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vms_with_plug_info AS >SELECT * >FROM vms >INNER JOIN vm_device vd > ON vd.vm_id = vms.vm_guid; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW desktop_vms AS >SELECT * >FROM vms >WHERE vm_type = '0'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vds AS >SELECT cluster.cluster_id AS cluster_id, > cluster.name AS cluster_name, > cluster.description AS cluster_description, > cluster.architecture AS architecture, > cluster.enable_balloon AS enable_balloon, > vds_static.vds_id AS vds_id, > vds_static.vds_name AS vds_name, > vds_static.vds_unique_id AS vds_unique_id, > vds_static.host_name AS host_name, > vds_static.free_text_comment AS free_text_comment, > vds_static.port AS port, > vds_static.server_SSL_enabled AS server_SSL_enabled, > vds_static.vds_type AS vds_type, > vds_static.pm_enabled AS pm_enabled, > vds_static.pm_proxy_preferences AS pm_proxy_preferences, > vds_static.pm_detect_kdump AS pm_detect_kdump, > vds_static.vds_spm_priority AS vds_spm_priority, > vds_dynamic.hooks AS hooks, > vds_dynamic.status AS status, > vds_dynamic.external_status AS external_status, > vds_dynamic.cpu_cores AS cpu_cores, > vds_dynamic.cpu_threads AS cpu_threads, > vds_dynamic.cpu_model AS cpu_model, > vds_dynamic.cpu_speed_mh AS cpu_speed_mh, > vds_dynamic.if_total_speed AS if_total_speed, > vds_dynamic.kvm_enabled AS kvm_enabled, > vds_dynamic.physical_mem_mb AS physical_mem_mb, > vds_dynamic.pending_vcpus_count AS pending_vcpus_count, > vds_dynamic.pending_vmem_size AS pending_vmem_size, > vds_dynamic.mem_commited AS mem_commited, > vds_dynamic.vm_active AS vm_active, > vds_dynamic.vm_count AS vm_count, > vds_dynamic.vm_migrating AS vm_migrating, > vds_dynamic.incoming_migrations AS incoming_migrations, > vds_dynamic.outgoing_migrations AS outgoing_migrations, > vds_dynamic.kernel_args AS kernel_args, > vds_dynamic.pretty_name AS pretty_name, > vds_dynamic.hosted_engine_configured AS hosted_engine_configured, > vds_dynamic.vms_cores_count AS vms_cores_count, > vds_statistics.cpu_over_commit_time_stamp AS cpu_over_commit_time_stamp, > cluster.max_vds_memory_over_commit AS max_vds_memory_over_commit, > vds_dynamic.net_config_dirty AS net_config_dirty, > cluster.count_threads_as_cores AS count_threads_as_cores, > storage_pool.id AS storage_pool_id, > storage_pool.name AS storage_pool_name, > vds_dynamic.reserved_mem AS reserved_mem, > vds_dynamic.guest_overhead AS guest_overhead, > vds_dynamic.rpm_version AS rpm_version, > vds_dynamic.software_version AS software_version, > vds_dynamic.version_name AS version_name, > vds_dynamic.build_name AS build_name, > vds_dynamic.previous_status AS previous_status, > vds_statistics.cpu_idle AS cpu_idle, > vds_statistics.cpu_load AS cpu_load, > vds_statistics.cpu_sys AS cpu_sys, > vds_statistics.cpu_user AS cpu_user, > vds_statistics.usage_mem_percent AS usage_mem_percent, > vds_statistics.usage_cpu_percent AS usage_cpu_percent, > vds_statistics.usage_network_percent AS usage_network_percent, > vds_statistics.mem_available AS mem_available, > vds_statistics.mem_free AS mem_free, > vds_statistics.mem_shared AS mem_shared, > vds_statistics.swap_free AS swap_free, > vds_statistics.swap_total AS swap_total, > vds_statistics.ksm_cpu_percent AS ksm_cpu_percent, > vds_statistics.ksm_pages AS ksm_pages, > vds_statistics.ksm_state AS ksm_state, > vds_dynamic.cpu_flags AS cpu_flags, > cluster.cpu_name AS cluster_cpu_name, > vds_dynamic.cpu_sockets AS cpu_sockets, > vds_spm_id_map.vds_spm_id AS vds_spm_id, > vds_static.otp_validity AS otp_validity, > vds_static.openstack_network_provider_id AS openstack_network_provider_id, > CASE > WHEN storage_pool.spm_vds_id = vds_static.vds_id > THEN CASE > WHEN storage_pool.status = 5 > THEN 1 > ELSE 2 > END > ELSE 0 > END AS spm_status, > vds_dynamic.supported_cluster_levels AS supported_cluster_levels, > vds_dynamic.supported_engines AS supported_engines, > cluster.compatibility_version AS cluster_compatibility_version, > cluster.virt_service AS cluster_virt_service, > cluster.gluster_service AS cluster_gluster_service, > vds_dynamic.host_os AS host_os, > vds_dynamic.kvm_version AS kvm_version, > vds_dynamic.libvirt_version AS libvirt_version, > vds_dynamic.spice_version AS spice_version, > vds_dynamic.gluster_version AS gluster_version, > vds_dynamic.librbd1_version AS librbd1_version, > vds_dynamic.glusterfs_cli_version AS glusterfs_cli_version, > vds_dynamic.openvswitch_version AS openvswitch_version, > vds_dynamic.kernel_version AS kernel_version, > vds_dynamic.iscsi_initiator_name AS iscsi_initiator_name, > vds_dynamic.transparent_hugepages_state AS transparent_hugepages_state, > vds_statistics.anonymous_hugepages AS anonymous_hugepages, > vds_statistics.hugepages AS hugepages, > vds_dynamic.non_operational_reason AS non_operational_reason, > vds_static.recoverable AS recoverable, > vds_static.sshKeyFingerprint AS sshKeyFingerprint, > vds_static.host_provider_id AS host_provider_id, > vds_dynamic.hw_manufacturer AS hw_manufacturer, > vds_dynamic.hw_product_name AS hw_product_name, > vds_dynamic.hw_version AS hw_version, > vds_dynamic.hw_serial_number AS hw_serial_number, > vds_dynamic.hw_uuid AS hw_uuid, > vds_dynamic.hw_family AS hw_family, > vds_static.console_address AS console_address, > vds_dynamic.hbas AS hbas, > vds_dynamic.supported_emulated_machines AS supported_emulated_machines, > vds_dynamic.supported_rng_sources AS supported_rng_sources, > vds_static.ssh_port AS ssh_port, > vds_static.ssh_username AS ssh_username, > vds_statistics.ha_score AS ha_score, > vds_statistics.ha_configured AS ha_configured, > vds_statistics.ha_active AS ha_active, > vds_statistics.ha_global_maintenance AS ha_global_maintenance, > vds_statistics.ha_local_maintenance AS ha_local_maintenance, > vds_static.disable_auto_pm AS disable_auto_pm, > vds_dynamic.controlled_by_pm_policy AS controlled_by_pm_policy, > vds_statistics.boot_time AS boot_time, > vds_dynamic.kdump_status AS kdump_status, > vds_dynamic.selinux_enforce_mode AS selinux_enforce_mode, > vds_dynamic.auto_numa_balancing AS auto_numa_balancing, > vds_dynamic.is_numa_supported AS is_numa_supported, > vds_dynamic.online_cpus AS online_cpus, > vds_dynamic.maintenance_reason AS maintenance_reason, > vds_dynamic.is_update_available AS is_update_available, > vds_dynamic.is_hostdev_enabled AS is_hostdev_enabled, > > vds_dynamic.vm_count > 0 > AND vds_statistics.ha_score IS NOT NULL > AND EXISTS ( > SELECT 1 > FROM vm_dynamic > LEFT JOIN vm_static > ON vm_dynamic.vm_guid = vm_static.vm_guid > WHERE vds_static.vds_id = vm_dynamic.run_on_vds > > AND vm_static.origin IN (5,6)) AS is_hosted_engine_host, > vds_static.kernel_cmdline AS kernel_cmdline, > vds_static.last_stored_kernel_cmdline AS last_stored_kernel_cmdline, > cluster.fencing_enabled AS fencing_enabled, > gluster_server.peer_status AS gluster_peer_status, > vds_dynamic.in_fence_flow AS in_fence_flow, > vds_static.reinstall_required AS reinstall_required, > vds_dynamic.kernel_features AS kernel_features, > vds_dynamic.vnc_encryption_enabled AS vnc_encryption_enabled, > vds_static.vgpu_placement AS vgpu_placement, > vds_dynamic.connector_info AS connector_info >FROM cluster >INNER JOIN vds_static > ON cluster.cluster_id = vds_static.cluster_id >INNER JOIN vds_dynamic > ON vds_static.vds_id = vds_dynamic.vds_id >INNER JOIN vds_statistics > ON vds_static.vds_id = vds_statistics.vds_id >LEFT JOIN storage_pool > ON cluster.storage_pool_id = storage_pool.id >LEFT JOIN vds_spm_id_map > ON vds_static.vds_id = vds_spm_id_map.vds_id >LEFT JOIN gluster_server > ON vds_static.vds_id = gluster_server.server_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vds_with_tags AS >SELECT cluster.cluster_id, > cluster.name AS cluster_name, > cluster.description AS cluster_description, > cluster.architecture AS architecture, > vds_static.vds_id, > vds_static.vds_name, > vds_static.vds_unique_id, > vds_static.host_name, > vds_static.free_text_comment, > vds_static.port, > vds_static.server_SSL_enabled, > vds_static.vds_type, > vds_dynamic.hw_product_name, > vds_dynamic.hw_version, > vds_dynamic.hw_serial_number, > vds_dynamic.hw_uuid, > vds_dynamic.hw_family, > vds_static.pm_enabled, > vds_static.pm_proxy_preferences AS pm_proxy_preferences, > vds_static.pm_detect_kdump AS pm_detect_kdump, > vds_dynamic.hooks, > vds_dynamic.status, > vds_dynamic.external_status, > vds_dynamic.cpu_cores, > vds_dynamic.cpu_threads, > vds_dynamic.kernel_args, > vds_dynamic.pretty_name, > vds_dynamic.hosted_engine_configured, > vds_dynamic.cpu_model, > vds_dynamic.cpu_speed_mh, > vds_dynamic.if_total_speed, > vds_dynamic.kvm_enabled, > vds_dynamic.physical_mem_mb, > vds_dynamic.pending_vcpus_count, > vds_dynamic.pending_vmem_size, > vds_dynamic.mem_commited, > vds_dynamic.vm_active, > vds_dynamic.vm_count, > vds_dynamic.vm_migrating, > vds_dynamic.incoming_migrations, > vds_dynamic.outgoing_migrations, > vds_dynamic.vms_cores_count, > vds_statistics.cpu_over_commit_time_stamp, > vds_dynamic.net_config_dirty, > cluster.max_vds_memory_over_commit, > cluster.count_threads_as_cores, > storage_pool.id AS storage_pool_id, > storage_pool.name AS storage_pool_name, > tags_vds_map_view.tag_name, > tags_vds_map_view.tag_id, > vds_dynamic.reserved_mem, > vds_dynamic.guest_overhead, > vds_dynamic.rpm_version, > vds_dynamic.software_version, > vds_dynamic.version_name, > vds_dynamic.build_name, > vds_dynamic.previous_status, > vds_statistics.cpu_idle, > vds_statistics.cpu_load, > vds_statistics.cpu_sys, > vds_statistics.cpu_user, > vds_statistics.usage_mem_percent, > vds_statistics.usage_cpu_percent, > vds_statistics.usage_network_percent, > vds_statistics.mem_available, > vds_statistics.mem_free, > vds_statistics.mem_shared, > vds_statistics.swap_free, > vds_statistics.swap_total, > vds_statistics.ksm_cpu_percent, > vds_statistics.ksm_pages, > vds_statistics.ksm_state, > vds_dynamic.cpu_flags, > cluster.cpu_name AS cluster_cpu_name, > vds_dynamic.cpu_sockets, > vds_spm_id_map.vds_spm_id, > vds_static.otp_validity AS otp_validity, > vds_static.console_address AS console_address, > CASE > WHEN storage_pool.spm_vds_id = vds_static.vds_id > THEN CASE > WHEN storage_pool.status = 5 > THEN 1 > ELSE 2 > END > ELSE 0 > END AS spm_status, > vds_dynamic.supported_cluster_levels, > vds_dynamic.supported_engines, > cluster.compatibility_version AS cluster_compatibility_version, > vds_dynamic.host_os, > vds_dynamic.kvm_version, > vds_dynamic.libvirt_version, > vds_dynamic.spice_version, > vds_dynamic.gluster_version, > vds_dynamic.librbd1_version, > vds_dynamic.glusterfs_cli_version, > vds_dynamic.openvswitch_version, > vds_dynamic.kernel_version, > vds_dynamic.iscsi_initiator_name, > vds_dynamic.transparent_hugepages_state, > vds_statistics.anonymous_hugepages, > vds_statistics.hugepages AS hugepages, > vds_dynamic.non_operational_reason, > storage_pool_iso_map.storage_id, > vds_static.ssh_port, > vds_static.ssh_username, > vds_statistics.ha_score, > vds_statistics.ha_configured, > vds_statistics.ha_active, > vds_statistics.ha_global_maintenance, > vds_statistics.ha_local_maintenance, > vds_static.disable_auto_pm AS disable_auto_pm, > vds_dynamic.controlled_by_pm_policy AS controlled_by_pm_policy, > vds_statistics.boot_time, > vds_dynamic.kdump_status AS kdump_status, > vds_dynamic.selinux_enforce_mode AS selinux_enforce_mode, > vds_dynamic.auto_numa_balancing AS auto_numa_balancing, > vds_dynamic.is_numa_supported AS is_numa_supported, > vds_dynamic.supported_rng_sources AS supported_rng_sources, > vds_dynamic.online_cpus AS online_cpus, > vds_dynamic.maintenance_reason AS maintenance_reason, > vds_dynamic.is_update_available AS is_update_available, > vds_dynamic.is_hostdev_enabled AS is_hostdev_enabled, > cluster.fencing_enabled AS fencing_enabled, > vds_dynamic.in_fence_flow AS in_fence_flow, > vds_dynamic.vnc_encryption_enabled AS vnc_encryption_enabled, > vds_static.vgpu_placement AS vgpu_placement, > vds_dynamic.connector_info AS connector_info >FROM cluster >INNER JOIN vds_static > ON cluster.cluster_id = vds_static.cluster_id >INNER JOIN vds_dynamic > ON vds_static.vds_id = vds_dynamic.vds_id >INNER JOIN vds_statistics > ON vds_static.vds_id = vds_statistics.vds_id >LEFT JOIN storage_pool > ON cluster.storage_pool_id = storage_pool.id >LEFT JOIN tags_vds_map_view > ON vds_static.vds_id = tags_vds_map_view.vds_id >LEFT JOIN vds_spm_id_map > ON vds_static.vds_id = vds_spm_id_map.vds_id >LEFT JOIN storage_pool_iso_map > ON storage_pool_iso_map.storage_pool_id = storage_pool.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW users_and_groups_to_vm_pool_map_view AS >SELECT p.vm_pool_id AS vm_pool_id, > p.vm_pool_name AS vm_pool_name, > per.ad_element_id AS user_id >FROM vm_pools AS p >INNER JOIN permissions AS per > ON per.object_id = p.vm_pool_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vdc_users AS >SELECT 'user' AS user_group, > users_1.name AS name, > users_1.user_id AS user_id, > users_1.surname AS surname, > users_1.domain AS DOMAIN, > users_1.username AS username, > users_1.department AS department, > users_1.email AS email, > users_1.note AS note, > 0 AS vm_admin, > users_1.last_admin_check_status AS last_admin_check_status, > users_1.external_id AS external_id, > users_1.namespace AS namespace >FROM users AS users_1 >UNION >SELECT 'group' AS user_group, > ad_groups.name AS name, > ad_groups.id AS id, > '' AS surname, > ad_groups.domain AS DOMAIN, > '' AS username, > '' AS department, > '' AS email, > '' AS note, > 1 AS vm_admin, > NULL AS last_admin_check_status, > ad_groups.external_id AS external_id, > ad_groups.namespace AS namespace >FROM ad_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vdc_users_with_tags AS >SELECT users_1.user_group AS user_group, > users_1.name AS name, > permissions.object_id AS vm_guid, > users_1.user_id AS user_id, > users_1.surname AS surname, > users_1.domain AS DOMAIN, > users_1.username AS username, > users_1.department AS department, > roles1.name AS mla_role, > users_1.email AS email, > users_1.note AS note, > users_1.vm_admin AS vm_admin, > tags_user_map_view_1.tag_name AS tag_name, > tags_user_map_view_1.tag_id AS tag_id, > users_1.last_admin_check_status AS last_admin_check_status, > pools.vm_pool_name AS vm_pool_name >FROM vdc_users AS users_1 >LEFT JOIN users_and_groups_to_vm_pool_map_view AS pools > ON users_1.user_id = pools.user_id >LEFT JOIN permissions > ON users_1.user_id = permissions.ad_element_id >LEFT JOIN tags > ON tags.type = 1 >LEFT JOIN tags_user_map_view AS tags_user_map_view_1 > ON users_1.user_id = tags_user_map_view_1.user_id >LEFT JOIN roles AS roles1 > ON roles1.id = permissions.role_id >WHERE (users_1.user_group = 'user') >UNION >SELECT users_2.user_group AS user_group, > users_2.name AS name, > permissions_1.object_id AS vm_guid, > users_2.user_id AS user_id, > users_2.surname AS surname, > users_2.domain AS DOMAIN, > users_2.username AS username, > users_2.department AS department, > roles2.name AS mla_role, > users_2.email AS email, > users_2.note AS note, > users_2.vm_admin AS vm_admin, > tags_user_group_map_view.tag_name AS tag_name, > tags_user_group_map_view.tag_id AS tag_id, > users_2.last_admin_check_status AS last_admin_check_status, > pools1.vm_pool_name AS vm_pool_name >FROM vdc_users AS users_2 >LEFT JOIN users_and_groups_to_vm_pool_map_view AS pools1 > ON users_2.user_id = pools1.user_id >LEFT JOIN permissions AS permissions_1 > ON users_2.user_id = permissions_1.ad_element_id >LEFT JOIN tags AS tags_1 > ON tags_1.type = 1 >LEFT JOIN tags_user_group_map_view > ON users_2.user_id = tags_user_group_map_view.group_id >LEFT JOIN roles AS roles2 > ON roles2.id = permissions_1.role_id >WHERE (users_2.user_group = 'group'); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_pools_view AS >SELECT vm_pools.vm_pool_id, > vm_pools.vm_pool_name, > vm_pools.vm_pool_description, > vm_pools.vm_pool_comment, > vm_pools.vm_pool_type, > vm_pools.stateful, > vm_pools.parameters, > vm_pools.prestarted_vms, > vm_pools.cluster_id, > cluster.name AS cluster_name, > cluster.architecture AS architecture, > storage_pool.name AS storage_pool_name, > storage_pool.id AS storage_pool_id, > vm_pools.max_assigned_vms_per_user AS max_assigned_vms_per_user, > vm_pools.spice_proxy AS spice_proxy, > vm_pools.is_being_destroyed AS is_being_destroyed, > vm_pools.is_auto_storage_select AS is_auto_storage_select >FROM vm_pools >INNER JOIN cluster > ON vm_pools.cluster_id = cluster.cluster_id >LEFT JOIN storage_pool > ON storage_pool.id = cluster.storage_pool_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_pools_full_view AS >SELECT vmp.vm_pool_id, > vmp.vm_pool_name, > vmp.vm_pool_description, > vmp.vm_pool_comment, > vmp.vm_pool_type, > vmp.stateful, > vmp.parameters, > vmp.prestarted_vms, > vmp.cluster_id, > vmp.cluster_name, > vmp.architecture, > vmp.max_assigned_vms_per_user, > vmp.spice_proxy AS spice_proxy, > ( > SELECT COUNT(vm_pool_map.vm_pool_id) AS expr1 > FROM vm_pools_view v1 > LEFT JOIN vm_pool_map > ON v1.vm_pool_id = vm_pool_map.vm_pool_id > AND v1.vm_pool_id = vmp.vm_pool_id > ) AS assigned_vm_count, > ( > SELECT COUNT(v2.vm_pool_id) AS expr1 > FROM vm_pools v2 > LEFT JOIN vm_pool_map vm_pool_map_1 > ON v2.vm_pool_id = vm_pool_map_1.vm_pool_id > AND v2.vm_pool_id = vmp.vm_pool_id > LEFT JOIN vm_dynamic > ON vm_pool_map_1.vm_guid = vm_dynamic.vm_guid > WHERE vm_dynamic.status <> ALL ( > ARRAY [ 0, > 15 ] > ) > GROUP BY v2.vm_pool_id > ) AS vm_running_count, > vmp.storage_pool_name, > vmp.storage_pool_id, > vmp.is_being_destroyed, > vmp.is_auto_storage_select >FROM vm_pools_view vmp; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW permissions_view AS >SELECT permissions.id AS id, > permissions.role_id AS role_id, > permissions.ad_element_id AS ad_element_id, > permissions.object_id AS object_id, > permissions.object_type_id AS object_type_id, > roles.name AS role_name, > roles.role_type AS role_type, > roles.allows_viewing_children AS allows_viewing_children, > roles.app_mode AS app_mode, > fn_get_entity_name(permissions.object_id, permissions.object_type_id) AS object_name, > (fn_authz_entry_info(permissions.ad_element_id)).name AS owner_name, > (fn_authz_entry_info(permissions.ad_element_id)).namespace AS namespace, > (fn_authz_entry_info(permissions.ad_element_id)).authz AS authz, > permissions.creation_date AS creation_date >FROM permissions >INNER JOIN roles > ON permissions.role_id = roles.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW internal_permissions_view AS >SELECT permissions.id AS id, > permissions.role_id AS role_id, > permissions.ad_element_id AS ad_element_id, > permissions.object_id AS object_id, > permissions.object_type_id AS object_type_id, > roles.name AS role_name, > roles.role_type AS role_type, > roles.allows_viewing_children AS allows_viewing_children >FROM permissions >INNER JOIN roles > ON permissions.role_id = roles.id; >************************** > >CREATE VIEW >********* QUERY ********** >/************************************************* > vds/vm/ interface view >*************************************************/ >CREATE OR REPLACE VIEW vds_interface_view AS >SELECT vds_interface_statistics.rx_rate, > vds_interface_statistics.tx_rate, > vds_interface_statistics.rx_drop, > vds_interface_statistics.tx_drop, > vds_interface_statistics.rx_total, > vds_interface_statistics.tx_total, > vds_interface_statistics.rx_offset, > vds_interface_statistics.tx_offset, > vds_interface_statistics.iface_status, > vds_interface_statistics.sample_time, > vds_interface.type, > vds_interface.gateway, > vds_interface.ipv4_default_route, > vds_interface.ipv6_gateway, > vds_interface.subnet, > vds_interface.ipv6_prefix, > vds_interface.addr, > vds_interface.ipv6_address, > vds_interface.speed, > vds_interface.base_interface, > vds_interface.vlan_id, > vds_interface.bond_type, > vds_interface.bond_name, > vds_interface.is_bond, > vds_interface.bond_opts, > vds_interface.mac_addr, > vds_interface.network_name, > vds_interface.name, > vds_static.vds_id, > vds_static.vds_name, > vds_interface.id, > vds_interface.boot_protocol, > vds_interface.ipv6_boot_protocol, > vds_interface.mtu AS mtu, > vds_interface.bridged, > vds_interface.reported_switch_type, > 1 AS is_vds, > vds_interface.qos_overridden AS qos_overridden, > vds_interface.labels AS labels, > vds_static.cluster_id AS cluster_id, > vds_interface.ad_partner_mac, > vds_interface.ad_aggregator_id, > vds_interface.bond_active_slave >FROM vds_interface_statistics >INNER JOIN vds_interface > ON vds_interface_statistics.id = vds_interface.id >INNER JOIN vds_static > ON vds_interface.vds_id = vds_static.vds_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_interface_view AS >SELECT vm_interface_statistics.rx_rate, > vm_interface_statistics.tx_rate, > vm_interface_statistics.rx_drop, > vm_interface_statistics.tx_drop, > vm_interface_statistics.rx_total, > vm_interface_statistics.tx_total, > vm_interface_statistics.rx_offset, > vm_interface_statistics.tx_offset, > vm_interface_statistics.iface_status, > vm_interface_statistics.sample_time, > vm_interface.type, > vm_interface.speed, > vm_interface.mac_addr, > network.name AS network_name, > vm_interface.name, > vm_interface.vnic_profile_id, > vm_static.vm_guid, > vm_interface.vmt_guid, > vm_static.vm_name, > vm_interface.id, > 0 AS boot_protocol, > 0 AS is_vds, > vm_device.is_plugged, > vm_device.custom_properties, > vnic_profiles.port_mirroring AS port_mirroring, > vm_interface.linked, > vm_static.cluster_id AS cluster_id, > vm_static.entity_type AS vm_entity_type, > vnic_profiles.name AS vnic_profile_name, > qos.name AS qos_name >FROM vm_interface_statistics >INNER JOIN vm_interface > ON vm_interface_statistics.id = vm_interface.id >INNER JOIN vm_static > ON vm_interface.vm_guid = vm_static.vm_guid >INNER JOIN vm_device > ON vm_interface.vm_guid = vm_device.vm_id > AND vm_interface.id = vm_device.device_id >LEFT JOIN ( > ( > vnic_profiles INNER JOIN network > ON network.id = vnic_profiles.network_id > ) LEFT JOIN qos > ON vnic_profiles.network_qos_id = qos.id > ) > ON vnic_profiles.id = vm_interface.vnic_profile_id >UNION >SELECT vm_interface_statistics.rx_rate, > vm_interface_statistics.tx_rate, > vm_interface_statistics.rx_drop, > vm_interface_statistics.tx_drop, > vm_interface_statistics.rx_total, > vm_interface_statistics.tx_total, > vm_interface_statistics.rx_offset, > vm_interface_statistics.tx_offset, > vm_interface_statistics.iface_status, > vm_interface_statistics.sample_time, > vm_interface.type, > vm_interface.speed, > vm_interface.mac_addr, > network.name AS network_name, > vm_interface.name, > vm_interface.vnic_profile_id, > NULL::uuid AS vm_guid, > vm_interface.vmt_guid, > vm_templates.vm_name AS vm_name, > vm_interface.id, > 0 AS boot_protocol, > 0 AS is_vds, > vm_device.is_plugged AS is_plugged, > vm_device.custom_properties AS custom_properties, > vnic_profiles.port_mirroring AS port_mirroring, > vm_interface.linked, > vm_templates.cluster_id AS cluster_id, > vm_templates.entity_type AS vm_entity_type, > vnic_profiles.name AS vnic_profile_name, > qos.name AS qos_name >FROM vm_interface_statistics >RIGHT JOIN vm_interface > ON vm_interface_statistics.id = vm_interface.id >INNER JOIN vm_static AS vm_templates > ON vm_interface.vmt_guid = vm_templates.vm_guid >INNER JOIN vm_device > ON vm_interface.vmt_guid = vm_device.vm_id > AND vm_interface.id = vm_device.device_id >LEFT JOIN ( > ( > vnic_profiles INNER JOIN network > ON network.id = vnic_profiles.network_id > ) LEFT JOIN qos > ON vnic_profiles.network_qos_id = qos.id > ) > ON vnic_profiles.id = vm_interface.vnic_profile_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_interface_monitoring_view AS >SELECT vm_interface_statistics.rx_rate, > vm_interface_statistics.tx_rate, > vm_interface_statistics.rx_drop, > vm_interface_statistics.tx_drop, > vm_interface_statistics.rx_total, > vm_interface_statistics.tx_total, > vm_interface_statistics.rx_offset, > vm_interface_statistics.tx_offset, > vm_interface_statistics.iface_status, > vm_interface_statistics.sample_time, > vm_interface.mac_addr, > vm_interface.speed, > vm_interface.vm_guid, > vm_interface.id >FROM vm_interface_statistics >INNER JOIN vm_interface > ON vm_interface_statistics.id = vm_interface.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW storage_pool_with_storage_domain AS >SELECT storage_pool.id AS id, > storage_pool.name AS name, > storage_pool.description AS description, > storage_pool.free_text_comment AS free_text_comment, > storage_pool.status AS status, > storage_pool.is_local AS is_local, > storage_pool.master_domain_version AS master_domain_version, > storage_pool.spm_vds_id AS spm_vds_id, > storage_pool.compatibility_version AS compatibility_version, > storage_pool._create_date AS _create_date, > storage_pool._update_date AS _update_date, > storage_pool_iso_map.storage_id AS storage_id, > storage_pool_iso_map.storage_pool_id AS storage_pool_id, > storage_domain_static.storage_type AS storage_type, > storage_domain_static.storage_domain_type AS storage_domain_type, > storage_domain_static.storage_domain_format_type AS storage_domain_format_type, > storage_domain_static.storage_name AS storage_name, > storage_domain_static.storage AS storage, > storage_domain_static.last_time_used_as_master AS last_time_used_as_master >FROM storage_pool >LEFT JOIN storage_pool_iso_map > ON storage_pool.id = storage_pool_iso_map.storage_pool_id >LEFT JOIN storage_domain_static > ON storage_pool_iso_map.storage_id = storage_domain_static.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW cluster_storage_domain AS >SELECT cluster.cluster_id, > cluster.name, > cluster.description, > cluster.free_text_comment, > cluster.cpu_name, > cluster._create_date, > cluster._update_date, > cluster.storage_pool_id, > cluster.max_vds_memory_over_commit, > cluster.count_threads_as_cores, > cluster.compatibility_version, > cluster.transparent_hugepages, > cluster.migrate_on_error, > cluster.architecture, > storage_pool_iso_map.storage_id, > storage_pool.name AS storage_pool_name >FROM cluster >LEFT JOIN storage_pool_iso_map > ON cluster.storage_pool_id = storage_pool_iso_map.storage_pool_id >LEFT JOIN storage_pool > ON cluster.storage_pool_id = storage_pool.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW cluster_view AS >SELECT cluster.*, > storage_pool.name AS storage_pool_name, > cluster_policies.name AS cluster_policy_name >FROM cluster >LEFT JOIN storage_pool > ON cluster.storage_pool_id = storage_pool.id >LEFT JOIN cluster_policies > ON cluster.cluster_policy_id = cluster_policies.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW storage_domains_with_hosts_view AS >SELECT storage_domain_static.id, > storage_domain_static.storage, > storage_domain_static.storage_name, > storage_domain_static.storage_description AS storage_description, > storage_domain_static.storage_comment AS storage_comment, > storage_domain_dynamic.available_disk_size, > storage_domain_dynamic.confirmed_available_disk_size, > storage_domain_dynamic.vdo_savings, > storage_domain_dynamic.used_disk_size, > storage_domains_image_sizes.commited_disk_size, > storage_domains_image_sizes.actual_images_size, > storage_pool.name AS storage_pool_name, > storage_domain_static.storage_type, > storage_domain_static.storage_domain_type, > storage_domain_static.storage_domain_format_type, > storage_domain_static.last_time_used_as_master AS last_time_used_as_master, > storage_domain_static.wipe_after_delete AS wipe_after_delete, > storage_domain_static.discard_after_delete AS discard_after_delete, > storage_domain_static.first_metadata_device AS first_metadata_device, > storage_domain_static.vg_metadata_device AS vg_metadata_device, > storage_domain_static.backup AS backup, > storage_domain_static.block_size as block_size, > COALESCE(storage_domain_shared_status.status, 0) AS storage_domain_shared_status, > cluster.cluster_id, > vds_static.vds_id, > storage_pool_iso_map.storage_pool_id, > vds_static.recoverable >FROM storage_domain_static >INNER JOIN storage_domain_dynamic > ON storage_domain_static.id = storage_domain_dynamic.id >LEFT JOIN storage_pool_iso_map > ON storage_domain_static.id = storage_pool_iso_map.storage_id >LEFT JOIN storage_domain_shared_status > ON storage_domain_shared_status.storage_id = storage_domain_static.id >LEFT JOIN storage_domains_image_sizes > ON storage_domains_image_sizes.storage_domain_id = storage_domain_static.id >LEFT JOIN storage_pool > ON storage_pool_iso_map.storage_pool_id = storage_pool.id >LEFT JOIN cluster > ON storage_pool_iso_map.storage_pool_id = cluster.storage_pool_id >LEFT JOIN vds_static > ON cluster.cluster_id = vds_static.cluster_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_images_storage_domains_view AS >SELECT vm_images_view.storage_id, > vm_images_view.storage_pool_id, > vm_images_view.image_guid, > vm_images_view.creation_date, > vm_images_view.actual_size, > vm_images_view.read_rate, > vm_images_view.write_rate, > vm_images_view.size, > vm_images_view.it_guid, > vm_images_view.description, > vm_images_view.parentid, > vm_images_view.imagestatus, > vm_images_view.lastmodified, > vm_images_view.app_list, > vm_images_view.vm_snapshot_id, > vm_images_view.volume_type, > vm_images_view.image_group_id, > vm_images_view.active, > vm_images_view.volume_format, > vm_images_view.qcow_compat, > vm_images_view.wipe_after_delete, > vm_images_view.propagate_errors, > vm_images_view.disk_content_type, > vm_images_view.backup, > vm_images_view.entity_type, > vm_images_view.number_of_vms, > vm_images_view.vm_names, > vm_images_view.template_version_names, > vm_images_view.quota_id, > vm_images_view.quota_name, > vm_images_view.disk_profile_id, > vm_images_view.disk_profile_name, > vm_images_view.disk_alias, > vm_images_view.disk_description, > vm_images_view.sgio, > storage_domains_with_hosts_view.id, > storage_domains_with_hosts_view.storage, > storage_domains_with_hosts_view.storage_name, > storage_domains_with_hosts_view.available_disk_size, > storage_domains_with_hosts_view.used_disk_size, > storage_domains_with_hosts_view.commited_disk_size, > storage_domains_with_hosts_view.actual_images_size, > storage_domains_with_hosts_view.storage_type, > storage_domains_with_hosts_view.storage_domain_type, > storage_domains_with_hosts_view.storage_domain_format_type, > storage_domains_with_hosts_view.storage_domain_shared_status, > storage_domains_with_hosts_view.cluster_id, > storage_domains_with_hosts_view.vds_id, > storage_domains_with_hosts_view.recoverable, > storage_domains_with_hosts_view.storage_pool_name, > storage_domains_with_hosts_view.storage_name AS name >FROM vm_images_view >INNER JOIN images_storage_domain_view > ON vm_images_view.image_guid = images_storage_domain_view.image_guid >INNER JOIN storage_domains_with_hosts_view > ON storage_domains_with_hosts_view.id = images_storage_domain_view.storage_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW quota_view AS >SELECT q.id AS quota_id, > q.storage_pool_id AS storage_pool_id, > storage_pool.name AS storage_pool_name, > q.quota_name AS quota_name, > q.description AS description, > q.threshold_cluster_percentage AS threshold_cluster_percentage, > q.threshold_storage_percentage AS threshold_storage_percentage, > q.grace_cluster_percentage AS grace_cluster_percentage, > q.grace_storage_percentage AS grace_storage_percentage, > storage_pool.quota_enforcement_type AS quota_enforcement_type, > q.is_default AS is_default >FROM storage_pool, > quota q >WHERE storage_pool.id = q.storage_pool_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW quota_global_view AS >SELECT q_limit.quota_id AS quota_id, > q.storage_pool_id AS storage_pool_id, > storage_pool.name AS storage_pool_name, > q.quota_name AS quota_name, > q.description AS description, > q.threshold_cluster_percentage AS threshold_cluster_percentage, > q.threshold_storage_percentage AS threshold_storage_percentage, > q.grace_cluster_percentage AS grace_cluster_percentage, > q.grace_storage_percentage AS grace_storage_percentage, > virtual_cpu, > (CalculateClusterUsage(quota_id, NULL)).virtual_cpu_usage, > mem_size_mb, > (CalculateClusterUsage(quota_id, NULL)).mem_size_mb_usage, > storage_size_gb, > CalculateStorageUsage(quota_id, NULL) AS storage_size_gb_usage, > storage_pool.quota_enforcement_type AS quota_enforcement_type, > q.is_default AS is_default >FROM storage_pool, > quota q >LEFT JOIN quota_limitation q_limit > ON q_limit.quota_id = q.id >WHERE storage_pool.id = q.storage_pool_id > AND q_limit.cluster_id IS NULL > AND q_limit.storage_id IS NULL; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW quota_limitations_view AS >SELECT q_limit.quota_id AS quota_id, > q.storage_pool_id AS storage_pool_id, > storage_pool.name AS storage_pool_name, > q.quota_name AS quota_name, > q.description AS description, > q.threshold_cluster_percentage AS threshold_cluster_percentage, > q.threshold_storage_percentage AS threshold_storage_percentage, > q.grace_cluster_percentage AS grace_cluster_percentage, > q.grace_storage_percentage AS grace_storage_percentage, > virtual_cpu, > mem_size_mb, > storage_size_gb, > storage_pool.quota_enforcement_type AS quota_enforcement_type, > q.is_default AS is_default, > cluster_id, > storage_id, > (COALESCE(cluster_id, storage_id) IS NULL) AS is_global, > (COALESCE(virtual_cpu, mem_size_mb, storage_size_gb) IS NULL) AS is_empty >FROM quota q >INNER JOIN storage_pool > ON storage_pool.id = q.storage_pool_id >LEFT JOIN quota_limitation q_limit > ON q_limit.quota_id = q.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW quota_storage_view AS >SELECT q_limit.id AS quota_storage_id, > q_limit.quota_id AS quota_id, > storage_id, > storage_domain_static.storage_name AS storage_name, > storage_size_gb, > CalculateStorageUsage(quota_id, storage_id) AS storage_size_gb_usage >FROM quota_limitation q_limit, > quota q, > storage_domain_static >WHERE q_limit.quota_id = q.id > AND q_limit.cluster_id IS NULL > AND q_limit.storage_id IS NOT NULL > AND storage_domain_static.id = q_limit.storage_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW quota_cluster_view AS >SELECT q_limit.id AS quota_cluster_id, > q_limit.quota_id AS quota_id, > q_limit.cluster_id, > cluster.name AS cluster_name, > virtual_cpu, > (CalculateClusterUsage(quota_id, q_limit.cluster_id)).virtual_cpu_usage AS virtual_cpu_usage, > mem_size_mb, > (CalculateClusterUsage(quota_id, q_limit.cluster_id)).mem_size_mb_usage AS mem_size_mb_usage >FROM quota_limitation q_limit, > quota q, > cluster >WHERE q_limit.quota_id = q.id > AND q_limit.cluster_id IS NOT NULL > AND q_limit.storage_id IS NULL > AND cluster.cluster_id = q_limit.cluster_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW network_cluster_view AS >SELECT network_cluster.cluster_id AS cluster_id, > network_cluster.network_id AS network_id, > network.name AS network_name, > network_cluster.status AS status, > network_cluster.required AS required, > network_cluster.is_display AS is_display, > network_cluster.migration AS migration, > cluster.name AS cluster_name >FROM network_cluster >INNER JOIN network > ON network_cluster.network_id = network.id >INNER JOIN cluster > ON network_cluster.cluster_id = cluster.cluster_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW network_vds_view AS >SELECT network.id AS network_id, > network.name AS network_name, > vds_static.vds_name AS vds_name >FROM vds_interface >INNER JOIN vds_static > ON vds_interface.vds_id = vds_static.vds_id >INNER JOIN network > ON vds_interface.network_name = network.name >INNER JOIN network_cluster > ON network_cluster.network_id = network.id >WHERE network_cluster.cluster_id = vds_static.cluster_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW network_view AS >SELECT network.id AS id, > network.name AS name, > network.vdsm_name AS vdsm_name, > network.description AS description, > network.free_text_comment AS free_text_comment, > network.type AS type, > network.addr AS addr, > network.subnet AS subnet, > network.gateway AS gateway, > network.vlan_id AS vlan_id, > network.stp AS stp, > network.mtu AS mtu, > network.vm_network AS vm_network, > network.storage_pool_id AS storage_pool_id, > network.provider_network_provider_id AS provider_network_provider_id, > network.provider_network_external_id AS provider_network_external_id, > network.provider_physical_network_id AS provider_physical_network_id, > network.qos_id AS qos_id, > network.dns_resolver_configuration_id, > network.label AS label, > storage_pool.name AS storage_pool_name, > storage_pool.compatibility_version AS compatibility_version, > providers.name AS provider_name, > qos.name AS qos_name >FROM network >INNER JOIN storage_pool > ON network.storage_pool_id = storage_pool.id >LEFT JOIN providers > ON network.provider_network_provider_id = providers.id >LEFT JOIN qos > ON qos.id = network.qos_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vnic_profiles_view AS >SELECT vnic_profiles.id AS id, > vnic_profiles.name AS name, > vnic_profiles.network_id AS network_id, > vnic_profiles.network_qos_id AS network_qos_id, > vnic_profiles.port_mirroring AS port_mirroring, > vnic_profiles.passthrough AS passthrough, > vnic_profiles.migratable AS migratable, > vnic_profiles.custom_properties AS custom_properties, > vnic_profiles.description AS description, > vnic_profiles.network_filter_id AS network_filter_id, > network_filter.filter_name AS network_filter_name, > network.name AS network_name, > qos.name AS network_qos_name, > storage_pool.name AS data_center_name, > storage_pool.compatibility_version AS compatibility_version, > storage_pool.id AS data_center_id >FROM vnic_profiles >INNER JOIN network > ON vnic_profiles.network_id = network.id >LEFT JOIN qos > ON vnic_profiles.network_qos_id = qos.id >INNER JOIN storage_pool > ON network.storage_pool_id = storage_pool.id >LEFT JOIN network_filter > ON vnic_profiles.network_filter_id = network_filter.filter_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW engine_session_user_flat_groups AS >SELECT id AS engine_session_seq_id, > user_id AS user_id, > fnSplitterUuid(engine_sessions.group_ids) AS granted_id >FROM engine_sessions >UNION ALL >SELECT id, > user_id, > user_id >FROM engine_sessions >UNION ALL >SELECT id, > user_id, > 'EEE00000-0000-0000-0000-123456789EEE' >FROM engine_sessions; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_cluster_permissions_view_base ( > entity_id, > granted_id > ) AS >SELECT object_id, > ad_element_id >FROM internal_permissions_view >WHERE object_type_id = 9 > AND role_type = 2 >UNION ALL >SELECT DISTINCT cluster_id, > ad_element_id >FROM vm_static >INNER JOIN internal_permissions_view > ON object_id = vm_guid > AND ( > object_type_id = 2 > OR object_type_id = 4 > ) > AND role_type = 2 > AND cluster_id IS NOT NULL >UNION ALL >SELECT cluster_id, > ad_element_id >FROM cluster >INNER JOIN internal_permissions_view > ON object_id = cluster.storage_pool_id > AND object_type_id = 14 > AND role_type = 2 >UNION ALL >SELECT cluster_id, > ad_element_id >FROM internal_permissions_view >CROSS JOIN cluster >WHERE object_type_id = 1 > AND role_type = 2; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_cluster_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM user_cluster_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_storage_pool_permissions_view_base ( > entity_id, > granted_id > ) AS >SELECT object_id, > ad_element_id >FROM internal_permissions_view >WHERE object_type_id = 14 > AND role_type = 2 >UNION ALL >SELECT storage_pool_id, > ad_element_id >FROM cluster >INNER JOIN internal_permissions_view > ON object_id = cluster.cluster_id > AND object_type_id = 9 > AND role_type = 2 >UNION ALL >SELECT storage_pool_id, > ad_element_id >FROM cluster >INNER JOIN vm_pools > ON cluster.cluster_id = vm_pools.cluster_id >INNER JOIN internal_permissions_view > ON object_id = vm_pools.vm_pool_id > AND object_type_id = 5 > AND role_type = 2 >UNION ALL >SELECT storage_pool_id, > ad_element_id >FROM vm_static >INNER JOIN cluster > ON cluster.cluster_id = vm_static.cluster_id >INNER JOIN internal_permissions_view > ON object_id = vm_guid > AND object_type_id = 2 > AND role_type = 2 >UNION ALL >SELECT storage_pool.id, > ad_element_id >FROM internal_permissions_view >CROSS JOIN storage_pool >WHERE object_type_id = 1 > AND role_type = 2; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_storage_pool_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM user_storage_pool_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_storage_domain_permissions_view_base ( > entity_id, > granted_id > ) AS >SELECT object_id, > ad_element_id >FROM internal_permissions_view >WHERE object_type_id = 11 > AND role_type = 2 >UNION ALL >SELECT storage_domains.id, > ad_element_id >FROM storage_domains >INNER JOIN cluster > ON cluster.storage_pool_id = storage_domains.storage_pool_id >INNER JOIN vm_static > ON cluster.cluster_id = vm_static.cluster_id >INNER JOIN internal_permissions_view > ON object_id = vm_static.vm_guid > AND object_type_id = 2 > AND role_type = 2 >UNION ALL >SELECT storage_id, > ad_element_id >FROM vm_templates_based_storage_domain >INNER JOIN internal_permissions_view > ON vmt_guid = internal_permissions_view.object_id > AND object_type_id = 4 > AND role_type = 2 >UNION ALL >SELECT storage_id, > ad_element_id >FROM vm_static >INNER JOIN vm_templates_based_storage_domain > ON vm_static.vmt_guid = vm_templates_based_storage_domain.vmt_guid >INNER JOIN internal_permissions_view > ON vm_static.vm_guid = object_id > AND objecT_type_id = 2 > AND role_type = 2 >UNION ALL >SELECT storage_domains.id, > ad_element_id >FROM storage_domains >INNER JOIN internal_permissions_view > ON object_id = storage_domains.storage_pool_id > AND object_type_id = 14 > AND role_type = 2 >UNION ALL >SELECT storage_domains.id, > ad_element_id >FROM internal_permissions_view >CROSS JOIN storage_domains >WHERE object_type_id = 1 > AND role_type = 2; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_storage_domain_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM user_storage_domain_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_vds_permissions_view_base ( > entity_id, > granted_id > ) AS >SELECT object_id, > ad_element_id >FROM internal_permissions_view >WHERE object_type_id = 3 > AND role_type = 2 >UNION ALL >SELECT vds_id, > ad_element_id >FROM vds >INNER JOIN internal_permissions_view > ON ( > object_id = cluster_id > AND object_type_id = 9 > ) > OR ( > object_id = storage_pool_id > AND object_type_id = 14 > ) > AND role_type = 2 >UNION ALL >SELECT vds_id, > ad_element_id >FROM internal_permissions_view >CROSS JOIN vds >WHERE object_type_id = 1 > AND role_type = 2; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_vds_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM user_vds_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_vm_pool_permissions_view_base ( > entity_id, > granted_id > ) AS >SELECT object_id, > ad_element_id >FROM internal_permissions_view >WHERE object_type_id = 5 > AND role_type = 2 >UNION ALL >SELECT vm_pool_id, > ad_element_id >FROM vm_pool_map >INNER JOIN internal_permissions_view > ON object_id = vm_guid > AND object_type_id = 2 > AND role_type = 2 >UNION ALL >SELECT vm_pool_id, > ad_element_id >FROM vm_pools >INNER JOIN internal_permissions_view > ON object_id = cluster_id > AND object_type_id = 9 > AND allows_viewing_children > AND role_type = 2 >UNION ALL >SELECT vm_pool_id, > ad_element_id >FROM vm_pools >INNER JOIN cluster > ON vm_pools.cluster_id = cluster.cluster_id >INNER JOIN internal_permissions_view > ON object_id = storage_pool_id > AND object_type_id = 14 > AND allows_viewing_children > AND role_type = 2 >UNION ALL >SELECT vm_pool_id, > ad_element_id >FROM internal_permissions_view >CROSS JOIN vm_pools >WHERE object_type_id = 1 > AND allows_viewing_children > AND role_type = 2; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_vm_pool_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM user_vm_pool_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_vm_template_permissions_view_base ( > entity_id, > granted_id > ) AS >SELECT object_id, > ad_element_id >FROM internal_permissions_view >WHERE object_type_id = 4 > AND role_type = 2 >UNION ALL >SELECT vmt_guid, > ad_element_id >FROM vm_static >INNER JOIN internal_permissions_view > ON object_id = vm_static.vm_guid > AND object_type_id = 2 > AND role_type = 2 >UNION ALL >SELECT vm_guid, > ad_element_id >FROM vm_static >INNER JOIN cluster > ON cluster.cluster_id = vm_static.cluster_id >INNER JOIN internal_permissions_view > ON object_id = storage_pool_id > AND object_type_id = 14 > AND allows_viewing_children > AND role_type = 2 > AND vm_static.entity_type::TEXT = 'TEMPLATE'::TEXT >UNION ALL >SELECT vm_guid, > ad_element_id >FROM internal_permissions_view >CROSS JOIN vm_static >WHERE object_type_id = 1 > AND allows_viewing_children > AND role_type = 2 > AND ( > vm_static.entity_type::TEXT = 'TEMPLATE'::TEXT > OR vm_static.entity_type::TEXT = 'INSTANCE_TYPE'::TEXT > OR vm_static.entity_type::TEXT = 'IMAGE_TYPE'::TEXT > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_vm_template_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM user_vm_template_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_permissions_view_base ( > entity_id, > granted_id, > role_type > ) AS >SELECT object_id, > ad_element_id, > role_type >FROM internal_permissions_view >WHERE object_type_id = 2 >UNION ALL >SELECT vm_guid, > ad_element_id, > role_type >FROM vm_static >INNER JOIN internal_permissions_view > ON object_id = cluster_id > AND object_type_id = 9 > AND allows_viewing_children >UNION ALL >SELECT vm_guid, > ad_element_id, > role_type >FROM vm_static >INNER JOIN cluster > ON cluster.cluster_id = vm_static.cluster_id >INNER JOIN internal_permissions_view > ON object_id = storage_pool_id > AND object_type_id = 14 > AND allows_viewing_children >UNION ALL >SELECT vm_guid, > ad_element_id, > role_type >FROM internal_permissions_view >CROSS JOIN vm_static >WHERE object_type_id = 1 > AND allows_viewing_children; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_vm_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM vm_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups > WHERE vm_permissions_view_base.role_type = 2; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM vm_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_disk_permissions_view_base ( > entity_id, > granted_id > ) AS >SELECT object_id, > ad_element_id >FROM internal_permissions_view >WHERE object_type_id = 19 > AND role_type = 2 >UNION ALL >SELECT device_id, > user_vm_permissions_view.user_id AS ad_element_id >FROM vm_device >INNER JOIN user_vm_permissions_view > ON user_vm_permissions_view.entity_id = vm_device.vm_id >WHERE vm_device.type = 'disk' > AND vm_device.device = 'disk' >UNION ALL >SELECT device_id, > user_vm_template_permissions_view.user_id AS ad_element_id >FROM vm_device >INNER JOIN user_vm_template_permissions_view > ON user_vm_template_permissions_view.entity_id = vm_device.vm_id >WHERE type = 'disk' > AND device = 'disk' >UNION ALL >SELECT images.image_group_id, > ad_element_id >FROM image_storage_domain_map >INNER JOIN images > ON images.image_guid = image_storage_domain_map.image_id >INNER JOIN internal_permissions_view > ON object_id = storage_domain_id > AND object_type_id = 11 > AND allows_viewing_children > AND role_type = 2 >UNION ALL >SELECT images.image_group_id, > ad_element_id >FROM image_storage_domain_map >INNER JOIN storage_pool_iso_map > ON image_storage_domain_map.storage_domain_id = storage_pool_iso_map.storage_id >INNER JOIN images > ON images.image_guid = image_storage_domain_map.image_id >INNER JOIN internal_permissions_view > ON object_id = storage_pool_id > AND object_type_id = 14 > AND allows_viewing_children > AND role_type = 2 >UNION ALL >SELECT device_id, > ad_element_id >FROM internal_permissions_view >CROSS JOIN vm_device >WHERE object_type_id = 1 > AND allows_viewing_children > AND role_type = 2; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_disk_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM user_disk_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_permissions_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT id, > user_id >FROM internal_permissions_view >INNER JOIN engine_session_user_flat_groups > ON granted_id = ad_element_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_object_permissions_view AS >SELECT DISTINCT permissions.object_id AS entity_id, > engine_session_user_flat_groups.user_id >FROM permissions >INNER JOIN roles > ON permissions.role_id = roles.id >INNER JOIN engine_session_user_flat_groups > ON engine_session_user_flat_groups.granted_id = permissions.ad_element_id >WHERE permissions.ad_element_id != getGlobalIds('everyone'); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_db_users_permissions_view AS >SELECT DISTINCT permissions.ad_element_id, > roles_groups.role_id, > roles_groups.action_group_id >FROM permissions >INNER JOIN roles_groups > ON permissions.role_id = roles_groups.role_id >WHERE roles_groups.action_group_id = 502; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_device_view AS >SELECT device_id, > vm_id, > type, > device, > address, > spec_params, > is_managed, > is_plugged, > is_readonly, > alias, > custom_properties, > snapshot_id, > logical_name, > host_device >FROM vm_device; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_vnic_profile_permissions_view_base ( > entity_id, > granted_id > ) AS >SELECT object_id, > ad_element_id >FROM internal_permissions_view >WHERE object_type_id = 27 > AND role_type = 2 >UNION ALL >SELECT vnic_profiles.id, > ad_element_id >FROM vnic_profiles >INNER JOIN internal_permissions_view > ON object_id = network_id >WHERE object_type_id = 20 > AND allows_viewing_children > AND role_type = 2 >UNION ALL >SELECT vnic_profiles.id, > ad_element_id >FROM vnic_profiles >INNER JOIN network > ON network.id = network_id >INNER JOIN internal_permissions_view > ON object_id = network.storage_pool_id >WHERE object_type_id = 14 > AND role_type = 2 > AND allows_viewing_children >UNION ALL >SELECT vnic_profiles.id, > ad_element_id >FROM vnic_profiles >INNER JOIN network_cluster > ON network_cluster.network_id = vnic_profiles.network_id >INNER JOIN internal_permissions_view > ON object_id = network_cluster.cluster_id >WHERE object_type_id = 9 > AND role_type = 2 > AND allows_viewing_children >UNION ALL >SELECT DISTINCT vnic_profile_id, > ad_element_id >FROM vm_interface >INNER JOIN internal_permissions_view > ON object_id = vm_guid >WHERE object_type_id = 2 > AND role_type = 2 >UNION ALL >SELECT DISTINCT vnic_profile_id, > ad_element_id >FROM vm_interface >INNER JOIN internal_permissions_view > ON object_id = vmt_guid >WHERE object_type_id = 4 > AND role_type = 2 >UNION ALL >SELECT vnic_profiles.id, > ad_element_id >FROM internal_permissions_view >CROSS JOIN vnic_profiles >WHERE object_type_id = 1 > AND allows_viewing_children > AND role_type = 2; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_vnic_profile_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM user_vnic_profile_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_network_permissions_view_base ( > entity_id, > granted_id > ) AS >SELECT network.id, > user_id >FROM network >INNER JOIN vnic_profiles > ON network_id = network.id >INNER JOIN user_vnic_profile_permissions_view > ON entity_id = vnic_profiles.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_network_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM user_network_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_disk_profile_permissions_view_base ( > entity_id, > granted_id > ) AS >SELECT object_id, > ad_element_id >FROM internal_permissions_view >WHERE object_type_id = 29 > AND role_type = 2; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_disk_profile_permissions_view ( > entity_id, > user_id > ) AS >SELECT DISTINCT entity_id, > user_id >FROM user_disk_profile_permissions_view_base NATURAL > JOIN engine_session_user_flat_groups; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW gluster_volumes_view AS >SELECT gluster_volumes.*, > cluster.name AS cluster_name, > CASE > WHEN EXISTS ( > SELECT session_id > FROM gluster_georep_session > WHERE master_volume_id = gluster_volumes.id > ) > THEN true > ELSE false > END AS is_master, > ( > SELECT vol.vol_name || '|' || cluster.name > FROM gluster_georep_session > INNER JOIN gluster_volumes vol > ON master_volume_id = vol.id > INNER JOIN cluster > ON cluster.cluster_id = vol.cluster_id > WHERE slave_volume_id = gluster_volumes.id > ) AS master_vol_cluster >FROM gluster_volumes >INNER JOIN cluster > ON gluster_volumes.cluster_id = cluster.cluster_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW gluster_volume_snapshots_view AS >SELECT gluster_volume_snapshots.*, > gluster_volumes.cluster_id AS cluster_id, > gluster_volumes.vol_name AS volume_name >FROM gluster_volume_snapshots >INNER JOIN gluster_volumes > ON gluster_volume_snapshots.volume_id = gluster_volumes.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW gluster_volume_snapshot_schedules_view AS >SELECT gluster_volume_snapshot_schedules.*, > gluster_volumes.cluster_id AS cluster_id >FROM gluster_volume_snapshot_schedules >INNER JOIN gluster_volumes > ON gluster_volume_snapshot_schedules.volume_id = gluster_volumes.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW gluster_volume_bricks_view AS >SELECT gluster_volume_bricks.*, > vds_static.host_name AS vds_name, > gluster_volumes.vol_name AS volume_name, > vds_interface.addr AS interface_address, > gluster_volumes.cluster_id AS cluster_id >FROM gluster_volume_bricks >INNER JOIN vds_static > ON vds_static.vds_id = gluster_volume_bricks.server_id >INNER JOIN gluster_volumes > ON gluster_volumes.id = gluster_volume_bricks.volume_id >LEFT JOIN network > ON network.id = gluster_volume_bricks.network_id >LEFT JOIN vds_interface > ON vds_interface.vds_id = gluster_volume_bricks.server_id > AND vds_interface.network_name = network.name; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW gluster_volume_task_steps AS >SELECT step.*, > gluster_volumes.id AS volume_id, > job.job_id AS job_job_id, > job.action_type, > job.description AS job_description, > job.status AS job_status, > job.start_time AS job_start_time, > job.end_time AS job_end_time >FROM gluster_volumes >INNER JOIN job_subject_entity js > ON js.entity_id = gluster_volumes.id >INNER JOIN job > ON job.job_id = js.job_id > AND job.action_type IN ( > 'StartRebalanceGlusterVolume', > 'StartRemoveGlusterVolumeBricks' > ) >LEFT JOIN step > ON step.external_id = gluster_volumes.task_id > AND step.external_system_type = 'GLUSTER' > AND step.job_id = js.job_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW gluster_server_services_view AS >SELECT gluster_server_services.*, > gluster_services.service_name, > gluster_services.service_type, > vds_static.vds_name >FROM gluster_server_services >INNER JOIN gluster_services > ON gluster_server_services.service_id = gluster_services.id >INNER JOIN vds_static > ON gluster_server_services.server_id = vds_static.vds_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW gluster_server_hooks_view AS >SELECT gluster_server_hooks.*, > vds_static.vds_name AS server_name >FROM gluster_server_hooks >INNER JOIN vds_static > ON gluster_server_hooks.server_id = vds_static.vds_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW gluster_georep_sessions_view AS >SELECT session_id, > master_volume_id, > session_key, > slave_host_uuid, > slave_host_name, > slave_volume_id, > slave_volume_name, > georep.status, > georep._create_date, > georep._update_date, > gluster_volumes.vol_name AS master_volume_name, > gluster_volumes.cluster_id AS cluster_id, > georep.user_name >FROM gluster_georep_session georep >INNER JOIN gluster_volumes > ON gluster_volumes.id = georep.master_volume_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW gluster_geo_rep_config_view AS >SELECT session_id, > georepConfig.config_key, > config_value, > config_description, > config_possible_values, > _update_date >FROM gluster_georep_config georepConfig >LEFT JOIN gluster_config_master > ON gluster_config_master.config_key = georepConfig.config_key > AND gluster_config_master.config_feature = 'geo_replication'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW supported_cluster_features_view AS >SELECT cluster_features.*, > supported_cluster_features.cluster_id, > supported_cluster_features.is_enabled >FROM cluster_features >INNER JOIN supported_cluster_features > ON supported_cluster_features.feature_id = cluster_features.feature_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW affinity_groups_view AS >SELECT affinity_groups.*, > array_agg(affinity_group_members.vm_id::text) AS vm_ids, > array_agg(vm_static.vm_name::text) AS vm_names, > array_agg(affinity_group_members.vds_id::text) AS vds_ids, > array_agg(vds_static.vds_name::text) AS vds_names >FROM affinity_groups >LEFT JOIN affinity_group_members > ON affinity_group_members.affinity_group_id = affinity_groups.id >LEFT JOIN vm_static > ON vm_static.vm_guid = affinity_group_members.vm_id >LEFT JOIN vds_static > ON vds_static.vds_id = affinity_group_members.vds_id >GROUP BY affinity_groups.id, > affinity_groups.name, > affinity_groups.description, > affinity_groups.cluster_id, > affinity_groups.vm_positive, > affinity_groups.vm_enforcing, > affinity_groups.vds_positive, > affinity_groups.vds_enforcing, > affinity_groups.vms_affinity_enabled, > affinity_groups.vds_affinity_enabled, > affinity_groups._create_date, > affinity_groups._update_date; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW numa_node_cpus_view AS >SELECT * >FROM numa_node >INNER JOIN > (SELECT numa_node_id AS numa_node_id2, > ARRAY_AGG(cpu_core_id) AS cpu_core_ids > FROM numa_node_cpu_map > GROUP BY numa_node_id > ) numa_node_to_cpu_core_ids > ON numa_node.numa_node_id = numa_node_to_cpu_core_ids.numa_node_id2; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW numa_node_assignment_view AS >SELECT vm_vds_numa_node_map.vm_numa_node_id AS assigned_vm_numa_node_id, > vm_vds_numa_node_map.vds_numa_node_index AS run_in_vds_numa_node_index, > vm_numa_node.vm_id AS vm_numa_node_vm_id, > vm_numa_node.numa_node_index AS vm_numa_node_index, > vm_numa_node.mem_total AS vm_numa_node_mem_total, > vm_numa_node.cpu_count AS vm_numa_node_cpu_count, > vm_numa_node.mem_free AS vm_numa_node_mem_free, > vm_numa_node.usage_mem_percent AS vm_numa_node_usage_mem_percent, > vm_numa_node.cpu_sys AS vm_numa_node_cpu_sys, > vm_numa_node.cpu_user AS vm_numa_node_cpu_user, > vm_numa_node.cpu_idle AS vm_numa_node_cpu_idle, > vm_numa_node.usage_cpu_percent AS vm_numa_node_usage_cpu_percent, > vm_numa_node.distance AS vm_numa_node_distance >FROM vm_vds_numa_node_map >LEFT JOIN numa_node AS vm_numa_node > ON vm_vds_numa_node_map.vm_numa_node_id = vm_numa_node.numa_node_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW numa_node_with_cluster_view AS >SELECT vm_numa_node.numa_node_id AS vm_numa_node_id, > vm_numa_node.vm_id AS vm_numa_node_vm_id, > vm_numa_node.numa_node_index AS vm_numa_node_index, > vm_numa_node.mem_total AS vm_numa_node_mem_total, > vm_numa_node.cpu_count AS vm_numa_node_cpu_count, > vm_numa_node.mem_free AS vm_numa_node_mem_free, > vm_numa_node.usage_mem_percent AS vm_numa_node_usage_mem_percent, > vm_numa_node.cpu_sys AS vm_numa_node_cpu_sys, > vm_numa_node.cpu_user AS vm_numa_node_cpu_user, > vm_numa_node.cpu_idle AS vm_numa_node_cpu_idle, > vm_numa_node.usage_cpu_percent AS vm_numa_node_usage_cpu_percent, > vm_numa_node.distance AS vm_numa_node_distance, > vm_static.cluster_id >FROM numa_node AS vm_numa_node >LEFT JOIN vm_static > ON vm_numa_node.vm_id = vm_static.vm_guid; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_host_pinning_view AS >SELECT host.vds_name, > vm.vm_name, > vm_vds.* >FROM vm_host_pinning_map AS vm_vds >INNER JOIN vm_static AS vm > ON vm_vds.vm_id = vm.vm_guid >INNER JOIN vds_static AS host > ON vm_vds.vds_id = host.vds_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW host_device_view AS >SELECT host_device.*, > NULL::UUID AS configured_vm_id, > NULL::VARCHAR AS spec_params, > ( > SELECT array_to_string(array_agg(vm_host_pinning_view.vm_name), ',') > FROM vm_device > INNER JOIN vm_host_pinning_view > ON vm_device.vm_id = vm_host_pinning_view.vm_id > WHERE vm_device.device = host_device.device_name > AND vm_host_pinning_view.vds_id = host_device.host_id > ) AS attached_vm_names, > ( > SELECT vm_name > FROM vm_static > WHERE vm_static.vm_guid = host_device.vm_id > ) AS running_vm_name >FROM host_device; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW host_network_qos_of_migration_network_by_cluster AS >SELECT network_cluster.cluster_id, qos.* >FROM qos, network_cluster, network >WHERE network_cluster.network_id = network.id > AND network_cluster.migration > AND network.qos_id = qos.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW active_migration_network_interfaces AS >SELECT vds_interface_view.* >FROM vds_interface_view, > vds_dynamic, > network_attachments, > network, > network_cluster >WHERE vds_interface_view.id = network_attachments.nic_id > AND network_attachments.network_id = network.id > AND network.id = network_cluster.network_id > AND network_cluster.migration > AND network_cluster.cluster_id = vds_interface_view.cluster_id > AND vds_dynamic.vds_id = vds_interface_view.vds_id > AND vds_dynamic.status IN (3, 9) > AND vds_interface_view.iface_status = 1; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW vm_host_device_view AS >SELECT host_device.*, > vm_device.vm_id AS configured_vm_id, > vm_device.spec_params AS spec_params, > array_to_string(array_agg(vm_host_pinning_view.vm_name) OVER ( > PARTITION BY host_id, > device_name > ), ',') AS attached_vm_names, > ( > SELECT vm_name > FROM vm_static > WHERE vm_static.vm_guid = host_device.vm_id > ) AS running_vm_name >FROM vm_device >INNER JOIN vm_host_pinning_view > ON vm_device.vm_id = vm_host_pinning_view.vm_id >INNER JOIN host_device > ON host_device.device_name = vm_device.device > AND vm_host_pinning_view.vds_id = host_device.host_id >WHERE vm_device.type = 'hostdev'; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW user_profiles_view AS >SELECT user_profiles.*, > users.username || '@' || users.domain AS login_name >FROM user_profiles >INNER JOIN users > ON user_profiles.user_id = users.user_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW qos_for_vm_view AS >SELECT qos.*, > vm_static.vm_guid AS vm_id >FROM qos > INNER JOIN cpu_profiles > ON qos.id = cpu_profiles.qos_id > INNER JOIN vm_static > ON vm_static.cpu_profile_id = cpu_profiles.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW qos_for_disk_profile_view AS >SELECT qos.*, > disk_profiles.id AS disk_profile_id >FROM qos > INNER JOIN disk_profiles > ON qos.id = disk_profiles.qos_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW labels_map_view AS > > > >SELECT labels.label_id, > labels.label_name, > labels.read_only, > array_agg(labels_map.vm_id::text) as vm_ids, > array_agg(labels_map.vds_id::text) as vds_ids >FROM labels >LEFT JOIN labels_map > ON labels_map.label_id = labels.label_id >GROUP BY labels.label_id, labels.label_name, labels.read_only; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW disk_vm_element_extended AS > SELECT dve.*, vd.is_plugged, vd.logical_name, vd.is_readonly > FROM disk_vm_element dve > JOIN vm_device vd > ON dve.disk_id = vd.device_id > AND dve.vm_id = vd.vm_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW iso_disks_as_repo_images AS > SELECT sds.id AS repo_domain_id, > bd.disk_id::VARCHAR(256) AS repo_image_id, > img.size AS size, > img.creation_date AS date_created, > (EXTRACT(EPOCH FROM CURRENT_TIMESTAMP)*1000)::BIGINT AS last_refreshed, > 1 AS file_type, > bd.disk_alias::VARCHAR(256) AS repo_image_name, > spim.storage_pool_id, > spim.status > FROM base_disks bd > JOIN images img ON bd.disk_id = img.image_group_id > JOIN image_storage_domain_map isdm ON isdm.image_id = img.image_guid > JOIN storage_domain_static sds ON sds.id = isdm.storage_domain_id > JOIN storage_pool_iso_map spim ON spim.storage_id = sds.id > WHERE bd.disk_content_type=4; >************************** > >CREATE VIEW >2019-02-26 17:06:40,165+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/create_dwh_views.sql >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_datacenter_configuration_history_view AS >SELECT id AS datacenter_id, > name AS datacenter_name, > description AS datacenter_description, > is_local AS is_local_storage, > _create_date AS create_date, > _update_date AS update_date >FROM storage_pool >WHERE ( > _create_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) > ) > OR ( > _update_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping AS history_timekeeping_1 > WHERE (var_name = 'lastSync') > ) > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_storage_domain_configuration_history_view AS >SELECT id AS storage_domain_id, > storage_name AS storage_domain_name, > CAST(storage_domain_type AS SMALLINT) AS storage_domain_type, > CAST(storage_type AS SMALLINT) AS storage_type, > _create_date AS create_date, > _update_date AS update_date >FROM storage_domain_static >WHERE ( > _create_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) > ) > OR ( > _update_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping AS history_timekeeping_1 > WHERE (var_name = 'lastSync') > ) > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_datacenter_storage_map_history_view AS >SELECT DISTINCT storage_pool_id AS datacenter_id, > storage_id AS storage_domain_id >FROM storage_pool_iso_map; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_storage_domain_history_view AS >SELECT storage_domain_dynamic.id AS storage_domain_id, > COALESCE(storage_domain_shared_status.status, 0) AS storage_domain_status, > storage_domain_dynamic.available_disk_size AS available_disk_size_gb, > storage_domain_dynamic.used_disk_size AS used_disk_size_gb, > storage_domain_dynamic.confirmed_available_disk_size AS confirmed_available_disk_size_gb, > storage_domain_dynamic.vdo_savings AS vdo_savings >FROM storage_domain_dynamic >INNER JOIN storage_domain_static > ON (storage_domain_dynamic.id = storage_domain_static.id) >LEFT JOIN storage_domain_shared_status > ON storage_domain_shared_status.storage_id = storage_domain_static.id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_cluster_configuration_history_view AS >SELECT cluster_id AS cluster_id, > name AS cluster_name, > description AS cluster_description, > storage_pool_id AS datacenter_id, > cpu_name, > compatibility_version, > _create_date AS create_date, > _update_date AS update_date >FROM cluster >WHERE ( > _create_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) > ) > OR ( > _update_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping AS history_timekeeping_1 > WHERE (var_name = 'lastSync') > ) > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_host_configuration_history_view AS >SELECT a.vds_id AS host_id, > a.vds_unique_id AS host_unique_id, > a.vds_name AS host_name, > a.cluster_id AS cluster_id, > CAST(a.vds_type AS SMALLINT) AS host_type, > a.host_name AS fqdn_or_ip, > b.physical_mem_mb AS memory_size_mb, > CAST(c.swap_total AS INT) AS swap_size_mb, > b.cpu_model, > CAST(b.cpu_cores AS SMALLINT) AS number_of_cores, > CAST(b.cpu_sockets AS SMALLINT) AS number_of_sockets, > b.cpu_speed_mh, > b.host_os, > b.kernel_version, > b.kvm_version, > b.libvirt_version, > b.software_version AS vdsm_version, > a.port AS vdsm_port, > CAST(b.cpu_threads AS SMALLINT) AS threads_per_core, > b.hw_manufacturer AS hardware_manufacturer, > b.hw_product_name AS hardware_product_name, > b.hw_version AS hardware_version, > b.hw_serial_number AS hardware_serial_number, > a._create_date AS create_date, > a._update_date AS update_date >FROM vds_static AS a >INNER JOIN vds_dynamic AS b > ON a.vds_id = b.vds_id >INNER JOIN vds_statistics AS c > ON c.vds_id = a.vds_id >WHERE ( > a._create_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) > ) > OR ( > a._update_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping AS history_timekeeping_1 > WHERE (var_name = 'lastSync') > ) > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_host_configuration_full_check_view AS >SELECT a.vds_id AS host_id, > a.vds_unique_id AS host_unique_id, > a.vds_name AS host_name, > a.cluster_id AS cluster_id, > CAST(a.vds_type AS SMALLINT) AS host_type, > a.host_name AS fqdn_or_ip, > b.physical_mem_mb AS memory_size_mb, > CAST(c.swap_total AS INT) AS swap_size_mb, > b.cpu_model, > CAST(b.cpu_cores AS SMALLINT) AS number_of_cores, > CAST(b.cpu_sockets AS SMALLINT) AS number_of_sockets, > b.cpu_speed_mh, > b.host_os, > b.kernel_version, > b.kvm_version, > b.libvirt_version, > CASE SUBSTR(b.software_version, 1, 3) > WHEN '4.4' > THEN '2.1' || SUBSTR(b.software_version, 4, LENGTH(b.software_version)) > WHEN '4.5' > THEN '2.2' || SUBSTR(b.software_version, 4, LENGTH(b.software_version)) > WHEN '4.9' > THEN '2.3' || SUBSTR(b.software_version, 4, LENGTH(b.software_version)) > ELSE b.software_version > END AS vdsm_version, > a.port AS vdsm_port, > CAST(b.cpu_threads AS SMALLINT) AS threads_per_core, > b.hw_manufacturer AS hardware_manufacturer, > b.hw_product_name AS hardware_product_name, > b.hw_version AS hardware_version, > b.hw_serial_number AS hardware_serial_number, > a._create_date AS create_date, > a._update_date AS update_date >FROM vds_static AS a >INNER JOIN vds_dynamic AS b > ON a.vds_id = b.vds_id >INNER JOIN vds_statistics AS c > ON c.vds_id = a.vds_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_host_history_view AS >SELECT b.vds_id AS host_id, > CAST(b.status AS SMALLINT) AS host_status, > CAST(c.usage_mem_percent AS SMALLINT) AS memory_usage_percent, > CAST(c.usage_cpu_percent AS SMALLINT) AS cpu_usage_percent, > CAST(c.ksm_cpu_percent AS SMALLINT) AS ksm_cpu_percent, > CAST(c.cpu_load AS INT) AS cpu_load, > CAST(c.cpu_sys AS SMALLINT) AS system_cpu_usage_percent, > CAST(c.cpu_user AS SMALLINT) AS user_cpu_usage_percent, > CAST((c.swap_total - c.swap_free) AS INT) AS swap_used_mb, > CAST(b.vm_active AS SMALLINT) AS vm_active, > CAST(b.vm_count AS SMALLINT) AS total_vms, > b.vms_cores_count AS total_vms_vcpus, > c.mem_shared AS ksm_shared_memory_mb >FROM vds_dynamic b, > vds_statistics c >WHERE b.vds_id = c.vds_id; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_host_interface_configuration_history_view AS >SELECT a.id AS host_interface_id, > a.name AS host_interface_name, > a.vds_id AS host_id, > CAST(a.type AS SMALLINT) AS host_interface_type, > a.speed AS host_interface_speed_bps, > a.mac_addr AS mac_address, > a.network_name AS logical_network_name, > a.addr AS ip_address, > a.gateway, > a.is_bond AS bond, > a.bond_name, > a.vlan_id, > a._create_date AS create_date, > a._update_date AS update_date >FROM vds_interface AS a >WHERE ( > ( > a._create_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) > ) > OR ( > a._update_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping AS history_timekeeping_1 > WHERE (var_name = 'lastSync') > ) > ) > ) > AND ( > a.is_bond IS NULL > OR a.is_bond = FALSE > OR ( > a.is_bond = TRUE > AND a.name IN ( > SELECT b.bond_name > FROM vds_interface AS b > WHERE b.is_bond IS NULL > AND b.vds_id = a.vds_id > ) > ) > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_host_interface_history_view AS >SELECT vds_interface_statistics.id AS host_interface_id, > vds_interface_statistics.rx_rate AS receive_rate_percent, > vds_interface_statistics.tx_rate AS transmit_rate_percent, > vds_interface_statistics.rx_total AS received_total_byte, > vds_interface_statistics.tx_total AS transmitted_total_byte >FROM vds_interface_statistics; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_vm_configuration_history_view AS >SELECT a.vm_guid AS vm_id, > a.vm_name, > a.description AS vm_description, > CAST(a.vm_type AS SMALLINT) AS vm_type, > a.cluster_id AS cluster_id, > a.vmt_guid AS template_id, > b.vm_name AS template_name, > CAST(a.cpu_per_socket AS SMALLINT) AS cpu_per_socket, > CAST(a.num_of_sockets AS SMALLINT) AS number_of_sockets, > a.mem_size_mb AS memory_size_mb, > CAST(a.os AS SMALLINT) AS operating_system, > f.vds_id AS default_host, > a.auto_startup AS high_availability, > a.is_initialized AS initialized, > a.is_stateless AS stateless, > CAST(FALSE AS BOOLEAN) AS fail_back, > CAST(a.usb_policy AS SMALLINT) AS usb_policy, > a.time_zone, > c.vm_pool_id, > d.vm_pool_name, > e.user_id AS created_by_user_id, > a._create_date AS create_date, > a._update_date AS update_date >FROM vm_static AS a >INNER JOIN vm_static AS b > ON a.vmt_guid = b.vm_guid >LEFT JOIN vm_pool_map AS c > ON a.vm_guid = c.vm_guid >LEFT JOIN vm_pools AS d > ON c.vm_pool_id = d.vm_pool_id >LEFT JOIN users AS e > ON a.created_by_user_id = e.user_id >LEFT JOIN ( > SELECT DISTINCT > ON (vm_id) vm_id, > vds_id > FROM vm_host_pinning_map > ORDER BY vm_id > ) f > ON f.vm_id = a.vm_guid, > ( > SELECT var_datetime > FROM dwh_history_timekeeping > WHERE var_name = 'lastSync' > ) AS lastSync >WHERE ( > a.entity_type = 'VM' > AND b.entity_type = 'TEMPLATE' > ) > AND greatest(a._create_date, a._update_date, b._update_date) > lastSync.var_datetime; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_vm_history_view AS >SELECT c.vm_guid AS vm_id, > CAST(b.status AS SMALLINT) AS vm_status, > CAST(c.usage_cpu_percent AS SMALLINT) AS cpu_usage_percent, > CAST(c.usage_mem_percent AS SMALLINT) AS memory_usage_percent, > CAST((c.cpu_sys / (vm_static.cpu_per_socket * vm_static.num_of_sockets)) AS SMALLINT) AS system_cpu_usage_percent, > CAST((c.cpu_user / (vm_static.cpu_per_socket * vm_static.num_of_sockets)) AS SMALLINT) AS user_cpu_usage_percent, > c.disks_usage, > b.vm_ip, > b.vm_fqdn, > b.client_ip AS vm_client_ip, > b.console_user_id AS current_user_id, > CASE > WHEN b.guest_cur_user_name IS NULL > THEN FALSE > ELSE TRUE > END AS user_logged_in_to_guest, > b.run_on_vds AS currently_running_on_host, > c.guest_mem_buffered AS memory_buffered_kb, > c.guest_mem_cached AS memory_cached_kb >FROM vm_dynamic b >LEFT JOIN vm_statistics c > ON c.vm_guid = b.vm_guid >INNER JOIN vm_static > ON c.vm_guid = vm_static.vm_guid; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_vm_interface_configuration_history_view AS >SELECT vm_interface.id AS vm_interface_id, > vm_interface.name AS vm_interface_name, > vm_interface.vm_guid AS vm_id, > CAST(vm_interface.type AS SMALLINT) AS vm_interface_type, > vm_interface.speed AS vm_interface_speed_bps, > vm_interface.mac_addr AS mac_address, > network.name AS logical_network_name, > vm_interface._create_date AS create_date, > vm_interface._update_date AS update_date >FROM vm_interface >LEFT JOIN ( > vnic_profiles INNER JOIN network > ON network.id = vnic_profiles.network_id > ) > ON vnic_profiles.id = vm_interface.vnic_profile_id >WHERE vmt_guid IS NULL > AND ( > ( > vm_interface._create_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) > ) > OR ( > vm_interface._update_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping AS history_timekeeping_1 > WHERE (var_name = 'lastSync') > ) > ) > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_vm_interface_history_view AS >SELECT vm_interface_statistics.id AS vm_interface_id, > vm_interface_statistics.rx_rate AS receive_rate_percent, > vm_interface_statistics.tx_rate AS transmit_rate_percent, > vm_interface_statistics.rx_total AS received_total_byte, > vm_interface_statistics.tx_total AS transmitted_total_byte >FROM vm_interface_statistics; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_vm_disk_configuration_history_view AS >SELECT d.disk_id AS vm_disk_id, > d.disk_alias AS vm_disk_name, > d.disk_description AS vm_disk_description, > image_storage_domain_map.storage_domain_id AS storage_domain_id, > CAST(i.size / 1048576 AS INT) AS vm_disk_size_mb, > CAST(i.volume_type AS SMALLINT) AS vm_disk_type, > CAST(i.volume_format AS SMALLINT) AS vm_disk_format, > d.shareable AS is_shared, > i._create_date AS create_date, > i._update_date AS update_date >FROM images AS i >INNER JOIN base_disks AS d > ON i.image_group_id = d.disk_id >INNER JOIN image_storage_domain_map > ON image_storage_domain_map.image_id = i.image_guid >WHERE i.active = TRUE > AND i.image_group_id in ( > SELECT device_id > FROM vm_device > LEFT JOIN vm_static > ON vm_static.vm_guid = vm_device.vm_id > WHERE > vm_static.entity_type = 'VM' > OR vm_static.entity_type IS NULL > ) > AND ( > ( > i._create_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) > ) > OR ( > i._update_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping AS history_timekeeping_1 > WHERE (var_name = 'lastSync') > ) > ) > ) >GROUP BY vm_disk_id, storage_domain_id, vm_disk_size_mb, vm_disk_type, vm_disk_format, create_date, update_date; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_vm_device_history_view AS >SELECT device_id, > vm_id, > type, > address, > is_managed, > is_plugged, > is_readonly, > _create_date AS create_date, > _update_date AS update_date >FROM vm_device >WHERE ( > ( > type = 'disk' > AND device = 'disk' > ) > OR (type = 'interface') > ) > AND ( > ( > _create_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) > ) > OR ( > _update_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping AS history_timekeeping_1 > WHERE (var_name = 'lastSync') > ) > ) > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_vm_disks_history_view AS >SELECT d.disk_id AS vm_disk_id, > images.image_guid AS image_id, > cast(images.imageStatus AS SMALLINT) AS vm_disk_status, > vm_disk_actual_size.vm_disk_actual_size_mb AS vm_disk_actual_size_mb, > disk_image_dynamic.read_rate AS read_rate_bytes_per_second, > disk_image_dynamic.read_latency_seconds AS read_latency_seconds, > disk_image_dynamic.write_rate AS write_rate_bytes_per_second, > disk_image_dynamic.write_latency_seconds AS write_latency_seconds, > disk_image_dynamic.flush_latency_seconds AS flush_latency_seconds >FROM images >INNER JOIN disk_image_dynamic > ON images.image_guid = disk_image_dynamic.image_id >INNER JOIN base_disks AS d > ON images.image_group_id = d.disk_id >LEFT JOIN vm_device > ON vm_device.device_id = images.image_group_id >LEFT JOIN vm_static > ON vm_static.vm_guid = vm_device.vm_id >LEFT JOIN ( > SELECT e.disk_id AS vm_disk_id, > cast(SUM(disk_image_dynamic.actual_size / 1048576) AS INT) AS vm_disk_actual_size_mb > FROM images images_b > INNER JOIN disk_image_dynamic > ON images_b.image_guid = disk_image_dynamic.image_id > INNER JOIN base_disks e > ON images_b.image_group_id = e.disk_id > LEFT JOIN vm_device > ON vm_device.device_id = images_b.image_group_id > LEFT JOIN vm_static > ON vm_static.vm_guid = vm_device.vm_id > WHERE vm_static.entity_type = 'VM' > OR vm_static.entity_type IS NULL > GROUP BY vm_disk_id > ) AS vm_disk_actual_size > ON d.disk_id = vm_disk_actual_size.vm_disk_id >WHERE images.active = TRUE > AND ( > vm_static.entity_type = 'VM' > OR vm_static.entity_type IS NULL > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_remove_tags_relations_history_view AS >SELECT tag_id AS entity_id, > parent_id AS parent_id >FROM tags >UNION ALL >SELECT vds_id AS vds_id, > tag_id AS tag_id >FROM tags_vds_map >UNION ALL >SELECT vm_pool_id AS vm_pool_id, > tag_id AS tag_id >FROM tags_vm_pool_map >UNION ALL >SELECT vm_id AS vm_id, > tag_id AS tag_id >FROM tags_vm_map >UNION ALL >SELECT user_id AS user_id, > tag_id AS tag_id >FROM tags_user_map >UNION ALL >SELECT group_id AS group_id, > tag_id AS tag_id >FROM tags_user_group_map; >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_add_tags_relations_history_view AS >SELECT tag_id AS entity_id, > parent_id AS parent_id, > CAST(18 AS SMALLINT) AS entity_type, > _create_date AS attach_date, > _update_date AS move_date >FROM tags >WHERE ( > _create_date > ( > SELECT var_datetime AS var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) > ) > OR ( > _update_date > ( > SELECT var_datetime AS var_datetime > FROM dwh_history_timekeeping AS history_timekeeping_1 > WHERE (var_name = 'lastSync') > ) > ) >UNION ALL >SELECT vds_id AS vds_id, > tag_id AS tag_id, > CAST(3 AS SMALLINT), > _create_date, > NULL >FROM tags_vds_map >WHERE _create_date > ( > SELECT var_datetime AS var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) >UNION ALL >SELECT vm_pool_id AS vm_pool_id, > tag_id AS tag_id, > CAST(5 AS SMALLINT), > _create_date, > NULL >FROM tags_vm_pool_map >WHERE _create_date > ( > SELECT var_datetime AS var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) >UNION ALL >SELECT vm_id AS vm_id, > tag_id AS tag_id, > CAST(2 AS SMALLINT), > _create_date, > NULL >FROM tags_vm_map >WHERE _create_date > ( > SELECT var_datetime AS var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) >UNION ALL >SELECT user_id AS user_id, > tag_id AS tag_id, > CAST(15 AS SMALLINT), > _create_date, > NULL >FROM tags_user_map >WHERE _create_date > ( > SELECT var_datetime AS var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) >UNION ALL >SELECT group_id AS group_id, > tag_id AS tag_id, > CAST(17 AS SMALLINT), > _create_date, > NULL >FROM tags_user_group_map >WHERE _create_date > ( > SELECT var_datetime AS var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_tags_details_history_view AS >SELECT tag_id AS tag_id, > tag_name AS tag_name, > description AS tag_description, > _create_date AS create_date, > _update_date AS update_date >FROM tags >WHERE ( > _create_date > ( > SELECT var_datetime AS var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) > ) > OR ( > _update_date > ( > SELECT var_datetime AS var_datetime > FROM dwh_history_timekeeping AS history_timekeeping_1 > WHERE (var_name = 'lastSync') > ) > ); >************************** > >CREATE VIEW >********* QUERY ********** >CREATE OR REPLACE VIEW dwh_users_history_view AS >SELECT user_id, > name AS first_name, > surname AS last_name, > DOMAIN, > username, > department, > '' AS user_role_title, > email, > external_id, > TRUE AS active, > _create_date AS create_date, > _update_date AS update_date >FROM users >WHERE ( > ( > _create_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping > WHERE (var_name = 'lastSync') > ) > ) > OR ( > _update_date > ( > SELECT var_datetime > FROM dwh_history_timekeeping AS history_timekeeping_1 > WHERE (var_name = 'lastSync') > ) > ) > ); >************************** > >CREATE VIEW >2019-02-26 17:06:40,207+0100 Creating stored procedures... >2019-02-26 17:06:40,211+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/ad_groups_sp.sql... >2019-02-26 17:06:40,212+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/ad_groups_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGroup ( > v_id UUID, > v_name VARCHAR(255), > v_domain VARCHAR(100), > v_distinguishedname VARCHAR(4000), > v_external_id TEXT, > v_namespace VARCHAR(2048) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO ad_groups ( > id, > name, > domain, > distinguishedname, > external_id, > namespace > ) > VALUES ( > v_id, > v_name, > v_domain, > v_distinguishedname, > v_external_id, > v_namespace > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGroup ( > v_id UUID, > v_name VARCHAR(255), > v_domain VARCHAR(100), > v_distinguishedname VARCHAR(4000), > v_external_id TEXT, > v_namespace VARCHAR(2048) > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE ad_groups > SET name = v_name, > domain = v_domain, > distinguishedname = v_distinguishedname, > external_id = v_external_id, > namespace = v_namespace > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGroup (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM tags_user_group_map > WHERE group_id = v_id; > > DELETE > FROM ad_groups > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllGroups () >RETURNS SETOF ad_groups STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM ad_groups; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGroupById (v_id UUID) >RETURNS SETOF ad_groups STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM ad_groups > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGroupByExternalId ( > v_domain VARCHAR(100), > v_external_id TEXT > ) >RETURNS SETOF ad_groups STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM ad_groups > WHERE domain = v_domain > AND external_id = v_external_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGroupByName (v_name VARCHAR(256)) >RETURNS SETOF ad_groups STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM ad_groups > WHERE name = v_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGroupByNameAndDomain (v_name VARCHAR(256), v_domain VARCHAR(256)) >RETURNS SETOF ad_groups STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM ad_groups > WHERE name = v_name > AND domain = v_domain; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,226+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/affinity_groups_sp.sql... >2019-02-26 17:06:40,227+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/affinity_groups_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION getAllAffinityGroupsByVmId (v_vm_id UUID) >RETURNS SETOF affinity_groups_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT affinity_groups_view.* > FROM affinity_groups_view > INNER JOIN affinity_group_members > ON v_vm_id = affinity_group_members.vm_id > AND affinity_group_members.affinity_group_id = affinity_groups_view.id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getAllAffinityGroupsByClusterId (v_cluster_id UUID) >RETURNS SETOF affinity_groups_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM affinity_groups_view > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAffinityGroupByAffinityGroupId (v_id UUID) >RETURNS SETOF affinity_groups_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM affinity_groups_view > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAffinityGroupByName (v_name VARCHAR(255)) >RETURNS SETOF affinity_groups_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM affinity_groups_view > WHERE name = v_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertAffinityGroupWithMembers ( > v_id UUID, > v_name VARCHAR(255), > v_description VARCHAR(4000), > v_cluster_id UUID, > v_vm_positive BOOLEAN, > v_vm_enforcing BOOLEAN, > v_vds_positive BOOLEAN, > v_vds_enforcing BOOLEAN, > v_vms_affinity_enabled BOOLEAN, > v_vds_affinity_enabled BOOLEAN, > v_vm_ids UUID[], > v_vds_ids UUID[] > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE > o uuid; >BEGIN > INSERT INTO affinity_groups ( > id, > name, > description, > cluster_id, > vm_positive, > vm_enforcing, > vds_positive, > vds_enforcing, > vms_affinity_enabled, > vds_affinity_enabled > ) > VALUES ( > v_id, > v_name, > v_description, > v_cluster_id, > v_vm_positive, > v_vm_enforcing, > v_vds_positive, > v_vds_enforcing, > v_vms_affinity_enabled, > v_vds_affinity_enabled > ); > > FOREACH o IN ARRAY v_vm_ids > LOOP > INSERT INTO affinity_group_members( > affinity_group_id, > vm_id > ) > VALUES ( > v_id, > o > ); > END LOOP; > > FOREACH o IN ARRAY v_vds_ids > LOOP > INSERT INTO affinity_group_members( > affinity_group_id, > vds_id > ) > VALUES ( > v_id, > o > ); > END LOOP; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAffinityGroup (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM affinity_groups > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateAffinityGroupWithMembers ( > v_id UUID, > v_name VARCHAR(255), > v_description VARCHAR(4000), > v_cluster_id UUID, > v_vm_positive BOOLEAN, > v_vm_enforcing BOOLEAN, > v_vds_positive BOOLEAN, > v_vds_enforcing BOOLEAN, > v_vms_affinity_enabled BOOLEAN, > v_vds_affinity_enabled BOOLEAN, > v_vm_ids UUID[], > v_vds_ids UUID[] > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > PERFORM DeleteAffinityGroup(v_id); > > PERFORM InsertAffinityGroupWithMembers( > v_id, > v_name, > v_description, > v_cluster_id, > v_vm_positive, > v_vm_enforcing, > v_vds_positive, > v_vds_enforcing, > v_vms_affinity_enabled, > v_vds_affinity_enabled, > v_vm_ids, > v_vds_ids); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveVmFromAffinityGroups (v_vm_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM affinity_group_members > WHERE vm_id IS NOT NULL > AND vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveVdsFromAffinityGroups (v_vds_id UUID) > RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM affinity_group_members > WHERE vds_id IS NOT NULL > AND vds_id = v_vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getPositiveEnforcingAffinityGroupsByRunningVmsOnVdsId (v_vds_id UUID) >RETURNS SETOF affinity_groups_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT affinity_groups_view.* > FROM affinity_groups_view > INNER JOIN affinity_group_members > ON id = affinity_group_members.affinity_group_id > INNER JOIN vm_dynamic > ON affinity_group_members.vm_id = vm_dynamic.vm_guid > AND vm_dynamic.run_on_vds = v_vds_id > WHERE (vm_enforcing AND vm_positive AND vms_affinity_enabled) > OR (vds_enforcing AND vds_positive); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,242+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/all_disks_sp.sql... >2019-02-26 17:06:40,243+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/all_disks_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromDisks ( > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF all_disks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM all_disks > WHERE ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_disk_permissions_view > WHERE user_id = v_user_id > AND entity_id = disk_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskByDiskId ( > v_disk_id UUID, > v_user_id UUID, > v_is_filtered boolean > ) >RETURNS SETOF all_disks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM all_disks > WHERE image_group_id = v_disk_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_disk_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_disk_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDisksVmGuid ( > v_vm_guid UUID, > v_only_plugged BOOLEAN, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF all_disks_for_vms STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM all_disks_for_vms > WHERE vm_id = v_vm_guid > AND ( > NOT v_only_plugged > OR is_plugged > ) > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_disk_permissions_view > WHERE user_id = v_user_id > AND entity_id = disk_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDisksVmGuids ( > v_vm_guids UUID[] >) > RETURNS SETOF all_disks_for_vms STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM all_disks_for_vms > WHERE vm_id = ANY(v_vm_guids); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS disks_basic_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE disks_basic_rs AS ( > disk_id UUID, > disk_alias VARCHAR(255), > size BIGINT > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDisksVmGuidBasicView ( > v_vm_guid UUID, > v_only_plugged BOOLEAN, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF disks_basic_rs STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT disk_id, > disk_alias, > size > FROM images > LEFT JOIN base_disks > ON images.image_group_id = base_disks.disk_id > LEFT JOIN vm_device > ON vm_device.device_id = image_group_id > AND ( > NOT v_only_plugged > OR is_plugged > ) > WHERE vm_device.vm_id = v_vm_guid > AND images.active = true > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_disk_permissions_view > WHERE user_id = v_user_id > AND entity_id = disk_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmBootActiveDisk (v_vm_guid UUID) >RETURNS SETOF all_disks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT all_disks.* > FROM all_disks > INNER JOIN vm_device > ON vm_device.device_id = all_disks.image_group_id > INNER JOIN disk_vm_element > ON disk_vm_element.disk_id = all_disks.image_group_id > WHERE vm_device.vm_id = v_vm_guid > AND disk_vm_element.is_boot = TRUE > AND vm_device.snapshot_id IS NULL; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllAttachableDisksByPoolId ( > v_storage_pool_id UUID, > v_vm_id uuid, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF all_disks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT all_disks.* > FROM all_disks > WHERE ( > v_storage_pool_id IS NULL > OR all_disks.storage_pool_id = v_storage_pool_id > ) > AND ( > all_disks.number_of_vms = 0 > OR all_disks.shareable > ) > -- ImageStatus.ILLEGAL=4 / imagestatus IS NULL -> LunDiski / ImageStatus.Locked=2 > AND ( > all_disks.imagestatus IS NULL > OR ( > all_disks.imagestatus != 4 > AND all_disks.imagestatus != 2 > ) > ) > AND all_disks.disk_content_type = 0 -- Allow attaching of data disks only > AND ( > v_vm_id IS NULL > OR v_vm_id NOT IN ( > SELECT vm_id > FROM vm_device > WHERE vm_device.device_id = all_disks.image_group_id > ) > ) > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_disk_permissions_view > WHERE user_id = v_user_id > AND entity_id = disk_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromDisksByDiskStorageType ( > v_disk_storage_type SMALLINT, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF all_disks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM all_disks > WHERE disk_storage_type = v_disk_storage_type > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_disk_permissions_view > WHERE user_id = v_user_id > AND entity_id = disk_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromDisksIncludingSnapshots ( > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF all_disks_including_snapshots STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM all_disks_including_snapshots > WHERE ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_disk_permissions_view > WHERE user_id = v_user_id > AND entity_id = disk_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskAndSnapshotsByDiskId ( > v_disk_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF all_disks_including_snapshots STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM all_disks_including_snapshots > WHERE image_group_id = v_disk_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_disk_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_disk_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,259+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/async_tasks_sp.sql... >2019-02-26 17:06:40,261+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/async_tasks_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertasync_tasks ( > v_action_type INT, > v_result INT, > v_status INT, > v_user_id UUID, > v_vdsm_task_id UUID, > v_task_id UUID, > v_step_id UUID, > v_command_id UUID, > v_root_command_id UUID, > v_started_at TIMESTAMP WITH TIME ZONE, > v_storage_pool_id UUID, > v_async_task_type INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO async_tasks ( > action_type, > result, > status, > user_id, > vdsm_task_id, > task_id, > step_id, > command_id, > root_command_id, > started_at, > storage_pool_id, > task_type > ) > VALUES ( > v_action_type, > v_result, > v_status, > v_user_id, > v_vdsm_task_id, > v_task_id, > v_step_id, > v_command_id, > v_root_command_id, > v_started_at, > v_storage_pool_id, > v_async_task_type > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updateasync_tasks ( > v_action_type INT, > v_result INT, > v_status INT, > v_user_id UUID, > v_vdsm_task_id UUID, > v_task_id UUID, > v_step_id UUID, > v_command_id UUID, > v_root_command_id UUID, > v_storage_pool_id UUID > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE async_tasks > SET action_type = v_action_type, > result = v_result, > status = v_status, > step_id = v_step_id, > command_id = v_command_id, > root_command_id = v_root_command_id, > vdsm_task_id = v_vdsm_task_id, > storage_pool_id = v_storage_pool_id > WHERE task_id = v_task_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertOrUpdateAsyncTasks ( > v_action_type INT, > v_result INT, > v_status INT, > v_user_id UUID, > v_vdsm_task_id UUID, > v_task_id UUID, > v_step_id UUID, > v_command_id UUID, > v_root_command_id UUID, > v_started_at TIMESTAMP WITH TIME ZONE, > v_storage_pool_id UUID, > v_async_task_type INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > IF NOT EXISTS ( > SELECT 1 > FROM async_tasks > WHERE async_tasks.task_id = v_task_id > ) THEN > PERFORM Insertasync_tasks( > v_action_type, > v_result, > v_status, > v_user_id, > v_vdsm_task_id, > v_task_id, > v_step_id, > v_command_id, > v_root_command_id, > v_started_at, > v_storage_pool_id, > v_async_task_type); > ELSE > PERFORM Updateasync_tasks( > v_action_type, > v_result, > v_status, > v_user_id, > v_vdsm_task_id, > v_task_id, > v_step_id, > v_command_id, > v_root_command_id, > v_storage_pool_id); >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertAsyncTaskEntities ( > v_task_id UUID, > v_entity_id UUID, > v_entity_type VARCHAR(128) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > IF NOT EXISTS ( > SELECT 1 > FROM async_tasks_entities > WHERE async_task_id = v_task_id > AND entity_id = v_entity_id > ) THEN > INSERT INTO async_tasks_entities ( > async_task_id, > entity_id, > entity_type > ) > VALUES ( > v_task_id, > v_entity_id, > v_entity_type > ); >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAsyncTasksIdsByEntityId (v_entity_id UUID) >RETURNS SETOF idUuidType STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT async_task_id > FROM async_tasks_entities > WHERE entity_id = v_entity_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAsyncTaskEntitiesByTaskId (v_task_id UUID) >RETURNS SETOF async_tasks_entities STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM async_tasks_entities > WHERE async_task_id = v_task_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deleteasync_tasks (v_task_id UUID) >RETURNS INT AS $PROCEDURE$ >DECLARE deleted_rows INT; > >BEGIN > DELETE > FROM async_tasks > WHERE task_id = v_task_id; > > GET DIAGNOSTICS deleted_rows = ROW_COUNT; > > RETURN deleted_rows; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAsyncTasksByVdsmTaskId (v_vdsm_task_id UUID) >RETURNS INT AS $PROCEDURE$ >DECLARE deleted_rows INT; > >BEGIN > DELETE > FROM async_tasks > WHERE vdsm_task_id = v_vdsm_task_id; > > GET DIAGNOSTICS deleted_rows = ROW_COUNT; > > RETURN deleted_rows; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAsyncTasksByStoragePoolId (v_storage_pool_id UUID) >RETURNS SETOF async_tasks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM async_tasks > WHERE storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromasync_tasks () >RETURNS SETOF async_tasks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM async_tasks; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getasync_tasksBytask_id (v_task_id UUID) >RETURNS SETOF async_tasks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM async_tasks > WHERE task_id = v_task_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAsyncTasksByEntityId (v_entity_id UUID) >RETURNS SETOF async_tasks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT async_tasks.* > FROM async_tasks > INNER JOIN async_tasks_entities > ON async_task_id = task_id > WHERE entity_id = v_entity_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAsyncTasksByVdsmTaskId (v_vdsm_task_id UUID) >RETURNS SETOF async_tasks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM async_tasks > WHERE vdsm_task_id = v_vdsm_task_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,276+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/audit_log_sp.sql... >2019-02-26 17:06:40,277+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/audit_log_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertAuditLog ( > INOUT v_audit_log_id BIGINT, > v_log_time TIMESTAMP WITH TIME ZONE, > v_log_type INT, > v_log_type_name VARCHAR(100), > v_severity INT, > v_message TEXT, > v_user_id UUID, > v_user_name VARCHAR(255), > v_vds_id UUID, > v_vds_name VARCHAR(255), > v_vm_id UUID, > v_vm_name VARCHAR(255), > v_vm_template_id UUID, > v_vm_template_name VARCHAR(40), > v_storage_pool_id UUID, > v_storage_pool_name VARCHAR(40), > v_storage_domain_id UUID, > v_storage_domain_name VARCHAR(250), > v_cluster_id UUID, > v_cluster_name VARCHAR(255), > v_quota_id UUID, > v_quota_name VARCHAR(60), > v_correlation_id VARCHAR(50), > v_job_id UUID, > v_gluster_volume_id UUID, > v_gluster_volume_name VARCHAR(1000), > v_call_stack TEXT, > v_repeatable BOOLEAN, > v_brick_id UUID, > v_brick_path TEXT, > v_origin VARCHAR(25), > v_custom_event_id INT, > v_event_flood_in_sec INT, > v_custom_data TEXT > ) AS $PROCEDURE$ >DECLARE v_min_alert_severity INT; > >BEGIN > v_min_alert_severity := 10; > > -- insert regular log messages (non alerts) > IF (v_severity < v_min_alert_severity) THEN > INSERT INTO audit_log ( > LOG_TIME, > log_type, > log_type_name, > severity, > message, > user_id, > user_name, > vds_id, > vds_name, > vm_id, > vm_name, > vm_template_id, > vm_template_name, > storage_pool_id, > storage_pool_name, > storage_domain_id, > storage_domain_name, > cluster_id, > cluster_name, > correlation_id, > job_id, > quota_id, > quota_name, > gluster_volume_id, > gluster_volume_name, > call_stack, > brick_id, > brick_path, > origin, > custom_event_id, > event_flood_in_sec, > custom_data > ) > VALUES ( > v_log_time, > v_log_type, > v_log_type_name, > v_severity, > v_message, > v_user_id, > v_user_name, > v_vds_id, > v_vds_name, > v_vm_id, > v_vm_name, > v_vm_template_id, > v_vm_template_name, > v_storage_pool_id, > v_storage_pool_name, > v_storage_domain_id, > v_storage_domain_name, > v_cluster_id, > v_cluster_name, > v_correlation_id, > v_job_id, > v_quota_id, > v_quota_name, > v_gluster_volume_id, > v_gluster_volume_name, > v_call_stack, > v_brick_id, > v_brick_path, > v_origin, > v_custom_event_id, > v_event_flood_in_sec, > v_custom_data > ); > > v_audit_log_id := CURRVAL('audit_log_seq'); > > ELSE IF ( > v_repeatable > OR NOT EXISTS ( > SELECT audit_log_id > FROM audit_log > WHERE vds_name = v_vds_name > AND log_type = v_log_type > AND NOT deleted > ) > ) THEN > INSERT INTO audit_log ( > LOG_TIME, > log_type, > log_type_name, > severity, > message, > user_id, > user_name, > vds_id, > vds_name, > vm_id, > vm_name, > vm_template_id, > vm_template_name, > storage_pool_id, > storage_pool_name, > storage_domain_id, > storage_domain_name, > cluster_id, > cluster_name, > correlation_id, > job_id, > quota_id, > quota_name, > gluster_volume_id, > gluster_volume_name, > call_stack, > brick_id, > brick_path, > origin, > custom_event_id, > event_flood_in_sec, > custom_data > ) > VALUES ( > v_log_time, > v_log_type, > v_log_type_name, > v_severity, > v_message, > v_user_id, > v_user_name, > v_vds_id, > v_vds_name, > v_vm_id, > v_vm_name, > v_vm_template_id, > v_vm_template_name, > v_storage_pool_id, > v_storage_pool_name, > v_storage_domain_id, > v_storage_domain_name, > v_cluster_id, > v_cluster_name, > v_correlation_id, > v_job_id, > v_quota_id, > v_quota_name, > v_gluster_volume_id, > v_gluster_volume_name, > v_call_stack, > v_brick_id, > v_brick_path, > v_origin, > v_custom_event_id, > v_event_flood_in_sec, > v_custom_data > ); > > v_audit_log_id := CURRVAL('audit_log_seq'); > ELSE > > SELECT audit_log_id > INTO v_audit_log_id > FROM audit_log > WHERE vds_name = v_vds_name > AND log_type = v_log_type; > END IF; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAuditLog (v_audit_log_id BIGINT) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE audit_log > SET deleted = true > WHERE audit_log_id = v_audit_log_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION ClearAllAuditLogEvents (v_severity INT) >RETURNS VOID AS $PROCEDURE$ >BEGIN > > UPDATE audit_log > SET deleted = true > FROM ( SELECT * FROM audit_log > WHERE severity != v_severity > AND NOT deleted > FOR UPDATE) AS s > WHERE audit_log.audit_log_id = s.audit_log_id; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DisplayAllAuditLogEvents (v_severity INT) >RETURNS VOID AS $PROCEDURE$ >BEGIN > > UPDATE audit_log > SET deleted = false > FROM ( SELECT * FROM audit_log > WHERE severity != v_severity > AND deleted > FOR UPDATE) AS s > WHERE audit_log.audit_log_id = s.audit_log_id; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION SetAllAuditLogAlerts ( > v_severity INT, > v_value BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > > > UPDATE audit_log > SET deleted = v_value > FROM ( SELECT * FROM audit_log > WHERE severity = v_severity > AND deleted != v_value > FOR UPDATE) AS s > WHERE audit_log.audit_log_id = s.audit_log_id; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromAuditLog ( > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF audit_log STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM audit_log a > WHERE NOT deleted > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view pv, > user_object_permissions_view dpv > WHERE pv.user_id = v_user_id > AND pv.entity_id = a.vm_id > AND pv.entity_id = dpv.entity_id > ) > OR EXISTS ( > SELECT 1 > FROM user_vm_template_permissions_view pv, > user_object_permissions_view dpv > WHERE pv.user_id = v_user_id > AND pv.entity_id = a.vm_template_id > AND pv.entity_id = dpv.entity_id > ) > OR EXISTS ( > SELECT 1 > FROM user_vds_permissions_view pv, > user_object_permissions_view dpv > WHERE pv.user_id = v_user_id > AND pv.entity_id = a.vds_id > AND pv.entity_id = dpv.entity_id > ) > OR EXISTS ( > SELECT 1 > FROM user_storage_pool_permissions_view pv, > user_object_permissions_view dpv > WHERE pv.user_id = v_user_id > AND pv.entity_id = a.storage_pool_id > AND pv.entity_id = dpv.entity_id > ) > OR EXISTS ( > SELECT 1 > FROM user_storage_domain_permissions_view pv, > user_object_permissions_view dpv > WHERE pv.user_id = v_user_id > AND pv.entity_id = a.storage_domain_id > AND pv.entity_id = dpv.entity_id > ) > OR EXISTS ( > SELECT 1 > FROM user_cluster_permissions_view pv, > user_object_permissions_view dpv > WHERE pv.user_id = v_user_id > AND pv.entity_id = a.cluster_id > AND pv.entity_id = dpv.entity_id > ) > ) > ORDER BY audit_log_id DESC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAuditLogByAuditLogId (v_audit_log_id BIGINT) >RETURNS SETOF audit_log STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM audit_log > WHERE audit_log_id = v_audit_log_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAuditLogByVMId ( > v_vm_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF audit_log STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM audit_log > WHERE NOT deleted > AND vm_id = v_vm_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id > AND entity_id = vm_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAuditLogByVMTemplateId ( > v_vm_template_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF audit_log STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM audit_log > WHERE NOT deleted > AND vm_template_id = v_vm_template_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_template_permissions_view > WHERE user_id = v_user_id > AND entity_id = vm_template_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveAuditLogByBrickIdLogType ( > v_brick_id UUID, > v_audit_log_type INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE audit_log > SET deleted = true > WHERE brick_id = v_brick_id > AND log_type = v_audit_log_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAuditLogLaterThenDate (v_date TIMESTAMP WITH TIME ZONE) >RETURNS SETOF audit_log STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM audit_log > WHERE NOT deleted > AND LOG_TIME >= v_date; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAuditLogOlderThenDate (v_date TIMESTAMP WITH TIME ZONE) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_id BIGINT; > >SWV_RowCount INT; > >BEGIN > -- get first the id from which to remove in order to use index > SELECT audit_log_id > INTO v_id > FROM audit_log > WHERE LOG_TIME < v_date > ORDER BY audit_log_id DESC LIMIT 1; > > -- check if there are candidates to remove > GET DIAGNOSTICS SWV_RowCount = ROW_COUNT; > > IF (SWV_RowCount > 0) THEN > DELETE > FROM audit_log > WHERE audit_log_id <= v_id; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAuditAlertLogByVdsIDAndType ( > v_vds_id UUID, > v_log_type INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE audit_log > SET deleted = true > WHERE vds_id = v_vds_id > AND log_type = v_log_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteBackupRelatedAlerts () >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE audit_log > SET deleted = true > WHERE origin = 'oVirt' > AND log_type IN ( > 9022, > 9023, > 9026 > );-- (ENGINE_NO_FULL_BACKUP, ENGINE_NO_WARM_BACKUP, ENGINE_BACKUP_FAILED) >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAuditAlertLogByVolumeIDAndType ( > v_gluster_volume_id UUID, > v_log_type INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE audit_log > SET deleted = true > WHERE gluster_volume_id = v_gluster_volume_id > AND log_type = v_log_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAuditLogAlertsByVdsID ( > v_vds_id UUID, > v_delete_config_alerts BOOLEAN = true > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_min_alert_severity INT; > >v_no_config_alret_type INT; > >v_no_max_alret_type INT; > >BEGIN > v_min_alert_severity := 10; > > v_no_config_alret_type := 9000; > > v_no_max_alret_type := 9005; > > IF (v_delete_config_alerts = true) THEN > UPDATE audit_log > SET deleted = true > WHERE vds_id = v_vds_id > AND severity >= v_min_alert_severity > AND log_type BETWEEN v_no_config_alret_type > AND v_no_max_alret_type; > ELSE > UPDATE audit_log > SET deleted = true > WHERE vds_id = v_vds_id > AND severity >= v_min_alert_severity > AND log_type BETWEEN v_no_config_alret_type + 1 > AND v_no_max_alret_type; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/* >Used to find out how many seconds to wait after Start/Stop/Restart PM operations >v_vds_name - The host name >v_event - The event [USER_VDS_STOP | USER_VDS_START | USER_VDS_RESTART] >v_wait_for_sec - Configurable time in seconds to wait from last operation. >Returns : The number of seconds we have to wait (negative value means we can do the operation immediately) >*/ >CREATE OR REPLACE FUNCTION get_seconds_to_wait_before_pm_operation ( > v_vds_name VARCHAR(255), > v_event VARCHAR(100), > v_wait_for_sec INT > ) >RETURNS INT STABLE AS $PROCEDURE$ >DECLARE v_last_event_dt TIMESTAMP >WITH TIME zone; >DECLARE v_now_dt TIMESTAMP >WITH TIME zone; > >BEGIN > IF EXISTS ( > SELECT 1 > FROM audit_log > WHERE vds_name = v_vds_name > AND log_type_name = v_event > ) THEN > BEGIN > v_last_event_dt := log_time > FROM audit_log > WHERE vds_name = v_vds_name > AND log_type_name = v_event > ORDER BY audit_log_id DESC limit 1; > > v_now_dt := CURRENT_TIMESTAMP; > > RETURN cast((extract(epoch FROM v_last_event_dt) + v_wait_for_sec) - extract(epoch FROM v_now_dt) AS INT); > END; > ELSE > RETURN 0; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAuditLogByOriginAndCustomEventId ( > v_origin VARCHAR(255), > v_custom_event_id INT > ) >RETURNS SETOF audit_log STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM audit_log > WHERE origin = v_origin > AND custom_event_id = v_custom_event_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAuditLogByVolumeIdAndType ( > v_gluster_volume_id UUID, > v_log_type INT > ) >RETURNS SETOF audit_log STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM audit_log > WHERE gluster_volume_id = v_gluster_volume_id > AND log_type = v_log_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,296+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/base_disks_sp.sql... >2019-02-26 17:06:40,298+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/base_disks_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertBaseDisk ( > v_disk_id UUID, > v_wipe_after_delete BOOLEAN, > v_propagate_errors VARCHAR(32), > v_disk_alias VARCHAR(50), > v_disk_description VARCHAR(500), > v_shareable BOOLEAN, > v_sgio INT, > v_disk_storage_type SMALLINT, > v_cinder_volume_type VARCHAR(255), > v_disk_content_type SMALLINT, > v_backup VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO base_disks ( > disk_id, > wipe_after_delete, > propagate_errors, > disk_alias, > disk_description, > shareable, > sgio, > disk_storage_type, > cinder_volume_type, > disk_content_type, > backup > ) > VALUES ( > v_disk_id, > v_wipe_after_delete, > v_propagate_errors, > v_disk_alias, > v_disk_description, > v_shareable, > v_sgio, > v_disk_storage_type, > v_cinder_volume_type, > v_disk_content_type, > v_backup > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateBaseDisk ( > v_disk_id UUID, > v_wipe_after_delete BOOLEAN, > v_propagate_errors VARCHAR(32), > v_disk_alias VARCHAR(50), > v_disk_description VARCHAR(500), > v_shareable BOOLEAN, > v_sgio INT, > v_disk_storage_type SMALLINT, > v_cinder_volume_type VARCHAR(255), > v_disk_content_type SMALLINT, > v_backup VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE base_disks > SET wipe_after_delete = v_wipe_after_delete, > propagate_errors = v_propagate_errors, > disk_alias = v_disk_alias, > disk_description = v_disk_description, > shareable = v_shareable, > sgio = v_sgio, > disk_storage_type = v_disk_storage_type, > cinder_volume_type = v_cinder_volume_type, > disk_content_type = v_disk_content_type, > backup = v_backup > WHERE disk_id = v_disk_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteBaseDisk (v_disk_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > DELETE > FROM base_disks > WHERE disk_id = v_disk_id; > > -- Delete the disk's permissions > PERFORM DeletePermissionsByEntityId(v_disk_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromBaseDisks () >RETURNS SETOF base_disks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM base_disks; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetBaseDiskByBaseDiskId (v_disk_id UUID) >RETURNS SETOF base_disks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM base_disks > WHERE disk_id = v_disk_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetBaseDisksByAlias(v_disk_alias varchar(255)) >RETURNS SETOF base_disks STABLE >AS $procedure$ >BEGIN > RETURN QUERY > SELECT * > FROM base_disks > WHERE disk_alias = v_disk_alias; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,310+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/bookmarks_sp.sql... >2019-02-26 17:06:40,312+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/bookmarks_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertBookmark ( > v_bookmark_id UUID, > v_bookmark_name VARCHAR(40), > v_bookmark_value VARCHAR(300) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO bookmarks ( > bookmark_Id, > bookmark_name, > bookmark_value > ) > VALUES ( > v_bookmark_id, > v_bookmark_name, > v_bookmark_value > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateBookmark ( > v_bookmark_id UUID, > v_bookmark_name VARCHAR(40), > v_bookmark_value VARCHAR(300) > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE bookmarks > SET bookmark_name = v_bookmark_name, > bookmark_value = v_bookmark_value > WHERE bookmark_Id = v_bookmark_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteBookmark (v_bookmark_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM bookmarks > WHERE bookmark_Id = v_bookmark_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromBookmarks () >RETURNS SETOF bookmarks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM bookmarks; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetBookmarkBybookmark_name (v_bookmark_name VARCHAR(40)) >RETURNS SETOF bookmarks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM bookmarks > WHERE bookmark_name = v_bookmark_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetBookmarkBybookmark_id (v_bookmark_id UUID) >RETURNS SETOF bookmarks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM bookmarks > WHERE bookmark_Id = v_bookmark_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,324+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/business_entity_snapshot_sp.sql... >2019-02-26 17:06:40,325+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/business_entity_snapshot_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION insert_entity_snapshot ( > v_id uuid, > v_command_id uuid, > v_command_type VARCHAR, > v_entity_id VARCHAR, > v_entity_type VARCHAR, > v_entity_snapshot TEXT, > v_snapshot_class VARCHAR, > v_snapshot_type INT, > v_insertion_order INT > ) >RETURNS void AS $PROCEDURE$ >BEGIN > BEGIN > INSERT INTO business_entity_snapshot ( > id, > command_id, > command_type, > entity_id, > entity_type, > entity_snapshot, > snapshot_class, > snapshot_type, > insertion_order > ) > VALUES ( > v_id, > v_command_id, > v_command_type, > v_entity_id, > v_entity_type, > v_entity_snapshot, > v_snapshot_class, > v_snapshot_type, > v_insertion_order > ); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION get_entity_snapshot_by_id (v_id uuid) >RETURNS SETOF business_entity_snapshot STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT business_entity_snapshot.* > FROM business_entity_snapshot > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION get_entity_snapshot_by_command_id (v_command_id uuid) >RETURNS SETOF business_entity_snapshot STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT business_entity_snapshot.* > FROM business_entity_snapshot > WHERE command_id = v_command_id > ORDER BY insertion_order DESC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS get_all_commands_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE get_all_commands_rs AS ( > command_id UUID, > command_type VARCHAR(256) > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION get_all_commands () >RETURNS SETOF get_all_commands_rs STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT business_entity_snapshot.command_id, > business_entity_snapshot.command_type > FROM business_entity_snapshot; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION delete_entity_snapshot_by_command_id (v_command_id uuid) >RETURNS void AS $PROCEDURE$ >BEGIN > BEGIN > DELETE > FROM business_entity_snapshot > WHERE command_id = v_command_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,338+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/cluster_features_sp.sql... >2019-02-26 17:06:40,340+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/cluster_features_sp.sql >********* QUERY ********** >/* ---------------------------------------------------------------- > Stored procedures for database operations on Cluster Features > related tables: cluster_features, supported_cluster_features, supported_host_features >----------------------------------------------------------------*/ >CREATE OR REPLACE FUNCTION InsertClusterFeature ( > v_feature_id UUID, > v_feature_name VARCHAR(256), > v_version VARCHAR(40), > v_category INT, > v_description TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO cluster_features ( > feature_id, > feature_name, > version, > category, > description > ) > VALUES ( > v_feature_id, > v_feature_name, > v_version, > v_category, > v_description > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateClusterFeature ( > v_feature_id UUID, > v_feature_name VARCHAR(256), > v_version VARCHAR(40), > v_category INT, > v_description TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE cluster_features > SET feature_name = v_feature_name, > version = v_version, > description = v_description, > category = v_category > WHERE feature_id = v_feature_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClusterFeaturesByVersionAndCategory ( > v_version VARCHAR(256), > v_category INT > ) >RETURNS SETOF cluster_features STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM cluster_features > WHERE cluster_features.version = v_version > AND (cluster_features.category & v_category) > 0; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetSupportedClusterFeature ( > v_feature_id UUID, > v_cluster_id UUID > ) >RETURNS SETOF supported_cluster_features_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM supported_cluster_features_view > WHERE feature_id = v_feature_id > AND cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllSupportedClusterFeatures () >RETURNS SETOF supported_cluster_features_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM supported_cluster_features_view; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertSupportedClusterFeature ( > v_feature_id UUID, > v_cluster_id UUID, > v_is_enabled BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO supported_cluster_features ( > cluster_id, > feature_id, > is_enabled > ) > VALUES ( > v_cluster_id, > v_feature_id, > v_is_enabled > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateSupportedClusterFeature ( > v_feature_id UUID, > v_cluster_id UUID, > v_is_enabled BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE supported_cluster_features > SET is_enabled = v_is_enabled > WHERE cluster_id = v_cluster_id > AND feature_id = v_feature_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteSupportedClusterFeature ( > v_feature_id UUID, > v_cluster_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM supported_cluster_features > WHERE cluster_id = v_cluster_id > AND feature_id = v_feature_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetSupportedClusterFeaturesByClusterId (v_cluster_id UUID) >RETURNS SETOF supported_cluster_features_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM supported_cluster_features_view > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertSupportedHostFeature ( > v_host_id UUID, > v_feature_name VARCHAR(256) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO supported_host_features ( > host_id, > feature_name > ) > VALUES ( > v_host_id, > v_feature_name > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetSupportedHostFeaturesByHostId (v_host_id UUID) >RETURNS SETOF supported_host_features STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM supported_host_features > WHERE host_id = v_host_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveSupportedHostFeature ( > v_host_id UUID, > v_feature_name VARCHAR(256) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM supported_host_features > WHERE host_id = v_host_id > AND feature_name = v_feature_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,355+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/cluster_policy_sp.sql... >2019-02-26 17:06:40,356+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/cluster_policy_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromClusterPolicys () >RETURNS SETOF cluster_policies STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM cluster_policies; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClusterPolicyByClusterPolicyId (v_id UUID) >RETURNS SETOF cluster_policies STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM cluster_policies > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertClusterPolicy ( > v_id UUID, > v_name VARCHAR(128), > v_description VARCHAR(4000), > v_is_locked BOOLEAN, > v_is_default BOOLEAN, > v_custom_properties TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO cluster_policies ( > id, > name, > description, > is_locked, > is_default, > custom_properties > ) > VALUES ( > v_id, > v_name, > v_description, > v_is_locked, > v_is_default, > v_custom_properties > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateClusterPolicy ( > v_id UUID, > v_name VARCHAR(128), > v_description VARCHAR(4000), > v_is_locked BOOLEAN, > v_is_default BOOLEAN, > v_custom_properties TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE cluster_policies > SET name = v_name, > description = v_description, > is_locked = v_is_locked, > is_default = v_is_default, > custom_properties = v_custom_properties > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteClusterPolicy (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM cluster_policies > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromClusterPolicyUnits () >RETURNS SETOF cluster_policy_units STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM cluster_policy_units; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClusterPolicyUnitsByClusterPolicyId (v_id UUID) >RETURNS SETOF cluster_policy_units STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM cluster_policy_units > WHERE cluster_policy_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteClusterPolicyUnitsByClusterPolicyId (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM cluster_policy_units > WHERE cluster_policy_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertClusterPolicyUnit ( > v_cluster_policy_id UUID, > v_policy_unit_id UUID, > v_filter_sequence INT, > v_factor INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO cluster_policy_units ( > cluster_policy_id, > policy_unit_id, > filter_sequence, > factor > ) > VALUES ( > v_cluster_policy_id, > v_policy_unit_id, > v_filter_sequence, > v_factor > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,370+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/clusters_sp.sql... >2019-02-26 17:06:40,371+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/clusters_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertCluster ( > v_cluster_id UUID, > v_description VARCHAR(4000), > v_free_text_comment TEXT, > v_name VARCHAR(40), > v_cpu_name VARCHAR(255), > v_storage_pool_id UUID, > v_max_vds_memory_over_commit INT, > v_count_threads_as_cores BOOLEAN, > v_compatibility_version VARCHAR(40), > v_transparent_hugepages BOOLEAN, > v_migrate_on_error INT, > v_virt_service BOOLEAN, > v_gluster_service BOOLEAN, > v_tunnel_migration BOOLEAN, > v_emulated_machine VARCHAR(40), > v_detect_emulated_machine BOOLEAN, > v_trusted_service BOOLEAN, > v_ha_reservation BOOLEAN, > v_cluster_policy_id UUID, > v_cluster_policy_custom_properties TEXT, > v_enable_balloon BOOLEAN, > v_architecture INT, > v_optimization_type SMALLINT, > v_spice_proxy VARCHAR(255), > v_enable_ksm BOOLEAN, > v_serial_number_policy SMALLINT, > v_custom_serial_number VARCHAR(255), > v_additional_rng_sources VARCHAR(255), > v_skip_fencing_if_sd_active BOOLEAN, > v_skip_fencing_if_connectivity_broken BOOLEAN, > v_hosts_with_broken_connectivity_threshold SMALLINT, > v_fencing_enabled BOOLEAN, > v_is_auto_converge BOOLEAN, > v_is_migrate_compressed BOOLEAN, > v_gluster_tuned_profile VARCHAR(50), > v_ksm_merge_across_nodes BOOLEAN, > v_migration_bandwidth_limit_type VARCHAR(16), > v_custom_migration_bandwidth_limit INT, > v_migration_policy_id UUID, > v_mac_pool_id UUID, > v_switch_type VARCHAR(6), > v_skip_fencing_if_gluster_bricks_up BOOLEAN, > v_skip_fencing_if_gluster_quorum_not_met BOOLEAN, > v_firewall_type INT, > v_default_network_provider_id UUID, > v_log_max_memory_used_threshold INT, > v_log_max_memory_used_threshold_type SMALLINT, > v_vnc_encryption_enabled BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO cluster ( > cluster_id, > description, > name, > free_text_comment, > cpu_name, > storage_pool_id, > max_vds_memory_over_commit, > count_threads_as_cores, > compatibility_version, > transparent_hugepages, > migrate_on_error, > virt_service, > gluster_service, > tunnel_migration, > emulated_machine, > detect_emulated_machine, > trusted_service, > ha_reservation, > cluster_policy_id, > cluster_policy_custom_properties, > enable_balloon, > architecture, > optimization_type, > spice_proxy, > enable_ksm, > serial_number_policy, > custom_serial_number, > additional_rng_sources, > skip_fencing_if_sd_active, > skip_fencing_if_connectivity_broken, > hosts_with_broken_connectivity_threshold, > fencing_enabled, > is_auto_converge, > is_migrate_compressed, > gluster_tuned_profile, > ksm_merge_across_nodes, > migration_bandwidth_limit_type, > custom_migration_bandwidth_limit, > migration_policy_id, > mac_pool_id, > switch_type, > skip_fencing_if_gluster_bricks_up, > skip_fencing_if_gluster_quorum_not_met, > firewall_type, > default_network_provider_id, > log_max_memory_used_threshold, > log_max_memory_used_threshold_type, > vnc_encryption_enabled > ) > VALUES ( > v_cluster_id, > v_description, > v_name, > v_free_text_comment, > v_cpu_name, > v_storage_pool_id, > v_max_vds_memory_over_commit, > v_count_threads_as_cores, > v_compatibility_version, > v_transparent_hugepages, > v_migrate_on_error, > v_virt_service, > v_gluster_service, > v_tunnel_migration, > v_emulated_machine, > v_detect_emulated_machine, > v_trusted_service, > v_ha_reservation, > v_cluster_policy_id, > v_cluster_policy_custom_properties, > v_enable_balloon, > v_architecture, > v_optimization_type, > v_spice_proxy, > v_enable_ksm, > v_serial_number_policy, > v_custom_serial_number, > v_additional_rng_sources, > v_skip_fencing_if_sd_active, > v_skip_fencing_if_connectivity_broken, > v_hosts_with_broken_connectivity_threshold, > v_fencing_enabled, > v_is_auto_converge, > v_is_migrate_compressed, > v_gluster_tuned_profile, > v_ksm_merge_across_nodes, > v_migration_bandwidth_limit_type, > v_custom_migration_bandwidth_limit, > v_migration_policy_id, > v_mac_pool_id, > v_switch_type, > v_skip_fencing_if_gluster_bricks_up, > v_skip_fencing_if_gluster_quorum_not_met, > v_firewall_type, > v_default_network_provider_id, > v_log_max_memory_used_threshold, > v_log_max_memory_used_threshold_type, > v_vnc_encryption_enabled > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateCluster ( > v_description VARCHAR(4000), > v_free_text_comment TEXT, > v_name VARCHAR(40), > v_cluster_id UUID, > v_cpu_name VARCHAR(255), > v_storage_pool_id UUID, > v_max_vds_memory_over_commit INT, > v_count_threads_as_cores BOOLEAN, > v_compatibility_version VARCHAR(40), > v_transparent_hugepages BOOLEAN, > v_migrate_on_error INT, > v_virt_service BOOLEAN, > v_gluster_service BOOLEAN, > v_gluster_cli_based_snapshot_scheduled BOOLEAN, > v_tunnel_migration BOOLEAN, > v_emulated_machine VARCHAR(40), > v_detect_emulated_machine BOOLEAN, > v_trusted_service BOOLEAN, > v_ha_reservation BOOLEAN, > v_cluster_policy_id UUID, > v_cluster_policy_custom_properties TEXT, > v_enable_balloon BOOLEAN, > v_architecture INT, > v_optimization_type SMALLINT, > v_spice_proxy VARCHAR(255), > v_enable_ksm BOOLEAN, > v_serial_number_policy SMALLINT, > v_custom_serial_number VARCHAR(255), > v_additional_rng_sources VARCHAR(255), > v_skip_fencing_if_sd_active BOOLEAN, > v_skip_fencing_if_connectivity_broken BOOLEAN, > v_hosts_with_broken_connectivity_threshold SMALLINT, > v_fencing_enabled BOOLEAN, > v_is_auto_converge BOOLEAN, > v_is_migrate_compressed BOOLEAN, > v_gluster_tuned_profile VARCHAR(50), > v_ksm_merge_across_nodes BOOLEAN, > v_migration_bandwidth_limit_type VARCHAR(16), > v_custom_migration_bandwidth_limit INT, > v_migration_policy_id UUID, > v_mac_pool_id UUID, > v_switch_type VARCHAR(6), > v_skip_fencing_if_gluster_bricks_up BOOLEAN, > v_skip_fencing_if_gluster_quorum_not_met BOOLEAN, > v_firewall_type INT, > v_default_network_provider_id UUID, > v_log_max_memory_used_threshold INT, > v_log_max_memory_used_threshold_type SMALLINT, > v_vnc_encryption_enabled BOOLEAN > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE cluster > SET description = v_description, > free_text_comment = v_free_text_comment, > name = v_name, > cpu_name = v_cpu_name, > storage_pool_id = v_storage_pool_id, > _update_date = LOCALTIMESTAMP, > max_vds_memory_over_commit = v_max_vds_memory_over_commit, > count_threads_as_cores = v_count_threads_as_cores, > compatibility_version = v_compatibility_version, > transparent_hugepages = v_transparent_hugepages, > migrate_on_error = v_migrate_on_error, > virt_service = v_virt_service, > gluster_service = v_gluster_service, > tunnel_migration = v_tunnel_migration, > gluster_cli_based_snapshot_scheduled = v_gluster_cli_based_snapshot_scheduled, > emulated_machine = v_emulated_machine, > detect_emulated_machine = v_detect_emulated_machine, > trusted_service = v_trusted_service, > ha_reservation = v_ha_reservation, > cluster_policy_id = v_cluster_policy_id, > cluster_policy_custom_properties = v_cluster_policy_custom_properties, > enable_balloon = v_enable_balloon, > architecture = v_architecture, > optimization_type = v_optimization_type, > spice_proxy = v_spice_proxy, > enable_ksm = v_enable_ksm, > serial_number_policy = v_serial_number_policy, > custom_serial_number = v_custom_serial_number, > additional_rng_sources = v_additional_rng_sources, > skip_fencing_if_sd_active = v_skip_fencing_if_sd_active, > skip_fencing_if_connectivity_broken = v_skip_fencing_if_connectivity_broken, > hosts_with_broken_connectivity_threshold = v_hosts_with_broken_connectivity_threshold, > fencing_enabled = v_fencing_enabled, > is_auto_converge = v_is_auto_converge, > is_migrate_compressed = v_is_migrate_compressed, > gluster_tuned_profile = v_gluster_tuned_profile, > ksm_merge_across_nodes = v_ksm_merge_across_nodes, > migration_bandwidth_limit_type = v_migration_bandwidth_limit_type, > custom_migration_bandwidth_limit = v_custom_migration_bandwidth_limit, > migration_policy_id = v_migration_policy_id, > mac_pool_id = v_mac_pool_id, > switch_type = v_switch_type, > skip_fencing_if_gluster_bricks_up = v_skip_fencing_if_gluster_bricks_up, > skip_fencing_if_gluster_quorum_not_met = v_skip_fencing_if_gluster_quorum_not_met, > firewall_type = v_firewall_type, > default_network_provider_id = v_default_network_provider_id, > log_max_memory_used_threshold = v_log_max_memory_used_threshold, > log_max_memory_used_threshold_type = v_log_max_memory_used_threshold_type, > vnc_encryption_enabled = v_vnc_encryption_enabled > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteCluster (v_cluster_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT cluster_id > INTO v_val > FROM cluster > WHERE cluster_id = v_cluster_id > FOR UPDATE; > > DELETE > FROM cluster > WHERE cluster_id = v_cluster_id; > > -- delete VDS group permissions -- > PERFORM DeletePermissionsByEntityId(v_cluster_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromCluster ( > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_cluster_permissions_view > WHERE user_id = v_user_id > AND entity_id = cluster_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClusterByClusterId ( > v_cluster_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE cluster_id = v_cluster_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_cluster_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_cluster_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClusterByClusterName ( > v_cluster_name VARCHAR(40), > v_is_case_sensitive BOOLEAN > ) >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE name = v_cluster_name > OR ( > NOT v_is_case_sensitive > AND name ilike v_cluster_name > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClusterForUserByClusterName ( > v_cluster_name VARCHAR(40), > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE name = v_cluster_name > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_cluster_permissions_view > WHERE user_id = v_user_id > AND entity_id = cluster_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClustersByStoragePoolId ( > v_storage_pool_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE storage_pool_id = v_storage_pool_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_cluster_permissions_view > WHERE user_id = v_user_id > AND entity_id = cluster_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClusterWithRunningVms (v_cluster_id UUID) >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE cluster_id = v_cluster_id > AND cluster_id IN ( > SELECT cluster_id > FROM vms > WHERE vms.status NOT IN ( > 0, > 13, > 14 > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClustersWithoutMigratingVms () >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE cluster_id NOT IN ( > SELECT s.cluster_id > FROM vm_static s > INNER JOIN vm_dynamic d > ON s.vm_guid = d.vm_guid > WHERE d.status IN ( > 5, > 6 > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetIsClusterEmpty (v_cluster_id UUID) >RETURNS BOOLEAN AS $PROCEDURE$ >BEGIN > RETURN NOT EXISTS ( > SELECT 1 > FROM vm_static > WHERE cluster_id = v_cluster_id > AND vm_guid != '00000000-0000-0000-0000-000000000000' > ) > AND NOT EXISTS ( > SELECT 1 > FROM vds_static > WHERE cluster_id = v_cluster_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_perms_get_clusters_with_permitted_action ( > v_user_id UUID, > v_action_group_id INT > ) >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE ( > SELECT 1 > FROM get_entity_permissions(v_user_id, v_action_group_id, cluster_view.cluster_id, 9) > ) IS NOT NULL; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClustersHavingHosts () >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE EXISTS ( > SELECT 1 > FROM vds_static > WHERE cluster_id = cluster_view.cluster_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateClusterEmulatedMachine ( > v_cluster_id UUID, > v_emulated_machine VARCHAR(40), > v_detect_emulated_machine BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE cluster > SET emulated_machine = v_emulated_machine, > detect_emulated_machine = v_detect_emulated_machine > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetTrustedClusters () >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE trusted_service; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClustersByClusterPolicyId (v_cluster_policy_id UUID) >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE cluster_policy_id = v_cluster_policy_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNumberOfVmsInCluster (v_cluster_id UUID) >RETURNS SETOF BIGINT STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT COUNT(vms.*) > FROM vm_static vms > WHERE vms.cluster_id = v_cluster_id > AND vms.entity_type = 'VM'; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS host_vm_cluster_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE host_vm_cluster_rs AS ( > cluster_id UUID, > hosts BIGINT, > vms BIGINT > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetHostsAndVmsForClusters (v_cluster_ids UUID []) >RETURNS SETOF host_vm_cluster_rs STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT groups.cluster_id, > ( > SELECT COUNT(DISTINCT vds.vds_id) > FROM vds_static vds > WHERE vds.cluster_id = groups.cluster_id > ) AS host_count, > ( > SELECT COUNT(DISTINCT vms.vm_guid) > FROM vm_static vms > WHERE vms.cluster_id = groups.cluster_id > AND vms.entity_type::TEXT = 'VM'::TEXT > ) AS vm_count > FROM cluster groups > WHERE groups.cluster_id = ANY (v_cluster_ids) > GROUP BY groups.cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetClustersByServiceAndCompatibilityVersion ( > v_gluster_service BOOLEAN, > v_virt_service BOOLEAN, > v_compatibility_version VARCHAR(40) > ) >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cluster_view.* > FROM cluster_view > WHERE virt_service = v_virt_service > AND gluster_service = v_gluster_service > AND compatibility_version = v_compatibility_version; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllClustersByMacPoolId (v_id UUID) >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cv.* > FROM cluster_view cv > WHERE cv.mac_pool_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllClustersByDefaultNetworkProviderId (v_id UUID) >RETURNS SETOF cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT cv.* > FROM cluster_view cv > WHERE cv.default_network_provider_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,392+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/command_entities_sp.sql... >2019-02-26 17:06:40,393+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/command_entities_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertCommandEntity ( > v_user_id uuid, > v_engine_session_seq_id BIGINT, > v_command_id uuid, > v_command_type INT, > v_parent_command_id uuid, > v_root_command_id uuid, > v_command_context TEXT, > v_command_parameters TEXT, > v_command_params_class VARCHAR(256), > v_created_at TIMESTAMP WITH TIME ZONE, > v_status VARCHAR(20), > v_executed boolean, > v_callback_enabled boolean, > v_return_value TEXT, > v_return_value_class VARCHAR(256), > v_data TEXT > ) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > INSERT INTO command_entities ( > user_id, > engine_session_seq_id, > command_id, > command_type, > parent_command_id, > root_command_id, > command_context, > command_parameters, > command_params_class, > created_at, > status, > executed, > callback_enabled, > return_value, > return_value_class, > data > ) > VALUES ( > v_user_id, > v_engine_session_seq_id, > v_command_id, > v_command_type, > v_parent_command_id, > v_root_command_id, > v_command_context, > v_command_parameters, > v_command_params_class, > NOW(), > v_status, > v_executed, > v_callback_enabled, > v_return_value, > v_return_value_class, > v_data > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateCommandEntity ( > v_user_id uuid, > v_engine_session_seq_id BIGINT, > v_command_id uuid, > v_command_type INT, > v_parent_command_id uuid, > v_root_command_id uuid, > v_command_context TEXT, > v_command_parameters TEXT, > v_command_params_class VARCHAR(256), > v_status VARCHAR(20), > v_executed boolean, > v_callback_enabled boolean, > v_return_value TEXT, > v_return_value_class VARCHAR(256), > v_data TEXT > ) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > UPDATE command_entities > SET command_type = v_command_type, > user_id = v_user_id, > engine_session_seq_id = v_engine_session_seq_id, > parent_command_id = v_parent_command_id, > root_command_id = v_root_command_id, > command_context = v_command_context, > command_parameters = v_command_parameters, > command_params_class = v_command_params_class, > status = v_status, > executed = v_executed, > callback_enabled = v_callback_enabled, > return_value = v_return_value, > return_value_class = v_return_value_class, > data = v_data > WHERE command_id = v_command_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateCommandEntityStatus ( > v_command_id uuid, > v_status VARCHAR(20) > ) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > UPDATE command_entities > SET status = v_status > WHERE command_id = v_command_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateCommandEntityExecuted ( > v_command_id uuid, > v_executed boolean > ) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > UPDATE command_entities > SET executed = v_executed > WHERE command_id = v_command_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateCommandEntityNotified ( > v_command_id uuid, > v_callback_notified boolean > ) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > UPDATE command_entities > SET callback_notified = v_callback_notified > WHERE command_id = v_command_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertOrUpdateCommandEntity ( > v_user_id uuid, > v_engine_session_seq_id BIGINT, > v_command_id uuid, > v_command_type INT, > v_parent_command_id uuid, > v_root_command_id uuid, > v_command_context TEXT, > v_command_parameters TEXT, > v_command_params_class VARCHAR(256), > v_created_at TIMESTAMP WITH TIME ZONE, > v_status VARCHAR(20), > v_executed boolean, > v_callback_enabled boolean, > v_return_value TEXT, > v_return_value_class VARCHAR(256), > v_data TEXT > ) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > IF NOT EXISTS ( > SELECT 1 > FROM command_entities > WHERE command_id = v_command_id > ) THEN > PERFORM InsertCommandEntity( > v_user_id, > v_engine_session_seq_id, > v_command_id, > v_command_type, > v_parent_command_id, > v_root_command_id, > v_command_context, > v_command_parameters, > v_command_params_class, > v_created_at, > v_status, > v_executed, > v_callback_enabled, > v_return_value, > v_return_value_class, > v_data); > ELSE > PERFORM UpdateCommandEntity( > v_user_id, > v_engine_session_seq_id, > v_command_id, > v_command_type, > v_parent_command_id, > v_root_command_id, > v_command_context, > v_command_parameters, > v_command_params_class, > v_status, > v_executed, > v_callback_enabled, > v_return_value, > v_return_value_class, > v_data); > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetCommandEntityByCommandEntityId (v_command_id uuid) >RETURNS SETOF command_entities AS $PROCEDURE$ > >BEGIN > RETURN QUERY > > SELECT command_entities.* > FROM command_entities > WHERE command_id = v_command_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromCommandEntities () >RETURNS SETOF command_entities AS $PROCEDURE$ > >BEGIN > RETURN QUERY > > SELECT * > FROM command_entities; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetCommandEntitiesByParentCmdId (v_root_command_id uuid) >RETURNS SETOF command_entities STABLE AS $PROCEDURE$ > >BEGIN > RETURN QUERY > > SELECT command_entities.* > FROM command_entities > WHERE root_command_id = v_root_command_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteCommandEntity (v_command_id uuid) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > BEGIN > DELETE > FROM command_entities > WHERE command_id = v_command_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteCommandEntitiesOlderThanDate (v_date TIMESTAMP WITH TIME ZONE) >RETURNS VOID AS $PROCEDURE$ > >DECLARE v_id INT; > >SWV_RowCount INT; > >BEGIN > DELETE > FROM command_entities > WHERE CREATED_AT < v_date > AND command_id NOT IN ( > SELECT command_id > FROM async_tasks > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertCommandAssociatedEntities ( > v_command_id UUID, > v_entity_id UUID, > v_entity_type VARCHAR(128) > ) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > INSERT INTO command_assoc_entities ( > command_id, > entity_id, > entity_type > ) > VALUES ( > v_command_id, > v_entity_id, > v_entity_type > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetCommandIdsByEntityId (v_entity_id UUID) >RETURNS SETOF idUuidType STABLE AS $PROCEDURE$ > >BEGIN > RETURN QUERY > > SELECT command_id > FROM command_assoc_entities > WHERE entity_id = v_entity_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetCommandAssociatedEntities (v_command_id UUID) >RETURNS SETOF command_assoc_entities STABLE AS $PROCEDURE$ > >BEGIN > RETURN QUERY > > SELECT * > FROM command_assoc_entities > WHERE command_id = v_command_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,413+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/common_sp.sql... >2019-02-26 17:06:40,414+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/common_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_column ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_column_def TEXT > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > > EXECUTE v_sql; > END; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_drop_column ( > v_table VARCHAR(128), > v_column VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % or Column % does not exist.', > v_table, > v_column; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_change_column_type ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_type VARCHAR(128), > v_new_type VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > AND ( > udt_name ilike v_type > OR data_type ilike v_type > ) > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > END; > > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_rename_column ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_new_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % or Column % does not exist.', > v_table, > v_column; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_rename_table ( > v_table VARCHAR(128), > v_new_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' RENAME TO ' || v_new_name; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % does not exist.', > v_table; >END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_config_value ( > v_option_name VARCHAR(100), > v_option_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_option_value, > v_version, > v_option_value > ); > END; > ELSE > BEGIN > -- We need to set default value to not have it empty after upgrade from previous versions > UPDATE vdc_options SET > default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version > AND default_value IS NULL; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_value_all_versions (v_option_name VARCHAR(100)) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > ) > ) THEN > BEGIN > DELETE > FROM vdc_options > WHERE option_name ilike v_option_name; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_value ( > v_option_name VARCHAR(100), > v_version TEXT > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version IN ( > SELECT ID > FROM fnSplitter(v_version) > ) > ) > ) THEN > BEGIN > DELETE > FROM vdc_options > WHERE option_name ilike v_option_name > AND version IN ( > SELECT ID > FROM fnSplitter(v_version) > ); > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_for_version (v_version TEXT) >RETURNS void AS $PROCEDURE$ >BEGIN > DELETE > FROM vdc_options > WHERE version IN ( > SELECT ID > FROM fnSplitter(v_version) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_config_value ( > v_option_name VARCHAR(100), > v_option_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > UPDATE vdc_options > SET option_value = v_option_value, > default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_default_config_value ( > v_option_name VARCHAR(100), > v_default_option_value VARCHAR(4000), > v_option_value VARCHAR(4000), > v_version VARCHAR(40), > v_ignore_default_value_case boolean > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > IF (v_ignore_default_value_case) THEN > UPDATE vdc_options > SET option_value = v_option_value > WHERE option_name ilike v_option_name > AND option_value ilike v_default_option_value > AND version = v_version; > ELSE > UPDATE vdc_options > SET option_value = v_option_value > WHERE option_name ilike v_option_name > AND option_value = v_default_option_value > AND version = v_version; > END IF; > > -- We need to update default value regardless of user changes > UPDATE vdc_options > SET default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version; > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_rename_config_key ( > v_old_option_name VARCHAR(100), > v_new_option_name VARCHAR(100), > v_version VARCHAR(40) > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_current_option_value VARCHAR(4000); > > BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_old_option_name > AND version = v_version > ) > ) THEN > v_current_option_value:= option_value > FROM vdc_options > WHERE option_name ilike v_old_option_name > AND version = v_version; > > UPDATE vdc_options > SET option_name = v_new_option_name, > option_value = v_current_option_value > WHERE option_name ilike v_old_option_name > AND version = v_version; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_create_constraint ( > v_table VARCHAR(128), > v_constraint VARCHAR(128), > v_constraint_sql TEXT > ) > RETURNS void AS $PROCEDURE$ > > BEGIN > IF NOT EXISTS ( > SELECT 1 > FROM pg_constraint > WHERE conname ilike v_constraint > ) THEN > EXECUTE 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_drop_constraint ( > v_table VARCHAR(128), > v_constraint VARCHAR(128) > ) > RETURNS void AS $PROCEDURE$ > > BEGIN > IF EXISTS ( > SELECT 1 > FROM pg_constraint > WHERE conname ilike v_constraint > ) THEN > EXECUTE 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION CheckDBConnection () > RETURNS SETOF INT IMMUTABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 1; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_functions_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' > FROM pg_proc > INNER JOIN pg_namespace ns > ON (pg_proc.pronamespace = ns.oid) > WHERE > ns.nspname = 'public' > AND ( > probin IS NULL > OR > -- prevent dropping installed extension functions > probin NOT IN (SELECT '$libdir/' || extname from pg_extension) > ) > ORDER BY proname; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_views_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP VIEW if exists ' || table_name || ' CASCADE;' > FROM information_schema.VIEWS > WHERE table_schema = 'public' > AND table_name NOT ILIKE 'pg_%' > ORDER BY table_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_tables_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP TABLE if exists ' || table_name || ' CASCADE;' > FROM information_schema.tables > WHERE table_schema = 'public' > AND table_type = 'BASE TABLE' > ORDER BY table_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_seq_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP SEQUENCE if exists ' || sequence_name || ' CASCADE;' > FROM information_schema.sequences > WHERE sequence_schema = 'public' > ORDER BY sequence_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_user_types_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, > pg_class c, > pg_type t > WHERE n.oid = c.relnamespace > AND t.typrelid = c.oid > AND c.relkind = 'c'::"char" > AND n.nspname = 'public' > ORDER BY c.relname::information_schema.sql_identifier; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_get_column_size ( > v_table VARCHAR(64), > v_column VARCHAR(64) > ) > RETURNS INT STABLE AS $PROCEDURE$ > > DECLARE retvalue INT; > > BEGIN > retvalue := character_maximum_length > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > AND table_schema = 'public' > AND udt_name IN ( > 'char', > 'varchar' > ); > > RETURN retvalue; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION attach_user_to_role ( > v_user_name VARCHAR(255), > v_domain VARCHAR(255), > v_namespace VARCHAR(255), > v_domain_entry_id TEXT, > v_role_name VARCHAR(255) > ) > RETURNS void AS $BODY$ > > DECLARE selected_user_id uuid; > > input_role_id uuid; > > BEGIN > SELECT roles.id > INTO input_role_id > FROM roles > WHERE roles.name = v_role_name; > > -- The external identifier is the user identifier converted to an array of > -- bytes: > INSERT INTO users ( > user_id, > external_id, > namespace, > name, > domain, > username, > last_admin_check_status > ) > SELECT uuid_generate_v1(), > v_domain_entry_id, > v_namespace, > v_user_name, > v_domain, > v_user_name, > true > WHERE NOT EXISTS ( > SELECT 1 > FROM users > WHERE domain = v_domain > AND external_id = v_domain_entry_id > ); > > SELECT user_id > FROM users > WHERE domain = v_domain > AND external_id = v_domain_entry_id > INTO selected_user_id; > > PERFORM InsertPermission(selected_user_id, uuid_generate_v1(), input_role_id, getGlobalIds('system'), 1); > > END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION attach_group_to_role ( > v_group_name VARCHAR(255), > v_role_name VARCHAR(255) > ) > RETURNS void AS $BODY$ > DECLARE selected_group_id uuid; > input_role_id uuid; > BEGIN > SELECT roles.id > INTO input_role_id > FROM roles > WHERE roles.name = v_role_name; > -- The external identifier is the user identifier converted to an array of > -- bytes: > INSERT INTO ad_groups ( > id, > name, > external_id > ) > SELECT uuid_generate_v1(), > v_group_name, > uuid_generate_v1() > WHERE NOT EXISTS ( > SELECT 1 > FROM ad_groups > WHERE name = v_group_name > ); > SELECT id > FROM ad_groups > WHERE name = v_group_name > INTO selected_group_id; > IF NOT EXISTS ( > SELECT 1 > FROM permissions > WHERE ad_element_id = selected_group_id > AND role_id = input_role_id > ) THEN > PERFORM InsertPermission( > selected_group_id, > uuid_generate_v1(), > input_role_id, > getGlobalIds('system'), > 1); > END IF; > END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_add_action_group_to_role ( > v_role_id UUID, > v_action_group_id INT > ) > RETURNS VOID AS $PROCEDURE$ > > BEGIN > INSERT INTO roles_groups ( > role_id, > action_group_id > ) > SELECT v_role_id, > v_action_group_id > WHERE NOT EXISTS ( > SELECT 1 > FROM roles_groups > WHERE role_id = v_role_id > AND action_group_id = v_action_group_id > ); > > RETURN; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_split_config_value ( > v_option_name VARCHAR, > v_old_option_value VARCHAR, > v_new_option_value VARCHAR, > v_update_from_version VARCHAR > ) > RETURNS void AS $BODY$ > > DECLARE v_old_value VARCHAR(4000); > > v_cur CURSOR > FOR > > SELECT DISTINCT version > FROM vdc_options > WHERE version <> 'general' > ORDER BY version; > > v_version VARCHAR(40); > > v_index INT; > > v_count INT; > > v_total_count INT; > > v_version_count INT; > > BEGIN > v_total_count := count(version) > FROM vdc_options > WHERE option_name = v_option_name; > > v_old_value := option_value > FROM vdc_options > WHERE option_name = v_option_name > AND version = 'general'; > > v_version_count := count(DISTINCT version) > FROM vdc_options > WHERE version <> 'general'; > > IF (v_total_count <= v_version_count) THEN > BEGIN > IF (v_old_value IS NULL) THEN > v_old_value := v_old_option_value; > END IF; > v_count := count(DISTINCT version) > FROM vdc_options > WHERE version <> 'general'; > > v_index := 1; > > OPEN v_cur; > > LOOP > > FETCH v_cur > INTO v_version; > > EXIT when NOT found; > > -- We shouldn't update if already exists > IF ( > NOT EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name = v_option_name > AND version = v_version > ) > ) THEN > -- Might not work well for versions such as 3.10, but we currently don't have any > IF (v_version >= v_update_from_version) THEN > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_new_option_value, > v_version, > v_new_option_value > ); > ELSE > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_old_value, > v_version, > v_old_value > ); > END IF; > > END IF; > v_index := v_index + 1; > END LOOP; > > CLOSE v_cur; > > DELETE > FROM vdc_options > WHERE option_name = v_option_name > AND version = 'general'; > END; >END IF; > >END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_grant_action_group_to_all_roles_filter ( > v_action_group_id INT, > uuid [] > ) >RETURNS void AS $BODY$ > >DECLARE v_role_id_to_filter alias >FOR $2; > >BEGIN > INSERT INTO roles_groups ( > role_id, > action_group_id > ) > SELECT DISTINCT role_id, > v_action_group_id > FROM roles_groups rg > WHERE NOT ARRAY [role_id] <@ v_role_id_to_filter > AND NOT EXISTS ( > SELECT 1 > FROM roles_groups > WHERE role_id = rg.role_id > AND action_group_id = v_action_group_id > ); >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object (v_object regclass) >RETURNS setof record AS $BODY$ > >DECLARE v_sql TEXT; > >v_table record; > >v_table_name TEXT; > >temprec record; > >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > SELECT c.relname, > n.nspname > INTO v_table > FROM pg_class c > INNER JOIN pg_namespace n > ON c.relnamespace = n.oid > WHERE c.oid = v_object; > > -- try to get filtered query syntax from previous execution > IF EXISTS ( > SELECT 1 > FROM object_column_white_list_sql > WHERE object_name = v_table.relname > ) THEN > SELECT sql > INTO v_sql > FROM object_column_white_list_sql > WHERE object_name = v_table.relname; > ELSE > v_table_name := quote_ident(v_table.nspname) || '.' || quote_ident(v_table.relname); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > FOR temprec IN > SELECT a.attname, > t.typname > FROM pg_attribute a > INNER JOIN pg_type t > ON a.atttypid = t.oid > WHERE a.attrelid = v_object > AND a.attnum > 0 > AND NOT a.attisdropped > ORDER BY a.attnum LOOP v_sql := coalesce(v_sql || ', ', 'SELECT '); > > IF EXISTS ( > SELECT 1 > FROM object_column_white_list > WHERE object_name = v_table.relname > AND column_name = temprec.attname > ) THEN v_sql := v_sql || quote_ident(temprec.attname); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident(temprec.typname) || ' as ' || quote_ident(temprec.attname); > END IF; > > END LOOP; > > v_sql := v_sql || ' FROM ' || v_table_name; > > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > > -- save generated query for further use > INSERT INTO object_column_white_list_sql ( > object_name, > sql > ) > VALUES ( > v_table.relname, > v_sql > ); > END IF; > > RETURN QUERY > > EXECUTE v_sql; >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_column_to_object_white_list ( > v_object_name VARCHAR(128), > v_column_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM object_column_white_list > WHERE object_name = v_object_name > AND column_name = v_column_name > ) > ) THEN > BEGIN > -- verify that there is such object in db > IF EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name = v_object_name > AND column_name = v_column_name > ) THEN > INSERT INTO object_column_white_list ( > object_name, > column_name > ) > VALUES ( > v_object_name, > v_column_name > ); > END IF; > > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_is_table_exists (v_table VARCHAR(64)) > RETURNS boolean STABLE AS $PROCEDURE$ > > DECLARE retvalue boolean; > > BEGIN > retvalue := EXISTS ( > SELECT * > FROM information_schema.tables > WHERE table_schema = 'public' > AND table_name ILIKE v_table > ); > > RETURN retvalue; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_create_index ( > v_index_name VARCHAR(128), > v_table_name VARCHAR(128), > v_column_names TEXT, > v_where_predicate TEXT, > v_unique boolean > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_sql TEXT; > unique_modifier varchar(6); > > BEGIN > unique_modifier = CASE WHEN v_unique THEN 'UNIQUE' > ELSE '' > END; > > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || '; CREATE ' || unique_modifier || ' INDEX ' || v_index_name || ' ON ' || v_table_name || '(' || v_column_names || ')'; > > IF v_where_predicate = '' THEN v_sql := v_sql || ';';ELSE > v_sql := v_sql || ' WHERE ' || v_where_predicate || ';'; > END IF; > > EXECUTE v_sql; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR replace FUNCTION fn_db_drop_index ( > v_index_name VARCHAR(128) > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_sql TEXT; > > BEGIN > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || ';' ; > EXECUTE v_sql; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_disk (v_id UUID) >RETURNS void AS $PROCEDURE$ >DECLARE OK INT; > >LOCKED INT; > >BEGIN > OK:= 1; > > LOCKED:= 2; > > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED > AND image_group_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_snapshot (v_id UUID) >RETURNS void AS $PROCEDURE$ >DECLARE OK VARCHAR; > >LOCKED VARCHAR; > >BEGIN > OK:= 'OK'; > > LOCKED:= 'LOCKED'; > > UPDATE snapshots > SET status = OK > WHERE status = LOCKED > AND snapshot_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_entity ( > v_object_type VARCHAR(10), > v_name VARCHAR(255), > v_recursive boolean > ) >RETURNS void AS $PROCEDURE$ >DECLARE DOWN INT; > >OK INT; > >LOCKED INT; > >TEMPLATE_OK INT; > >TEMPLATE_LOCKED INT; > >IMAGE_LOCKED INT; > >SNAPSHOT_OK VARCHAR; > >SNAPSHOT_LOCKED VARCHAR; > >v_id UUID; > >BEGIN > DOWN:= 0; > > OK:= 1; > > LOCKED:= 2; > > TEMPLATE_OK:= 0; > > TEMPLATE_LOCKED:= 1; > > IMAGE_LOCKED:= 15; > > SNAPSHOT_OK:= 'OK'; > > SNAPSHOT_LOCKED:= 'LOCKED'; > > v_id := vm_guid > FROM vm_static > WHERE vm_name = v_name > AND entity_type ilike v_object_type; > > -- set VM status to DOWN > IF (v_object_type = 'vm') THEN > UPDATE vm_dynamic > SET status = DOWN > WHERE status = IMAGE_LOCKED > AND vm_guid = v_id; > -- set Template status to OK > ELSE IF (v_object_type = 'template') THEN > UPDATE vm_static > SET template_status = TEMPLATE_OK > WHERE template_status = TEMPLATE_LOCKED > AND vm_guid = v_id; > END IF; > >END IF; > --unlock images and snapshots if recursive flag is set >IF (v_recursive) THEN > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED > AND image_group_id IN ( > SELECT device_id > FROM vm_device > WHERE vm_id = v_id > AND is_plugged > ); > > UPDATE snapshots > SET status = SNAPSHOT_OK > WHERE status ilike SNAPSHOT_LOCKED > AND vm_id = v_id; >END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_all () >RETURNS void AS $PROCEDURE$ >DECLARE DOWN INT; > >OK INT; > >LOCKED INT; > >TEMPLATE_OK INT; > >TEMPLATE_LOCKED INT; > >IMAGE_LOCKED INT; > >SNAPSHOT_OK VARCHAR; > >SNAPSHOT_LOCKED VARCHAR; > >BEGIN > DOWN:= 0; > > OK:= 1; > > LOCKED:= 2; > > TEMPLATE_OK:= 0; > > TEMPLATE_LOCKED:= 1; > > IMAGE_LOCKED:= 15; > > SNAPSHOT_OK:= 'OK'; > > SNAPSHOT_LOCKED:= 'LOCKED'; > > UPDATE vm_static > SET template_status = TEMPLATE_OK > WHERE template_status = TEMPLATE_LOCKED; > > UPDATE vm_dynamic > SET status = DOWN > WHERE status = IMAGE_LOCKED; > > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED; > > UPDATE snapshots > SET status = SNAPSHOT_OK > WHERE status ilike SNAPSHOT_LOCKED; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/* Displays DC id , DC name, SPM Host id , SPM Host name and number of async tasks awaiting. > >1) create a record type with DC name, DC id, SPM host id, SPM host name, count > >2) get all distinct DC ids from async_tasks table > >3) Run a cursor for each result in 2) > > a) get DC name > b) get SPM Host id & name if available > c) get count of tasks > > return current record > >4) return set of generated records >*/ >DROP TYPE IF EXISTS async_tasks_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE async_tasks_info_rs AS ( > dc_id uuid, > dc_name VARCHAR, > spm_host_id uuid, > spm_host_name VARCHAR, > task_count INT > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_get_async_tasks () >RETURNS SETOF async_tasks_info_rs STABLE AS $PROCEDURE$ >DECLARE v_record async_tasks_info_rs; > >-- selects storage_pool_id uuid found in async_tasks >v_tasks_cursor CURSOR >FOR > >SELECT DISTINCT storage_pool_id >FROM async_tasks; > >BEGIN > OPEN v_tasks_cursor; > > FETCH v_tasks_cursor > INTO v_record.dc_id; > > WHILE FOUND > LOOP > -- get dc_name and SPM Host id > v_record.dc_name := name FROM storage_pool WHERE id = v_record.dc_id; > v_record.spm_host_id := spm_vds_id > FROM storage_pool > WHERE id = v_record.dc_id; > > -- get Host name if we have non NULL SPM Host > IF (v_record.spm_host_id IS NOT NULL) THEN > v_record.spm_host_name := vds_name > FROM vds_static > WHERE vds_id = v_record.spm_host_id; > ELSE > v_record.spm_host_name:= ''; > END IF; > -- get tasks count for this DC > v_record.task_count := count(*) > FROM async_tasks > WHERE position(cast(v_record.dc_id AS VARCHAR) IN action_parameters) > 0; > > -- return the record > RETURN NEXT v_record; > > FETCH v_tasks_cursor > INTO v_record.dc_id; > > END LOOP; > >CLOSE v_tasks_cursor; > >-- return full set of generated records >RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_remove_csv_config_value ( > v_option_name VARCHAR(100), > v_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v VARCHAR []; > >e VARCHAR; > >v_result VARCHAR; > >v_sep VARCHAR(1); > >BEGIN > v_result := ''; > > v_sep := ''; > > v := string_to_array(option_value, ',') > FROM vdc_options > WHERE option_name = v_option_name > AND version = v_version; > FOR > > e IN > > SELECT unnest(v) LOOP > > IF (e != v_value) THEN v_result := v_result || v_sep || e; > v_sep := ','; > END IF; > >END >LOOP; > > UPDATE vdc_options > SET option_value = v_result > WHERE option_name = v_option_name > AND version = v_version; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_remove_uuid_from_csv ( > v_csv_text TEXT, > v_uuid uuid > ) >RETURNS TEXT STABLE AS $PROCEDURE$ >DECLARE v uuid []; > >e uuid; > >v_result TEXT; > >v_sep VARCHAR(1); > >BEGIN > v_result := ''; > > v_sep := ''; > > v := string_to_array(v_csv_text, ','); > FOR > > e IN > > SELECT unnest(v) LOOP > > IF (e != v_uuid) THEN v_result := v_result || v_sep || e; > v_sep := ','; > END IF; > > END LOOP; > > IF (v_result = '') THEN v_result := NULL; > END IF; > RETURN v_result; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_config_value_for_versions_up_to ( > v_option_name VARCHAR(100), > v_val VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >DECLARE i INT; > >arr VARCHAR [] := array ['4.1', '4.2', '4.3']; > >BEGIN > FOR i IN array_lower(arr, 1)..array_upper(arr, 1) LOOP PERFORM fn_db_add_config_value(v_option_name, v_val, arr [i]); > EXIT WHEN arr [i] = v_version; > END LOOP; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_varchar_to_jsonb(v_text VARCHAR, v_default_value JSONB) >RETURNS JSONB IMMUTABLE AS $PROCEDURE$ >BEGIN > RETURN v_text::jsonb; > EXCEPTION > WHEN SQLSTATE '22P02' THEN -- '22P02' stands for 'invalid_text_representation', 'invalid input syntax for type json' in this case > RETURN v_default_value; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_column_to_jsonb_compatible_values( > v_table VARCHAR, > v_column VARCHAR, > v_default_value JSONB > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE > default_value_string VARCHAR; >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name = v_table > AND column_name = v_column > AND data_type = 'character varying' > ) > ) THEN > BEGIN > default_value_string := CASE > WHEN v_default_value IS NULL THEN 'NULL' > ELSE '''' || v_default_value::VARCHAR || '''' > END; > EXECUTE 'UPDATE ' || v_table || ' SET ' || v_column || ' = (SELECT fn_db_varchar_to_jsonb(' || v_column || ', ' || default_value_string || '))'; > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_change_table_string_columns_to_empty_string ( > v_table VARCHAR(128), > v_column VARCHAR[] > ) >RETURNS void AS $PROCEDURE$ >DECLARE > v_sql TEXT; > v_num integer := array_length(v_column, 1); > v_index integer := 1; > >BEGIN > WHILE v_index <= v_num > LOOP > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column[v_index] > ) > ) THEN > BEGIN > v_sql := 'UPDATE ' || v_table || ' SET ' || v_column[v_index] || ' = '''' WHERE ' || v_column[v_index] || ' IS NULL' ; > EXECUTE v_sql; > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column[v_index] || ' SET DEFAULT '''''; > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'No column named % exists in table %', v_column[v_index] , v_table; > END IF; > v_index = v_index + 1; > END LOOP; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,449+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/cpu_profiles_sp.sql... >2019-02-26 17:06:40,450+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/cpu_profiles_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetCpuProfileByCpuProfileId (v_id UUID) >RETURNS SETOF cpu_profiles STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM cpu_profiles > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertCpuProfile ( > v_id UUID, > v_name VARCHAR(50), > v_cluster_id UUID, > v_qos_id UUID, > v_description TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO cpu_profiles ( > id, > name, > cluster_id, > qos_id, > description > ) > VALUES ( > v_id, > v_name, > v_cluster_id, > v_qos_id, > v_description > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateCpuProfile ( > v_id UUID, > v_name VARCHAR(50), > v_cluster_id UUID, > v_qos_id UUID, > v_description TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE cpu_profiles > SET id = v_id, > name = v_name, > cluster_id = v_cluster_id, > qos_id = v_qos_id, > description = v_description, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteCpuProfile (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > DELETE > FROM cpu_profiles > WHERE id = v_id; > > -- Delete the cpu profiles permissions > PERFORM DeletePermissionsByEntityId(v_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromCpuProfiles () >RETURNS SETOF cpu_profiles STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM cpu_profiles; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetCpuProfilesByClusterId ( > v_cluster_id UUID, > v_user_id UUID, > v_is_filtered boolean, > v_action_group_id INTEGER > ) >RETURNS SETOF cpu_profiles STABLE AS $PROCEDURE$ >BEGIN > IF v_is_filtered > THEN > RETURN QUERY > SELECT * > FROM cpu_profiles > WHERE cluster_id = v_cluster_id > AND EXISTS ( > SELECT 1 > FROM get_entity_permissions(v_user_id, v_action_group_id, cpu_profiles.id, 30) > ) > ORDER BY _create_date; > > ELSE > RETURN QUERY > SELECT * > FROM cpu_profiles > WHERE cluster_id = v_cluster_id > ORDER BY _create_date; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetCpuProfilesByQosId (v_qos_id UUID) >RETURNS SETOF cpu_profiles STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM cpu_profiles > WHERE qos_id = v_qos_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,465+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/custom_actions_sp.sql... >2019-02-26 17:06:40,467+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/custom_actions_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertcustom_actions ( > INOUT v_action_id INT, > v_action_name VARCHAR(50), > v_path VARCHAR(300), > v_tab INT, > v_description VARCHAR(4000) > ) AS $PROCEDURE$ >BEGIN > INSERT INTO custom_actions ( > action_name, > path, > tab, > description > ) > VALUES ( > v_action_name, > v_path, > v_tab, > v_description > ); > > v_action_id := CURRVAL('custom_actions_seq'); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatecustom_actions ( > v_action_id INT, > v_action_name VARCHAR(50), > v_path VARCHAR(300), > v_tab INT, > v_description VARCHAR(4000) > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE custom_actions > SET action_name = v_action_name, > path = v_path, > tab = v_tab, > description = v_description > WHERE action_id = v_action_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletecustom_actions (v_action_id INT) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM custom_actions > WHERE action_id = v_action_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromcustom_actions () >RETURNS SETOF custom_actions STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM custom_actions; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getcustom_actionsByaction_id (v_action_id INT) >RETURNS SETOF custom_actions STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM custom_actions > WHERE action_id = v_action_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getcustom_actionsByTab_id (v_tab INT) >RETURNS SETOF custom_actions STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM custom_actions > WHERE tab = v_tab; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getcustom_actionsByNameAndTab ( > v_action_name VARCHAR(50), > v_tab INT > ) >RETURNS SETOF custom_actions STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM custom_actions > WHERE tab = v_tab > AND action_name = v_action_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,482+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/disk_image_dynamic_sp.sql... >2019-02-26 17:06:40,484+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/disk_image_dynamic_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertdisk_image_dynamic ( > v_image_id UUID, > v_read_rate INT, > v_write_rate INT, > v_actual_size BIGINT, > v_read_latency_seconds NUMERIC(18, 9), > v_write_latency_seconds NUMERIC(18, 9), > v_flush_latency_seconds NUMERIC(18, 9) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO disk_image_dynamic ( > image_id, > read_rate, > write_rate, > actual_size, > read_latency_seconds, > write_latency_seconds, > flush_latency_seconds > ) > VALUES ( > v_image_id, > v_read_rate, > v_write_rate, > v_actual_size, > v_read_latency_seconds, > v_write_latency_seconds, > v_flush_latency_seconds > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatedisk_image_dynamic ( > v_image_id UUID, > v_read_rate INT, > v_write_rate INT, > v_actual_size BIGINT, > v_read_latency_seconds NUMERIC(18, 9), > v_write_latency_seconds NUMERIC(18, 9), > v_flush_latency_seconds NUMERIC(18, 9) > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE disk_image_dynamic > SET read_rate = v_read_rate, > write_rate = v_write_rate, > actual_size = v_actual_size, > read_latency_seconds = v_read_latency_seconds, > write_latency_seconds = v_write_latency_seconds, > flush_latency_seconds = v_flush_latency_seconds, > _update_date = LOCALTIMESTAMP > WHERE image_id = v_image_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatedisk_image_dynamic_by_disk_id_and_vm_id ( > v_image_group_id UUID, > v_vm_id UUID, > v_read_rate INT, > v_write_rate INT, > v_actual_size BIGINT, > v_read_latency_seconds NUMERIC(18, 9), > v_write_latency_seconds NUMERIC(18, 9), > v_flush_latency_seconds NUMERIC(18, 9) > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE disk_image_dynamic > SET read_rate = v_read_rate, > write_rate = v_write_rate, > actual_size = v_actual_size, > read_latency_seconds = v_read_latency_seconds, > write_latency_seconds = v_write_latency_seconds, > flush_latency_seconds = v_flush_latency_seconds, > _update_date = LOCALTIMESTAMP > WHERE image_id IN ( > SELECT DISTINCT image_guid > FROM images > WHERE image_group_id = v_image_group_id > AND active = true > ) > AND EXISTS ( > SELECT 1 > FROM vm_device vmd > WHERE vmd.vm_id = v_vm_id > AND vmd.device_id = v_image_group_id > AND vmd.snapshot_id IS NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletedisk_image_dynamic (v_image_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM disk_image_dynamic > WHERE image_id = v_image_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromdisk_image_dynamic () >RETURNS SETOF disk_image_dynamic STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM disk_image_dynamic; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getdisk_image_dynamicByimage_id (v_image_id UUID) >RETURNS SETOF disk_image_dynamic STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM disk_image_dynamic > WHERE image_id = v_image_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TRIGGER >IF EXISTS delete_disk_image_dynamic_for_image > ON images; >************************** > >DROP TRIGGER >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_image_deleted () > RETURNS TRIGGER AS $$ > >BEGIN > DELETE > FROM disk_image_dynamic dim > WHERE DIM.image_id = OLD.image_guid; > > RETURN OLD; >END;$$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE TRIGGER delete_disk_image_dynamic_for_image BEFORE >DELETE > ON IMAGES >FOR EACH ROW >EXECUTE PROCEDURE fn_image_deleted(); >************************** > >CREATE TRIGGER >2019-02-26 17:06:40,500+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/disk_images_sp.sql... >2019-02-26 17:06:40,502+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/disk_images_sp.sql >********* QUERY ********** >Create or replace FUNCTION GetImageByImageGuid(v_image_guid UUID) >RETURNS SETOF vm_images_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM vm_images_view > WHERE image_guid = v_image_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAncestralImageByImageGuid(v_image_guid UUID, v_user_id UUID, v_is_filtered BOOLEAN) >RETURNS SETOF images_storage_domain_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY WITH RECURSIVE ancestor_image(image_guid, parentid) AS ( > SELECT image_guid, parentid > FROM images > WHERE image_guid = v_image_guid > UNION ALL > SELECT i.image_guid, i.parentid > FROM images i, ancestor_image ai > WHERE i.image_guid = ai.parentid > ) > SELECT i.* > FROM ancestor_image ai, images_storage_domain_view i > WHERE ai.parentid = '00000000-0000-0000-0000-000000000000' > AND ai.image_guid = i.image_guid > AND (NOT v_is_filtered OR EXISTS ( > SELECT 1 > FROM user_disk_permissions_view > WHERE user_disk_permissions_view.user_id = v_user_id > AND user_disk_permissions_view.entity_id = i.image_group_id)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetSnapshotByGuid(v_image_guid UUID) >RETURNS SETOF images_storage_domain_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM images_storage_domain_view images_storage_domain_view > WHERE image_guid = v_image_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetSnapshotsByStorageDomainId(v_storage_domain_id UUID) >RETURNS SETOF images_storage_domain_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM images_storage_domain_view > WHERE storage_id = v_storage_domain_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetSnapshotByParentGuid(v_parent_guid UUID) >RETURNS SETOF images_storage_domain_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM images_storage_domain_view images_storage_domain_view > WHERE ParentId = v_parent_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetSnapshotByLeafGuid(v_image_guid UUID) >RETURNS SETOF images_storage_domain_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY WITH RECURSIVE image_list AS ( > SELECT * > FROM images_storage_domain_view > WHERE image_guid = v_image_guid > UNION ALL > SELECT images_storage_domain_view.* > FROM images_storage_domain_view > JOIN image_list ON > image_list.parentid = images_storage_domain_view.image_guid AND > image_list.image_group_id = images_storage_domain_view.image_group_id > ) > SELECT * > FROM image_list; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmImageByImageGuid(v_image_guid UUID) >RETURNS SETOF vm_images_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM vm_images_view > WHERE image_guid = v_image_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetSnapshotsByVmSnapshotId(v_vm_snapshot_id UUID) >RETURNS SETOF images_storage_domain_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM images_storage_domain_view images_storage_domain_view > WHERE vm_snapshot_id = v_vm_snapshot_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAttachedDiskSnapshotsToVm(v_vm_guid UUID, v_is_plugged BOOLEAN) >RETURNS SETOF images_storage_domain_view > AS $procedure$ >BEGIN > RETURN QUERY SELECT images_storage_domain_view.* > FROM images_storage_domain_view > JOIN vm_device ON vm_device.device_id = images_storage_domain_view.disk_id > WHERE vm_device.vm_id = v_vm_guid AND (v_is_plugged IS NULL OR vm_device.is_plugged = v_is_plugged) > AND vm_device.snapshot_id IS NOT NULL > AND vm_device.snapshot_id = images_storage_domain_view.vm_snapshot_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetSnapshotsByImageGroupId(v_image_group_id UUID) >RETURNS SETOF images_storage_domain_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM images_storage_domain_view images_storage_domain_view > WHERE image_group_id = v_image_group_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetDiskSnapshotForVmSnapshot(v_image_group_id UUID, v_vm_snapshot_id UUID) >RETURNS SETOF images_storage_domain_view > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM images_storage_domain_view > WHERE image_group_id = v_image_group_id > AND vm_snapshot_id = v_vm_snapshot_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllForStorageDomain(v_storage_domain_id UUID) >RETURNS SETOF images_storage_domain_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT images_storage_domain_view.* > FROM images_storage_domain_view > WHERE active AND images_storage_domain_view.storage_id = v_storage_domain_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetImagesWhichHaveNoDisk(v_vm_id UUID) >RETURNS SETOF images_storage_domain_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT i.* > FROM images_storage_domain_view i > JOIN snapshots s ON (i.vm_snapshot_id = s.snapshot_id) > WHERE s.vm_id = v_vm_id > AND NOT EXISTS ( > SELECT 1 > FROM base_disks d > WHERE d.disk_id = i.image_group_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllForDiskProfiles(v_disk_profile_ids UUID[]) >RETURNS SETOF images_storage_domain_view STABLE >AS $procedure$ >BEGIN > RETURN QUERY SELECT images_storage_domain_view.* > FROM images_storage_domain_view > WHERE images_storage_domain_view.disk_profile_id = ANY(v_disk_profile_ids); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetSnapshotsByParentsGuid(v_parent_guids uuid[]) >RETURNS SETOF images_storage_domain_view STABLE >AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM images_storage_domain_view > WHERE parentid = ANY(v_parent_guids); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskImageByDiskAndImageIds(v_disk_id UUID, v_image_id UUID, v_user_id UUID, v_is_filtered BOOLEAN) >RETURNS SETOF images_storage_domain_view STABLE >AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM images_storage_domain_view > WHERE image_group_id = v_disk_id > AND image_guid = v_image_id > AND (NOT v_is_filtered OR EXISTS ( > SELECT 1 > FROM user_disk_permissions_view > WHERE user_id = v_user_id > AND entity_id = images_storage_domain_view.image_group_id)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,520+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/disk_lun_map_sp.sql... >2019-02-26 17:06:40,522+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/disk_lun_map_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertDiskLunMap ( > v_disk_id UUID, > v_lun_id VARCHAR(255) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO disk_lun_map ( > disk_id, > lun_id > ) > VALUES ( > v_disk_id, > v_lun_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteDiskLunMap ( > v_disk_id UUID, > v_lun_id VARCHAR(255) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM disk_lun_map > WHERE disk_id = v_disk_id > AND lun_id = v_lun_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromDiskLunMaps () >RETURNS SETOF disk_lun_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM disk_lun_map; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskLunMapByDiskLunMapId ( > v_disk_id UUID, > v_lun_id VARCHAR(255) > ) >RETURNS SETOF disk_lun_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM disk_lun_map > WHERE disk_id = v_disk_id > AND lun_id = v_lun_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskLunMapByLunId (v_lun_id VARCHAR(255)) >RETURNS SETOF disk_lun_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM disk_lun_map > WHERE lun_id = v_lun_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskLunMapByDiskId (v_disk_id UUID) >RETURNS SETOF disk_lun_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM disk_lun_map > WHERE disk_id = v_disk_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskLunMapsForVmsInPool (v_storage_pool_id UUID) >RETURNS SETOF disk_lun_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM disk_lun_map > WHERE EXISTS ( > SELECT * > FROM disk_vm_element > INNER JOIN vm_static > ON disk_vm_element.vm_id = vm_static.vm_guid > INNER JOIN cluster > ON vm_static.cluster_id = cluster.cluster_id > INNER JOIN storage_pool > ON cluster.storage_pool_id = storage_pool.id > WHERE disk_lun_map.disk_id = disk_vm_element.disk_id > AND storage_pool.id = v_storage_pool_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,537+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/disk_profiles_sp.sql... >2019-02-26 17:06:40,539+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/disk_profiles_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskProfileByDiskProfileId (v_id UUID) >RETURNS SETOF disk_profiles STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM disk_profiles > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertDiskProfile ( > v_id UUID, > v_name VARCHAR(50), > v_storage_domain_id UUID, > v_qos_id UUID, > v_description TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO disk_profiles ( > id, > name, > storage_domain_id, > qos_id, > description > ) > VALUES ( > v_id, > v_name, > v_storage_domain_id, > v_qos_id, > v_description > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateDiskProfile ( > v_id UUID, > v_name VARCHAR(50), > v_storage_domain_id UUID, > v_qos_id UUID, > v_description TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE disk_profiles > SET id = v_id, > name = v_name, > storage_domain_id = v_storage_domain_id, > qos_id = v_qos_id, > description = v_description, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteDiskProfile (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > DELETE > FROM disk_profiles > WHERE id = v_id; > > -- Delete the disk profiles permissions > PERFORM DeletePermissionsByEntityId(v_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromDiskProfiles () >RETURNS SETOF disk_profiles STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM disk_profiles; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskProfilesByStorageDomainId ( > v_storage_domain_id UUID, > v_user_id UUID, > v_is_filtered boolean > ) >RETURNS SETOF disk_profiles STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM disk_profiles > WHERE storage_domain_id = v_storage_domain_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_disk_profile_permissions_view > WHERE user_id = v_user_id > AND entity_id = disk_profiles.id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION nullifyQosForStorageDomain (v_storage_domain_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE disk_profiles > SET qos_id = NULL > WHERE storage_domain_id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskProfilesByQosId (v_qos_id UUID) >RETURNS SETOF disk_profiles STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM disk_profiles > WHERE qos_id = v_qos_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,556+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/disk_vm_element_sp.sql... >2019-02-26 17:06:40,558+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/disk_vm_element_sp.sql >********* QUERY ********** >Create or replace FUNCTION InsertDiskVmElement( > v_disk_id UUID, > v_vm_id UUID, > v_is_boot boolean, > v_pass_discard boolean, > v_disk_interface VARCHAR(32), > v_is_using_scsi_reservation boolean) >RETURNS VOID >AS $procedure$ >BEGIN > INSERT INTO disk_vm_element ( > disk_id, > vm_id, > is_boot, > pass_discard, > disk_interface, > is_using_scsi_reservation) > VALUES ( > v_disk_id, > v_vm_id, > v_is_boot, > v_pass_discard, > v_disk_interface, > v_is_using_scsi_reservation); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateDiskVmElement( > v_disk_id UUID, > v_vm_id UUID, > v_is_boot boolean, > v_pass_discard boolean, > v_disk_interface VARCHAR(32), > v_is_using_scsi_reservation boolean) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE disk_vm_element > SET disk_id = v_disk_id, > vm_id = v_vm_id, > is_boot = v_is_boot, > pass_discard = v_pass_discard, > disk_interface = v_disk_interface, > is_using_scsi_reservation = v_is_using_scsi_reservation > WHERE disk_id = v_disk_id > AND vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteDiskVmElement( > v_disk_id UUID, > v_vm_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM disk_vm_element > WHERE disk_id = v_disk_id > AND vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromDiskVmElements() >RETURNS SETOF disk_vm_element_extended STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM disk_vm_element_extended; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskVmElementByDiskVmElementId( > v_disk_id UUID, > v_vm_id UUID, > v_user_id UUID, > v_is_filtered boolean) >RETURNS SETOF disk_vm_element_extended STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM disk_vm_element_extended > WHERE disk_id = v_disk_id > AND vm_id = v_vm_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vm_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskVmElementsByDiskVmElementsIds( > v_disks_ids UUID[]) >RETURNS SETOF disk_vm_element_extended STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM disk_vm_element_extended > WHERE disk_id = ANY(v_disks_ids); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskVmElementsForVm( > v_vm_id UUID, > v_user_id UUID, > v_is_filtered boolean) >RETURNS SETOF disk_vm_element_extended STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM disk_vm_element_extended > WHERE vm_id = v_vm_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vm_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskVmElementsPluggedToVm( > v_vm_id UUID) >RETURNS SETOF disk_vm_element_extended STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM disk_vm_element_extended > WHERE vm_id = v_vm_id AND is_plugged = true; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,575+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/dwh_history_timekeeping_sp.sql... >2019-02-26 17:06:40,577+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/dwh_history_timekeeping_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateDwhHistoryTimekeeping ( > v_var_name VARCHAR(50), > v_var_value VARCHAR(255), > v_var_datetime TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE dwh_history_timekeeping > SET var_value = v_var_value, > var_datetime = v_var_datetime > WHERE var_name = v_var_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDwhHistoryTimekeepingByVarName (v_var_name VARCHAR(50)) >RETURNS SETOF dwh_history_timekeeping STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM dwh_history_timekeeping > WHERE var_name = v_var_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,591+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/dwh_translation_tables_sp.sql... >2019-02-26 17:06:40,593+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/dwh_translation_tables_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION clear_osinfo () >RETURNS VOID AS $PROCEDURE$ >BEGIN > TRUNCATE dwh_osinfo; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION insert_osinfo ( > v_os_id INT, > v_os_name VARCHAR(255) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO dwh_osinfo ( > os_id, > os_name > ) > VALUES ( > v_os_id, > v_os_name > ); > > UPDATE dwh_history_timekeeping > SET var_datetime = now() > WHERE var_name = 'lastOsinfoUpdate'; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,607+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/engine_backup_log_sp.sql... >2019-02-26 17:06:40,609+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/engine_backup_log_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION LogEngineBackupEvent ( > v_scope VARCHAR(64), > v_done_at TIMESTAMP WITH TIME ZONE, > v_status INT, > v_output_message TEXT, > v_fqdn VARCHAR(255), > v_log_path TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > IF v_status = - 1 THEN > INSERT INTO engine_backup_log ( > scope, > done_at, > is_passed, > output_message, > fqdn, > log_path > ) > VALUES ( > v_scope, > v_done_at, > false, > v_output_message, > v_fqdn, > v_log_path > ); > > INSERT INTO audit_log ( > log_time, > log_type_name, > log_type, > severity, > message > ) > VALUES ( > v_done_at, > 'ENGINE_BACKUP_FAILED', > 9026, > 2, > v_output_message > ); > > ELSIF v_status = 0 THEN > > INSERT INTO audit_log ( > log_time, > log_type_name, > log_type, > severity, > message > ) > VALUES ( > v_done_at, > 'ENGINE_BACKUP_STARTED', > 9024, > 0, > v_output_message > ); > > ELSIF v_status = 1 THEN > > INSERT INTO engine_backup_log ( > scope, > done_at, > is_passed, > output_message, > fqdn, > log_path > ) > VALUES ( > v_scope, > v_done_at, > true, > v_output_message, > v_fqdn, > v_log_path > ); > > -- Clean alerts > PERFORM DeleteBackupRelatedAlerts(); > > INSERT INTO audit_log ( > log_time, > log_type_name, > log_type, > severity, > message > ) > VALUES ( > v_done_at, > 'ENGINE_BACKUP_COMPLETED', > 9025, > 0, > v_output_message > ); > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLastSuccessfulEngineBackup (v_scope VARCHAR(64)) >RETURNS SETOF engine_backup_log STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM engine_backup_log > WHERE scope = v_scope > AND is_passed > ORDER BY scope, > done_at DESC LIMIT 1; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,624+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/engine_sessions_sp.sql... >2019-02-26 17:06:40,626+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/engine_sessions_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertEngineSession ( > INOUT v_id INT, > v_engine_session_id TEXT, > v_user_id UUID, > v_user_name VARCHAR(255), > v_authz_name VARCHAR(255), > v_source_ip VARCHAR(50), > v_group_ids VARCHAR(2048), > v_role_ids VARCHAR(2048) > ) >RETURNS INT AS $PROCEDURE$ >BEGIN > INSERT INTO engine_sessions ( > engine_session_id, > user_id, > user_name, > authz_name, > source_ip, > group_ids, > role_ids > ) > VALUES ( > v_engine_session_id, > v_user_id, > v_user_name, > v_authz_name, > v_source_ip, > v_group_ids, > v_role_ids > ); > > v_id := CURRVAL('engine_session_seq'); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetEngineSession (v_id INT) >RETURNS SETOF engine_sessions STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM engine_sessions > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetEngineSessionBySessionId (v_engine_session_id TEXT) >RETURNS SETOF engine_sessions STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM engine_sessions > WHERE engine_session_id = v_engine_session_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteEngineSession (v_id INT) >RETURNS INT AS $PROCEDURE$ >DECLARE deleted_rows INT; > >BEGIN > DELETE > FROM engine_sessions > WHERE id = v_id; > > GET DIAGNOSTICS deleted_rows = ROW_COUNT; > > RETURN deleted_rows; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllFromEngineSessions () >RETURNS INT AS $PROCEDURE$ >DECLARE deleted_rows INT; > >BEGIN > DELETE > FROM engine_sessions; > > GET DIAGNOSTICS deleted_rows = ROW_COUNT; > > RETURN deleted_rows; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,641+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/event_sp.sql... >2019-02-26 17:06:40,643+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/event_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION insertevent_notification_hist ( > v_audit_log_id BIGINT, > v_event_name VARCHAR(100), > v_method_type CHAR(10), > v_reason CHAR(255), > v_sent_at TIMESTAMP WITH TIME ZONE, > v_status BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO event_notification_hist ( > audit_log_id, > event_name, > method_type, > reason, > sent_at, > status > ) > VALUES ( > v_audit_log_id, > v_event_name, > v_method_type, > v_reason, > v_sent_at, > v_status > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertevent_subscriber ( > v_event_up_name VARCHAR(100), > v_notification_method VARCHAR(32), > v_method_address VARCHAR(255), > v_subscriber_id UUID, > v_tag_name VARCHAR(50) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > IF NOT EXISTS ( > SELECT * > FROM event_subscriber > WHERE subscriber_id = v_subscriber_id > AND event_up_name = v_event_up_name > AND notification_method = v_notification_method > AND tag_name = v_tag_name > ) THEN > INSERT INTO event_subscriber ( > event_up_name, > notification_method, > method_address, > subscriber_id, > tag_name > ) > VALUES ( > v_event_up_name, > v_notification_method, > v_method_address, > v_subscriber_id, > v_tag_name > ); > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getevent_subscriberBysubscriber_id (v_subscriber_id UUID) >RETURNS SETOF event_subscriber STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM event_subscriber > WHERE subscriber_id = v_subscriber_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deleteevent_subscriber ( > v_event_up_name VARCHAR(100), > v_notification_method VARCHAR(32), > v_subscriber_id UUID, > v_tag_name VARCHAR(50) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > IF (v_tag_name IS NULL) THEN > DELETE > FROM event_subscriber > WHERE event_up_name = v_event_up_name > AND notification_method = v_notification_method > AND subscriber_id = v_subscriber_id; > ELSE > DELETE > FROM event_subscriber > WHERE event_up_name = v_event_up_name > AND notification_method = v_notification_method > AND subscriber_id = v_subscriber_id > AND tag_name = v_tag_name; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deleteevent_notification_hist (v_sent_at TIMESTAMP) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM event_notification_hist > WHERE sent_at < v_sent_at; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,659+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/external_variable_sp.sql... >2019-02-26 17:06:40,661+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/external_variable_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertExternalVariable ( > v_var_name VARCHAR(100), > v_var_value VARCHAR(4000) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO external_variable ( > var_name, > var_value > ) > VALUES ( > v_var_name, > v_var_value > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateExternalVariable ( > v_var_name VARCHAR(100), > v_var_value VARCHAR(4000) > ) >RETURNS BOOLEAN AS $PROCEDURE$ >BEGIN > UPDATE external_variable > SET var_value = v_var_value, > _update_date = LOCALTIMESTAMP > WHERE var_name = v_var_name; > > RETURN found; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpsertExternalVariable ( > v_var_name VARCHAR(100), > v_var_value VARCHAR(4000) > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE record_found BOOLEAN; > >BEGIN > SELECT UpdateExternalVariable(v_var_name, v_var_value) > INTO record_found; > > IF NOT record_found THEN > PERFORM InsertExternalVariable(v_var_name, v_var_value); > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteExternalVariable (v_var_name VARCHAR(100)) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > DELETE > FROM external_variable > WHERE var_name = v_var_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetExternalVariableByName (v_var_name VARCHAR(100)) >RETURNS SETOF external_variable STABLE >AS $PROCEDURE$ > >BEGIN > RETURN QUERY > > SELECT external_variable.* > FROM external_variable > WHERE var_name = v_var_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,676+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/fence_agents_sp.sql... >2019-02-26 17:06:40,678+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/fence_agents_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetFenceAgentsByVdsId (v_vds_guid UUID) >RETURNS SETOF fence_agents STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT fence_agents.* > FROM fence_agents > WHERE vds_id = v_vds_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetFenceAgentById (v_guid UUID) >RETURNS SETOF fence_agents STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT fence_agents.* > FROM fence_agents > WHERE id = v_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteFenceAgent (v_guid UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM fence_agents > WHERE id = v_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteFenceAgentsByVdsId (v_vds_guid UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM fence_agents > WHERE vds_id = v_vds_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateFenceAgent ( > v_guid UUID, > v_vds_id UUID, > v_agent_order INT, > v_ip VARCHAR(255), > v_type VARCHAR(255), > v_agent_user VARCHAR(255), > v_agent_password TEXT, > v_options TEXT, > v_encrypt_options BOOLEAN, > v_port INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE fence_agents > SET vds_id = v_vds_id, > agent_order = v_agent_order, > ip = v_ip, > type = v_type, > agent_user = v_agent_user, > agent_password = v_agent_password, > port = v_port, > options = v_options, > encrypt_options = v_encrypt_options > WHERE id = v_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertFenceAgent ( > v_id UUID, > v_vds_id UUID, > v_agent_order INT, > v_ip VARCHAR(255), > v_type VARCHAR(255), > v_agent_user VARCHAR(255), > v_agent_password TEXT, > v_options TEXT, > v_encrypt_options BOOLEAN, > v_port INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO fence_agents ( > id, > vds_id, > agent_order, > ip, > type, > agent_user, > agent_password, > options, > encrypt_options, > port > ) > VALUES ( > v_id, > v_vds_id, > v_agent_order, > v_ip, > v_type, > v_agent_user, > v_agent_password, > v_options, > v_encrypt_options, > v_port > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,695+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/gluster_georep_sp.sql... >2019-02-26 17:06:40,697+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/gluster_georep_sp.sql >********* QUERY ********** >/* ---------------------------------------------------------------- > Stored procedures for database operations on Gluster Geo-replication > related tables: > - gluster_georep_session > - gluster_georep_config > - gluster_georep_session_details >----------------------------------------------------------------*/ >CREATE OR REPLACE FUNCTION InsertGlusterGeoRepSession ( > v_session_id UUID, > v_master_volume_id UUID, > v_session_key VARCHAR(150), > v_slave_host_name VARCHAR(50), > v_slave_host_uuid UUID, > v_slave_volume_name VARCHAR(50), > v_slave_volume_id UUID, > v_status VARCHAR(50), > v_user_name VARCHAR(255) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_georep_session ( > session_id, > master_volume_id, > session_key, > slave_host_name, > slave_host_uuid, > slave_volume_name, > slave_volume_id, > status, > user_name > ) > VALUES ( > v_session_id, > v_master_volume_id, > v_session_key, > v_slave_host_name, > v_slave_host_uuid, > v_slave_volume_name, > v_slave_volume_id, > v_status, > v_user_name > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterGeoRepSessionConfig ( > v_session_id UUID, > v_config_key VARCHAR(50), > v_config_value VARCHAR(50) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_georep_config ( > session_id, > config_key, > config_value > ) > VALUES ( > v_session_id, > v_config_key, > v_config_value > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterGeoRepSessionDetail ( > v_session_id UUID, > v_master_brick_id UUID, > v_slave_host_name VARCHAR(50), > v_slave_host_uuid UUID, > v_status VARCHAR(20), > v_checkpoint_status VARCHAR(20), > v_crawl_status VARCHAR(20), > v_data_pending BIGINT, > v_entry_pending BIGINT, > v_meta_pending BIGINT, > v_failures BIGINT, > v_last_synced_at TIMESTAMP, > v_checkpoint_time TIMESTAMP, > v_checkpoint_completed_time TIMESTAMP, > v_is_checkpoint_completed BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_georep_session_details ( > session_id, > master_brick_id, > slave_host_name, > slave_host_uuid, > status, > checkpoint_status, > crawl_status, > data_pending, > entry_pending, > meta_pending, > failures, > last_synced_at, > checkpoint_time, > checkpoint_completed_time, > is_checkpoint_completed > ) > VALUES ( > v_session_id, > v_master_brick_id, > v_slave_host_name, > v_slave_host_uuid, > v_status, > v_checkpoint_status, > v_crawl_status, > v_data_pending, > v_entry_pending, > v_meta_pending, > v_failures, > v_last_synced_at, > v_checkpoint_time, > v_checkpoint_completed_time, > v_is_checkpoint_completed > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterGeoRepSessionDetail ( > v_session_id UUID, > v_master_brick_id UUID, > v_slave_host_name VARCHAR(50), > v_slave_host_uuid UUID, > v_status VARCHAR(20), > v_checkpoint_status VARCHAR(20), > v_crawl_status VARCHAR(20), > v_data_pending BIGINT, > v_entry_pending BIGINT, > v_meta_pending BIGINT, > v_failures BIGINT, > v_last_synced_at TIMESTAMP, > v_checkpoint_time TIMESTAMP, > v_checkpoint_completed_time TIMESTAMP, > v_is_checkpoint_completed BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_georep_session_details > SET slave_host_name = v_slave_host_name, > slave_host_uuid = v_slave_host_uuid, > status = v_status, > checkpoint_status = v_checkpoint_status, > crawl_status = v_crawl_status, > data_pending = v_data_pending, > entry_pending = v_entry_pending, > meta_pending = v_meta_pending, > failures = v_failures, > last_synced_at = v_last_synced_at, > checkpoint_time = v_checkpoint_time, > checkpoint_completed_time = v_checkpoint_completed_time, > is_checkpoint_completed = v_is_checkpoint_completed, > _update_date = LOCALTIMESTAMP > WHERE session_id = v_session_id > AND master_brick_id = v_master_brick_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterGeoRepSessionConfig ( > v_session_id UUID, > v_config_key VARCHAR(50), > v_config_value VARCHAR(50) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_georep_config > SET config_value = v_config_value, > _update_date = LOCALTIMESTAMP > WHERE session_id = v_session_id > AND config_key = v_config_key; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterGeoRepSessionById (v_session_id UUID) >RETURNS SETOF gluster_georep_sessions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_georep_sessions_view > WHERE session_id = v_session_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterGeoRepSessionsByVolumeId (v_master_volume_id UUID) >RETURNS SETOF gluster_georep_sessions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_georep_sessions_view > WHERE master_volume_id = v_master_volume_id > ORDER BY slave_volume_name ASC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterGeoRepSessionsByClusterId (v_cluster_id UUID) >RETURNS SETOF gluster_georep_sessions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_georep_sessions_view > WHERE cluster_id = v_cluster_id > ORDER BY slave_volume_name ASC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterGeoRepSessionByKey (v_session_key VARCHAR(150)) >RETURNS SETOF gluster_georep_sessions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_georep_sessions_view > WHERE session_key = v_session_key; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterGeoRepSessionBySlaveHostAndVolume ( > v_master_volume_id UUID, > v_slave_host_uuid UUID, > v_slave_volume_name VARCHAR(150) > ) >RETURNS SETOF gluster_georep_sessions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_georep_sessions_view > WHERE master_volume_id = v_master_volume_id > AND slave_host_uuid = v_slave_host_uuid > AND slave_volume_name = v_slave_volume_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterGeoRepSessionBySlaveHostNameAndVolume ( > v_master_volume_id UUID, > v_slave_host_name VARCHAR(150), > v_slave_volume_name VARCHAR(150) > ) >RETURNS SETOF gluster_georep_sessions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_georep_sessions_view > WHERE master_volume_id = v_master_volume_id > AND slave_host_name = v_slave_host_name > AND slave_volume_name = v_slave_volume_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterGeoRepSession ( > v_session_id UUID, > v_status VARCHAR(50), > v_slave_host_uuid UUID, > v_slave_volume_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_georep_session > SET status = v_status, > slave_host_uuid = v_slave_host_uuid, > slave_volume_id = v_slave_volume_id, > _update_date = LOCALTIMESTAMP > WHERE session_id = v_session_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterGeoRepSessionDetails (v_session_id UUID) >RETURNS SETOF gluster_georep_session_details STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_georep_session_details > WHERE session_id = v_session_id > ORDER BY slave_host_name ASC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterGeoRepSessionDetailsForBrick ( > v_session_id UUID, > v_master_brick_id UUID > ) >RETURNS SETOF gluster_georep_session_details STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_georep_session_details > WHERE session_id = v_session_id > AND master_brick_id = v_master_brick_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterGeoRepSessionConfig (v_session_id UUID) >RETURNS SETOF gluster_geo_rep_config_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_geo_rep_config_view > WHERE session_id = v_session_id > ORDER BY config_key ASC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterGeoRepSessionUnSetConfig (v_session_id UUID) >RETURNS SETOF gluster_config_master STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_config_master > WHERE gluster_config_master.config_feature = 'geo_replication' > AND gluster_config_master.config_key NOT IN ( > SELECT config_key > FROM gluster_georep_config > WHERE gluster_georep_config.session_id = v_session_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterGeoRepSessionConfigByKey ( > v_session_id UUID, > v_config_key VARCHAR(50) > ) >RETURNS SETOF gluster_geo_rep_config_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_geo_rep_config_view > WHERE session_id = v_session_id > AND config_key = v_config_key; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllGlusterGeoRepSessions () >RETURNS SETOF gluster_georep_sessions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_georep_sessions_view; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterGeoRepSession (v_session_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_georep_session > WHERE session_id = v_session_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGeoRepSessionBySlaveVolume (v_slave_volume_id UUID) >RETURNS SETOF gluster_georep_sessions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_georep_sessions_view > WHERE slave_volume_id = v_slave_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,720+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/gluster_hooks_sp.sql... >2019-02-26 17:06:40,722+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/gluster_hooks_sp.sql >********* QUERY ********** >/* ---------------------------------------------------------------- > Stored procedures for database operations on Gluster Hooks > related tables: > - gluster_hooks > - gluster_server_hooks >----------------------------------------------------------------*/ >CREATE OR REPLACE FUNCTION InsertGlusterHook ( > v_id UUID, > v_cluster_id UUID, > v_gluster_command VARCHAR(128), > v_stage VARCHAR(50), > v_name VARCHAR(256), > v_hook_status VARCHAR(50), > v_content_type VARCHAR(50), > v_checksum VARCHAR(256), > v_content TEXT, > v_conflict_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_hooks ( > id, > cluster_id, > gluster_command, > stage, > name, > hook_status, > content_type, > checksum, > content, > conflict_status > ) > VALUES ( > v_id, > v_cluster_id, > v_gluster_command, > v_stage, > v_name, > v_hook_status, > v_content_type, > v_checksum, > v_content, > v_conflict_status > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterHookById ( > v_id UUID, > v_includeContent BOOLEAN = false > ) >RETURNS SETOF gluster_hooks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT id, > cluster_id, > gluster_command, > stage, > name, > hook_status, > content_type, > checksum, > CASE v_includeContent > WHEN true > THEN content > ELSE NULL::TEXT > END AS content, > conflict_status, > _create_date, > _update_date > FROM gluster_hooks > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterHookContentById (v_id UUID) >RETURNS SETOF TEXT STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT content > FROM gluster_hooks > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterHooksByClusterId (v_cluster_id UUID) >RETURNS SETOF gluster_hooks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT id, > cluster_id, > gluster_command, > stage, > name, > hook_status, > content_type, > checksum, > NULL::TEXT AS content, > conflict_status, > _create_date, > _update_date > FROM gluster_hooks > WHERE cluster_id = v_cluster_id > ORDER BY gluster_command ASC, > stage ASC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServerHooksById (v_id UUID) >RETURNS SETOF gluster_server_hooks_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_server_hooks_view > WHERE hook_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterHook ( > v_cluster_id UUID, > v_gluster_command VARCHAR(1000), > v_stage VARCHAR(100), > v_name VARCHAR(1000), > v_includeContent BOOLEAN = false > ) >RETURNS SETOF gluster_hooks STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT id, > cluster_id, > gluster_command, > stage, > name, > hook_status, > content_type, > checksum, > CASE v_includeContent > WHEN true > THEN content > ELSE NULL::TEXT > END AS content, > conflict_status, > _create_date, > _update_date > FROM gluster_hooks > WHERE cluster_id = v_cluster_id > AND gluster_command = v_gluster_command > AND stage = v_stage > AND name = v_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterHookById (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_hooks > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterHook ( > v_cluster_id UUID, > v_gluster_command VARCHAR(1000), > v_stage VARCHAR(100), > v_name VARCHAR(1000) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_hooks > WHERE cluster_id = v_cluster_id > AND gluster_command = v_gluster_command > AND stage = v_stage > AND name = v_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllGlusterHooks (v_cluster_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_hooks > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterHooksByIds (v_ids TEXT) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_hooks > WHERE id IN ( > SELECT * > FROM fnSplitterUuid(v_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterHookConflictStatus ( > v_id UUID, > v_conflict_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_hooks > SET conflict_status = v_conflict_status, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterHookContentType ( > v_id UUID, > v_content_type VARCHAR(100) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_hooks > SET content_type = v_content_type, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterHookContent ( > v_id UUID, > v_checksum VARCHAR(256), > v_content TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_hooks > SET checksum = v_checksum, > content = v_content, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterHook ( > v_id UUID, > v_hook_status VARCHAR(50), > v_content_type VARCHAR(50), > v_checksum VARCHAR(256), > v_content TEXT, > v_conflict_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_hooks > SET hook_status = v_hook_status, > content_type = v_content_type, > checksum = v_checksum, > content = v_content, > conflict_status = v_conflict_status, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterHookStatus ( > v_id UUID, > v_hook_status VARCHAR(50) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_hooks > SET hook_status = v_hook_status, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterServerHook ( > v_hook_id UUID, > v_server_id UUID, > v_hook_status VARCHAR(50), > v_content_type VARCHAR(50), > v_checksum VARCHAR(256) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_server_hooks ( > hook_id, > server_id, > hook_status, > content_type, > checksum > ) > VALUES ( > v_hook_id, > v_server_id, > v_hook_status, > v_content_type, > v_checksum > ); > > UPDATE gluster_hooks > SET _update_date = LOCALTIMESTAMP > WHERE id = v_hook_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServerHook ( > v_hook_id UUID, > v_server_id UUID > ) >RETURNS SETOF gluster_server_hooks_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_server_hooks_view > WHERE hook_id = v_hook_id > AND server_id = v_server_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterServerHook ( > v_hook_id UUID, > v_server_id UUID, > v_hook_status VARCHAR(50), > v_content_type VARCHAR(50), > v_checksum VARCHAR(256) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_server_hooks > SET hook_status = v_hook_status, > content_type = v_content_type, > checksum = v_checksum, > _update_date = LOCALTIMESTAMP > WHERE hook_id = v_hook_id > AND server_id = v_server_id; > > UPDATE gluster_hooks > SET _update_date = LOCALTIMESTAMP > WHERE id = v_hook_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterServerHookStatus ( > v_hook_id UUID, > v_server_id UUID, > v_hook_status VARCHAR(100) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_server_hooks > SET hook_status = v_hook_status, > _update_date = LOCALTIMESTAMP > WHERE hook_id = v_hook_id > AND server_id = v_server_id; > > UPDATE gluster_hooks > SET _update_date = LOCALTIMESTAMP > WHERE id = v_hook_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterServerHookChecksum ( > v_hook_id UUID, > v_server_id UUID, > v_checksum VARCHAR(100) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_server_hooks > SET checksum = v_checksum, > _update_date = LOCALTIMESTAMP > WHERE hook_id = v_hook_id > AND server_id = v_server_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterServerHookById (v_hook_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_server_hooks > WHERE hook_id = v_hook_id; > > UPDATE gluster_hooks > SET _update_date = LOCALTIMESTAMP > WHERE id = v_hook_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterServerHooksByIds (v_ids TEXT) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_server_hooks > WHERE hook_id IN ( > SELECT * > FROM fnSplitterUuid(v_ids) > ); > > UPDATE gluster_hooks > SET _update_date = LOCALTIMESTAMP > WHERE id IN ( > SELECT * > FROM fnSplitterUuid(v_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterServerHook ( > v_hook_id UUID, > v_server_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_server_hooks > WHERE hook_id = v_hook_id > AND server_id = v_server_id; > > UPDATE gluster_hooks > SET _update_date = LOCALTIMESTAMP > WHERE id = v_hook_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,746+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/gluster_server_sp.sql... >2019-02-26 17:06:40,748+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/gluster_server_sp.sql >********* QUERY ********** >/*-------------------------------------------------------------- >Stored procedures for database operations on gluster_server table >--------------------------------------------------------------*/ >CREATE OR REPLACE FUNCTION InsertGlusterServer ( > v_server_id UUID, > v_gluster_server_uuid UUID, > v_peer_status VARCHAR(20) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_server ( > server_id, > gluster_server_uuid, > peer_status > ) > VALUES ( > v_server_id, > v_gluster_server_uuid, > v_peer_status > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServerByServerId (v_server_id UUID) >RETURNS SETOF gluster_server STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_server > WHERE server_id = v_server_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServerByGlusterServerUUID (v_gluster_server_uuid UUID) >RETURNS SETOF gluster_server STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_server > WHERE gluster_server_uuid = v_gluster_server_uuid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterServer (v_server_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_server > WHERE server_id = v_server_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterServerByGlusterServerUUID (v_gluster_server_uuid UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_server > WHERE gluster_server_uuid = v_gluster_server_uuid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterServer ( > v_server_id UUID, > v_gluster_server_uuid UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_server > SET gluster_server_uuid = v_gluster_server_uuid > WHERE server_id = v_server_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterServerKnownAddresses ( > v_server_id UUID, > v_known_addresses VARCHAR(250) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_server > SET known_addresses = v_known_addresses > WHERE server_id = v_server_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterServerPeerStatus ( > v_server_id UUID, > v_peer_status VARCHAR(50) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_server > SET peer_status = v_peer_status > WHERE server_id = v_server_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION AddGlusterServerKnownAddress ( > v_server_id UUID, > v_known_address VARCHAR(250) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_server > SET known_addresses = coalesce(known_addresses || ',', '') || v_known_address > WHERE server_id = v_server_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,766+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/gluster_services_sp.sql... >2019-02-26 17:06:40,768+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/gluster_services_sp.sql >********* QUERY ********** >/* ---------------------------------------------------------------- > Stored procedures for database operations on Services > related tables: > - gluster_service_types > - gluster_services > - gluster_cluster_services > - gluster_server_services >----------------------------------------------------------------*/ > >CREATE OR REPLACE FUNCTION GetGlusterServiceTypes () >RETURNS SETOF gluster_service_types STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_service_types; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServicesByType (v_service_type VARCHAR(100)) >RETURNS SETOF gluster_services STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_services > WHERE service_type = v_service_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterClusterServicesByClusterId (v_cluster_id UUID) >RETURNS SETOF gluster_cluster_services STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_cluster_services > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterClusterServicesByClusterIdAndServiceType ( > v_cluster_id UUID, > v_service_type VARCHAR(100) > ) >RETURNS SETOF gluster_cluster_services STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_cluster_services > WHERE cluster_id = v_cluster_id > AND service_type = v_service_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServerServicesByServerId (v_server_id UUID) >RETURNS SETOF gluster_server_services_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_server_services_view > WHERE server_id = v_server_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServerServicesByClusterId (v_cluster_id UUID) >RETURNS SETOF gluster_server_services_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT s.* > FROM gluster_server_services_view s, > vds_static v > WHERE s.server_id = v.vds_id > AND v.cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServerServicesByClusterIdAndServiceType ( > v_cluster_id UUID, > v_service_type VARCHAR(100) > ) >RETURNS SETOF gluster_server_services_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT s.* > FROM gluster_server_services_view s, > vds_static v > WHERE s.server_id = v.vds_id > AND v.cluster_id = v_cluster_id > AND s.service_type = v_service_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServerServicesByServerIdAndServiceType ( > v_server_id UUID, > v_service_type VARCHAR(100) > ) >RETURNS SETOF gluster_server_services_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_server_services_view > WHERE server_id = v_server_id > AND service_type = v_service_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServiceByGlusterServiceId (v_id UUID) >RETURNS SETOF gluster_services STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_services > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServerServiceByGlusterServerServiceId (v_id UUID) >RETURNS SETOF gluster_server_services_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_server_services_view > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromGlusterServerServices () >RETURNS SETOF gluster_server_services_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_server_services_view; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterServiceByTypeAndName ( > v_service_type VARCHAR(100), > v_service_name VARCHAR(100) > ) >RETURNS SETOF gluster_services STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_services > WHERE service_type = v_service_type > AND service_name = v_service_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromGlusterServices () >RETURNS SETOF gluster_services STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_services; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterClusterService ( > v_cluster_id UUID, > v_service_type VARCHAR(100), > v_status VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_cluster_services ( > cluster_id, > service_type, > status > ) > VALUES ( > v_cluster_id, > v_service_type, > v_status > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterServerService ( > v_id UUID, > v_server_id UUID, > v_service_id UUID, > v_pid INT, > v_status VARCHAR(32), > v_message VARCHAR(1000) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_server_services ( > id, > server_id, > service_id, > pid, > status, > message > ) > VALUES ( > v_id, > v_server_id, > v_service_id, > v_pid, > v_status, > v_message > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterClusterService ( > v_cluster_id UUID, > v_service_type VARCHAR(100), > v_status VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_cluster_services > SET status = v_status, > _update_date = LOCALTIMESTAMP > WHERE cluster_id = v_cluster_id > AND service_type = v_service_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterServerService ( > v_id UUID, > v_pid INT, > v_status VARCHAR(32), > v_message VARCHAR(1000) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_server_services > SET pid = v_pid, > status = v_status, > message = v_message, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterServerServiceByServerIdAndServiceType ( > v_server_id UUID, > v_service_id UUID, > v_pid INT, > v_status VARCHAR(32), > v_message VARCHAR(1000) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_server_services > SET pid = v_pid, > status = v_status, > message = v_message, > _update_date = LOCALTIMESTAMP > WHERE server_id = v_server_id > AND service_id = v_service_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterServerService (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_server_services > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,790+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/gluster_volume_snapshot_schedule_sp.sql... >2019-02-26 17:06:40,792+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/gluster_volume_snapshot_schedule_sp.sql >********* QUERY ********** >/* ---------------------------------------------------------------- > Stored procedures for database operations on Gluster Volume Snapshot > related tables: > - gluster_volume_snapshot_schedules >----------------------------------------------------------------*/ >CREATE OR REPLACE FUNCTION InsertGlusterVolumeSnapshotSchedule ( > v_volume_id UUID, > v_job_id VARCHAR(256), > v_snapshot_name_prefix VARCHAR(128), > v_snapshot_description VARCHAR(1024), > v_recurrence VARCHAR(128), > v_time_zone VARCHAR(128), > v_interval INT, > v_start_date TIMESTAMP WITH TIME ZONE, > v_execution_time TIME, > v_days VARCHAR(256), > v_end_by TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_volume_snapshot_schedules ( > volume_id, > job_id, > snapshot_name_prefix, > snapshot_description, > recurrence, > time_zone, > interval, > start_date, > execution_time, > days, > end_by > ) > VALUES ( > v_volume_id, > v_job_id, > v_snapshot_name_prefix, > v_snapshot_description, > v_recurrence, > v_time_zone, > v_interval, > v_start_date, > v_execution_time, > v_days, > v_end_by > ); > > UPDATE gluster_volumes > SET snapshot_scheduled = true > WHERE id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeSnapshotScheduleByVolumeId (v_volume_id UUID) >RETURNS SETOF gluster_volume_snapshot_schedules_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_snapshot_schedules_view > WHERE volume_id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeSnapshotScheduleByVolumeId (v_volume_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volume_snapshot_schedules > WHERE volume_id = v_volume_id; > > UPDATE gluster_volumes > SET snapshot_scheduled = false > WHERE id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeSnapshotScheduleByVolumeId ( > v_volume_id UUID, > v_job_id VARCHAR(256), > v_snapshot_name_prefix VARCHAR(128), > v_snapshot_description VARCHAR(1024), > v_recurrence VARCHAR(128), > v_time_zone VARCHAR(128), > v_interval INT, > v_start_date TIMESTAMP WITH TIME ZONE, > v_execution_time TIME, > v_days VARCHAR(256), > v_end_by TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_snapshot_schedules > SET job_id = v_job_id, > snapshot_name_prefix = v_snapshot_name_prefix, > snapshot_description = v_snapshot_description, > recurrence = v_recurrence, > time_zone = v_time_zone, > interval = v_interval, > start_date = v_start_date, > execution_time = v_execution_time, > days = v_days, > end_by = v_end_by, > _update_date = LOCALTIMESTAMP > WHERE volume_id = v_volume_id; > > UPDATE gluster_volumes > SET snapshot_scheduled = true > WHERE id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,807+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/gluster_volume_snapshot_sp.sql... >2019-02-26 17:06:40,809+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/gluster_volume_snapshot_sp.sql >********* QUERY ********** >/* ---------------------------------------------------------------- > Stored procedures for database operations on Gluster Volume Snapshot > related tables: > - gluster_volume_snapshots > - gluster_volume_snapshot_config >----------------------------------------------------------------*/ >CREATE OR REPLACE FUNCTION InsertGlusterVolumeSnapshot ( > v_snapshot_id UUID, > v_snapshot_name VARCHAR(1000), > v_volume_id UUID, > v_description VARCHAR(1024), > v_status VARCHAR(32), > v__create_date TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_volume_snapshots ( > snapshot_id, > snapshot_name, > volume_id, > description, > status, > _create_date > ) > VALUES ( > v_snapshot_id, > v_snapshot_name, > v_volume_id, > v_description, > v_status, > v__create_date > ); > > PERFORM UpdateSnapshotCountInc(v_volume_id, 1); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeSnapshotById (v_snapshot_id UUID) >RETURNS SETOF gluster_volume_snapshots_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_snapshots_view > WHERE snapshot_id = v_snapshot_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeSnapshotsByVolumeId (v_volume_id UUID) >RETURNS SETOF gluster_volume_snapshots_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_snapshots_view > WHERE volume_id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeSnapshotsByClusterId (v_cluster_id UUID) >RETURNS SETOF gluster_volume_snapshots_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_snapshots_view > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeSnapshotByName ( > v_volume_id UUID, > v_snapshot_name VARCHAR(1000) > ) >RETURNS SETOF gluster_volume_snapshots_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_snapshots_view > WHERE volume_id = v_volume_id > AND snapshot_name = v_snapshot_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeSnapshotByGuid (v_snapshot_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE ref_volume_id UUID; > >BEGIN > SELECT volume_id > INTO ref_volume_id > FROM gluster_volume_snapshots > WHERE snapshot_id = v_snapshot_id; > > DELETE > FROM gluster_volume_snapshots > WHERE snapshot_id = v_snapshot_id; > > PERFORM UpdateSnapshotCountDec(ref_volume_id, 1); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeSnapshotsByVolumeId (v_volume_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volume_snapshots > WHERE volume_id = v_volume_id; > > UPDATE gluster_volumes > SET snapshot_count = 0 > WHERE id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeSnapshotByName ( > v_volume_id UUID, > v_snapshot_name VARCHAR(1000) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volume_snapshots > WHERE volume_id = v_volume_id > AND snapshot_name = v_snapshot_name; > > PERFORM UpdateSnapshotCountDec(v_volume_id, 1); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumesSnapshotByIds (v_snapshot_ids VARCHAR(5000)) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_volume_id UUID; > >v_snapshot_count INT; > >v_cur CURSOR >FOR > >SELECT volume_id, > count(volume_id) >FROM gluster_volume_snapshots >WHERE snapshot_id IN ( > SELECT * > FROM fnSplitterUuid(v_snapshot_ids) > ) >GROUP BY volume_id; > >BEGIN > OPEN v_cur; > > LOOP > > FETCH v_cur > INTO v_volume_id, > v_snapshot_count; > > EXIT WHEN NOT FOUND; > > PERFORM UpdateSnapshotCountDec(v_volume_id, v_snapshot_count); >END LOOP; > >CLOSE v_cur; > >DELETE >FROM gluster_volume_snapshots >WHERE snapshot_id IN ( > SELECT * > FROM fnSplitterUuid(v_snapshot_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeSnapshotStatus ( > v_snapshot_id UUID, > v_status VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_snapshots > SET status = v_status, > _update_date = LOCALTIMESTAMP > WHERE snapshot_id = v_snapshot_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeSnapshotStatusByName ( > v_volume_id UUID, > v_snapshot_name VARCHAR(1000), > v_status VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_snapshots > SET status = v_status, > _update_date = LOCALTIMESTAMP > WHERE volume_id = v_volume_id > AND snapshot_name = v_snapshot_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterVolumeSnapshotConfig ( > v_cluster_id UUID, > v_volume_id UUID, > v_param_name VARCHAR(128), > v_param_value VARCHAR(128) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_volume_snapshot_config ( > cluster_id, > volume_id, > param_name, > param_value > ) > VALUES ( > v_cluster_id, > v_volume_id, > v_param_name, > v_param_value > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeSnapshotConfigByClusterId (v_cluster_id UUID) >RETURNS SETOF gluster_volume_snapshot_config STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_snapshot_config > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeSnapshotConfigByVolumeId ( > v_cluster_id UUID, > v_volume_id UUID > ) >RETURNS SETOF gluster_volume_snapshot_config STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_snapshot_config > WHERE cluster_id = v_cluster_id > AND volume_id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeSnapshotConfigByClusterIdAndName ( > v_cluster_id UUID, > v_param_name VARCHAR(128) > ) >RETURNS SETOF gluster_volume_snapshot_config STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_snapshot_config > WHERE cluster_id = v_cluster_id > AND volume_id IS NULL > AND param_name = v_param_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeSnapshotConfigByVolumeIdAndName ( > v_cluster_id UUID, > v_volume_id UUID, > v_param_name VARCHAR(128) > ) >RETURNS SETOF gluster_volume_snapshot_config STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_snapshot_config > WHERE cluster_id = v_cluster_id > AND volume_id = v_volume_id > AND param_name = v_param_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateConfigByClusterIdAndName ( > v_cluster_id UUID, > v_param_name VARCHAR(128), > v_param_value VARCHAR(128) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_snapshot_config > SET param_value = v_param_value, > _update_date = LOCALTIMESTAMP > WHERE cluster_id = v_cluster_id > AND volume_id IS NULL > AND param_name = v_param_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateConfigByVolumeIdIdAndName ( > v_cluster_id UUID, > v_volume_id UUID, > v_param_name VARCHAR(128), > v_param_value VARCHAR(128) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_snapshot_config > SET param_value = v_param_value, > _update_date = LOCALTIMESTAMP > WHERE cluster_id = v_cluster_id > AND volume_id = v_volume_id > AND param_name = v_param_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateSnapshotCountInc ( > v_volume_id UUID, > v_num INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volumes > SET snapshot_count = snapshot_count + v_num > WHERE id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateSnapshotCountDec ( > v_volume_id UUID, > v_num INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volumes > SET snapshot_count = snapshot_count - v_num > WHERE id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,832+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/gluster_volumes_sp.sql... >2019-02-26 17:06:40,834+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/gluster_volumes_sp.sql >********* QUERY ********** >/* ---------------------------------------------------------------- > Stored procedures for database operations on Gluster Volume > related tables: > - gluster_volumes > - gluster_volume_bricks > - gluster_volume_options > - gluster_volume_access_protocols > - gluster_volume_transport_types >----------------------------------------------------------------*/ >CREATE OR REPLACE FUNCTION InsertGlusterVolume ( > v_id UUID, > v_cluster_id UUID, > v_vol_name VARCHAR(1000), > v_vol_type VARCHAR(32), > v_status VARCHAR(32), > v_replica_count INT, > v_stripe_count INT, > v_disperse_count INT, > v_redundancy_count INT, > v_is_arbiter boolean > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_volumes ( > id, > cluster_id, > vol_name, > vol_type, > status, > replica_count, > stripe_count, > disperse_count, > redundancy_count, > is_arbiter > ) > VALUES ( > v_id, > v_cluster_id, > v_vol_name, > v_vol_type, > v_status, > v_replica_count, > v_stripe_count, > v_disperse_count, > v_redundancy_count, > v_is_arbiter > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterVolumeDetails ( > v_volume_id UUID, > v_total_space BIGINT, > v_used_space BIGINT, > v_free_space BIGINT, > v_confirmed_free_space BIGINT, > v_vdo_savings INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_volume_details ( > volume_id, > total_space, > used_space, > free_space, > confirmed_free_space, > vdo_savings, > _update_date > ) > VALUES ( > v_volume_id, > v_total_space, > v_used_space, > v_free_space, > v_confirmed_free_space, > v_vdo_savings, > LOCALTIMESTAMP > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterVolumeBrick ( > v_id UUID, > v_volume_id UUID, > v_server_id UUID, > v_brick_dir VARCHAR(4096), > v_brick_order INT, > v_status VARCHAR(32), > v_network_id UUID, > v_is_arbiter boolean > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_volume_bricks ( > id, > volume_id, > server_id, > brick_dir, > brick_order, > status, > network_id, > is_arbiter > ) > VALUES ( > v_id, > v_volume_id, > v_server_id, > v_brick_dir, > v_brick_order, > v_status, > v_network_id, > v_is_arbiter > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterVolumeBrickDetails ( > v_brick_id UUID, > v_total_space BIGINT, > v_used_space BIGINT, > v_free_space BIGINT, > v_confirmed_free_space BIGINT, > v_confirmed_total_space BIGINT, > v_vdo_savings INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_volume_brick_details ( > brick_id, > total_space, > used_space, > free_space, > confirmed_free_space, > confirmed_total_space, > vdo_savings, > _update_date > ) > VALUES ( > v_brick_id, > v_total_space, > v_used_space, > v_free_space, > v_confirmed_free_space, > v_confirmed_total_space, > v_vdo_savings, > LOCALTIMESTAMP > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterVolumeOption ( > v_id UUID, > v_volume_id UUID, > v_option_key VARCHAR(8192), > v_option_val VARCHAR(8192) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_volume_options ( > id, > volume_id, > option_key, > option_val > ) > VALUES ( > v_id, > v_volume_id, > v_option_key, > v_option_val > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterVolumeAccessProtocol ( > v_volume_id UUID, > v_access_protocol VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_volume_access_protocols ( > volume_id, > access_protocol > ) > VALUES ( > v_volume_id, > v_access_protocol > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertGlusterVolumeTransportType ( > v_volume_id UUID, > v_transport_type VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO gluster_volume_transport_types ( > volume_id, > transport_type > ) > VALUES ( > v_volume_id, > v_transport_type > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumesByClusterGuid (v_cluster_id UUID) >RETURNS SETOF gluster_volumes_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volumes_view > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumesSupportedAsStorageDomain () >RETURNS SETOF gluster_volumes_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM gluster_volumes_view > WHERE vol_type IN ('REPLICATE', 'DISTRIBUTE', 'DISTRIBUTED_REPLICATE') > AND replica_count IN (0, 3); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumesByOption ( > v_cluster_id UUID, > v_status VARCHAR(32), > v_option_key VARCHAR(8192), > v_option_val VARCHAR(8192) > ) >RETURNS SETOF gluster_volumes_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volumes_view > WHERE cluster_id = v_cluster_id > AND status = v_status > AND id IN ( > SELECT volume_id > FROM gluster_volume_options > WHERE option_key = v_option_key > AND option_val = v_option_val > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumesByStatusTypesAndOption ( > v_cluster_id UUID, > v_status VARCHAR(32), > v_vol_types TEXT, > v_option_key VARCHAR(8192), > v_option_val VARCHAR(8192) > ) >RETURNS SETOF gluster_volumes_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volumes_view > WHERE cluster_id = v_cluster_id > AND status = v_status > AND vol_type IN ( > SELECT ID > FROM fnSplitter(v_vol_types) > ) > AND id IN ( > SELECT volume_id > FROM gluster_volume_options > WHERE option_key = v_option_key > AND option_val = v_option_val > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumesByStatusAndTypes ( > v_cluster_id UUID, > v_status VARCHAR(32), > v_vol_types TEXT > ) >RETURNS SETOF gluster_volumes_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volumes_view > WHERE cluster_id = v_cluster_id > AND status = v_status > AND vol_type IN ( > SELECT ID > FROM fnSplitter(v_vol_types) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeById (v_volume_id UUID) >RETURNS SETOF gluster_volumes_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volumes_view > WHERE id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeByName ( > v_cluster_id UUID, > v_vol_name VARCHAR(1000) > ) >RETURNS SETOF gluster_volumes_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volumes_view > WHERE cluster_id = v_cluster_id > AND vol_name = v_vol_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeByGlusterTaskId (v_task_id UUID) >RETURNS SETOF gluster_volumes_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volumes_view > WHERE task_id = v_task_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeDetailsById (v_volume_id UUID) >RETURNS SETOF gluster_volume_details STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_details > WHERE volume_id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterBrickById (v_id UUID) >RETURNS SETOF gluster_volume_bricks_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_bricks_view > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetBricksByGlusterVolumeGuid (v_volume_id UUID) >RETURNS SETOF gluster_volume_bricks_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_bricks_view > WHERE volume_id = v_volume_id > ORDER BY brick_order; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterVolumeBricksByServerGuid (v_server_id UUID) >RETURNS SETOF gluster_volume_bricks_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_bricks_view > WHERE server_id = v_server_id > ORDER BY brick_order; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetBrickByServerIdAndDirectory ( > v_server_id UUID, > v_brick_dir VARCHAR(4096) > ) >RETURNS SETOF gluster_volume_bricks_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_bricks_view > WHERE server_id = v_server_id > AND brick_dir = v_brick_dir; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetBricksByTaskId (v_task_id UUID) >RETURNS SETOF gluster_volume_bricks_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_bricks_view > WHERE task_id = v_task_id > ORDER BY brick_order; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetBrickDetailsById (v_brick_id UUID) >RETURNS SETOF gluster_volume_brick_details STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_brick_details > WHERE brick_id = v_brick_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterOptionById (v_id UUID) >RETURNS SETOF gluster_volume_options STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_options > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetOptionsByGlusterVolumeGuid (v_volume_id UUID) >RETURNS SETOF gluster_volume_options STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_options > WHERE volume_id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAccessProtocolsByGlusterVolumeGuid (v_volume_id UUID) >RETURNS SETOF gluster_volume_access_protocols STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_access_protocols > WHERE volume_id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetGlusterTaskByGlusterVolumeGuid (v_volume_id UUID) >RETURNS SETOF gluster_volume_task_steps STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT gluster_volume_task_steps.* > FROM gluster_volume_task_steps, > gluster_volumes vol > WHERE volume_id = v_volume_id > AND vol.id = volume_id > AND ( > job_status = 'STARTED' > OR ( > job_status != 'STARTED' > AND external_id = vol.task_id > ) > ) > ORDER BY job_start_time DESC LIMIT 1; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetTransportTypesByGlusterVolumeGuid (v_volume_id UUID) >RETURNS SETOF gluster_volume_transport_types STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_transport_types > WHERE volume_id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeByGuid (v_volume_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volumes > WHERE id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumesByGuids (v_volume_ids VARCHAR(5000)) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volumes > WHERE id IN ( > SELECT * > FROM fnSplitterUuid(v_volume_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeByName ( > v_cluster_id UUID, > v_vol_name VARCHAR(1000) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volumes > WHERE cluster_id = v_cluster_id > AND vol_name = v_vol_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumesByClusterId (v_cluster_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volumes > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeBrick (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volume_bricks > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeBricks (v_ids VARCHAR(5000)) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volume_bricks > WHERE id IN ( > SELECT * > FROM fnSplitterUuid(v_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeOption (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volume_options > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeOptions (v_ids VARCHAR(5000)) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volume_options > WHERE id IN ( > SELECT * > FROM fnSplitterUuid(v_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeAccessProtocol ( > v_volume_id UUID, > v_access_protocol VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volume_access_protocols > WHERE volume_id = v_volume_id > AND access_protocol = v_access_protocol; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteGlusterVolumeTransportType ( > v_volume_id UUID, > v_transport_type VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM gluster_volume_transport_types > WHERE volume_id = v_volume_id > AND transport_type = v_transport_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolume ( > v_id UUID, > v_cluster_id UUID, > v_vol_name VARCHAR(1000), > v_vol_type VARCHAR(32), > v_status VARCHAR(32), > v_replica_count INT, > v_stripe_count INT, > v_disperse_count INT, > v_redundancy_count INT, > v_is_arbiter boolean > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volumes > SET cluster_id = v_cluster_id, > vol_name = v_vol_name, > vol_type = v_vol_type, > status = v_status, > replica_count = v_replica_count, > stripe_count = v_stripe_count, > disperse_count = v_disperse_count, > redundancy_count = v_redundancy_count, > is_arbiter = v_is_arbiter, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeDetails ( > v_volume_id UUID, > v_total_space BIGINT, > v_used_space BIGINT, > v_free_space BIGINT, > v_confirmed_free_space BIGINT, > v_vdo_savings INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_details > SET total_space = v_total_space, > used_space = v_used_space, > free_space = v_free_space, > confirmed_free_space = v_confirmed_free_space, > vdo_savings = v_vdo_savings, > _update_date = LOCALTIMESTAMP > WHERE volume_id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeBrick ( > v_id UUID, > v_new_id UUID, > v_new_server_id UUID, > v_new_brick_dir VARCHAR(4096), > v_new_status VARCHAR(32), > v_new_network_id UUID, > v_is_arbiter boolean > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE FROM gluster_volume_brick_details > WHERE brick_id = v_id; > UPDATE gluster_volume_bricks > SET id = v_new_id, > server_id = v_new_server_id, > brick_dir = v_new_brick_dir, > status = v_new_status, > network_id = v_new_network_id, > is_arbiter = v_is_arbiter, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeBrickDetails ( > v_brick_id UUID, > v_total_space BIGINT, > v_used_space BIGINT, > v_free_space BIGINT, > v_confirmed_free_space BIGINT, > v_confirmed_total_space BIGINT, > v_vdo_savings INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_brick_details > SET total_space = v_total_space, > used_space = v_used_space, > free_space = v_free_space, > confirmed_free_space = v_confirmed_free_space, > confirmed_total_space = v_confirmed_total_space, > vdo_savings = v_vdo_savings, > _update_date = LOCALTIMESTAMP > WHERE brick_id = v_brick_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeBrickStatus ( > v_id UUID, > v_status VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_bricks > SET status = v_status, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeBrickOrder ( > v_id UUID, > v_brick_order INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_bricks > SET brick_order = v_brick_order, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeBrickNetworkId ( > v_id UUID, > v_network_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_bricks > SET network_id = v_network_id, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeStatus ( > v_volume_id UUID, > v_status VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volumes > SET status = v_status, > _update_date = LOCALTIMESTAMP > WHERE id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeAsyncTask ( > v_volume_id UUID, > v_task_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volumes > SET task_id = v_task_id, > _update_date = LOCALTIMESTAMP > WHERE id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeBrickAsyncTask ( > v_id UUID, > v_task_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_bricks > SET task_id = v_task_id, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterBrickTaskByServerIdBrickDir ( > v_server_id UUID, > v_brick_dir VARCHAR(200), > v_task_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_bricks > SET task_id = v_task_id, > _update_date = LOCALTIMESTAMP > WHERE server_id = v_server_id > AND brick_dir = v_brick_dir; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeBrickUnSyncedEntries ( > v_id UUID, > v_unsynced_entries integer, > v_unsynced_entries_history text > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_bricks > SET unsynced_entries = v_unsynced_entries, > unsynced_entries_history = v_unsynced_entries_history, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeStatusByName ( > v_cluster_id UUID, > v_vol_name VARCHAR(1000), > v_status VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volumes > SET status = v_status, > _update_date = LOCALTIMESTAMP > WHERE cluster_id = v_cluster_id > AND vol_name = v_vol_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateGlusterVolumeOption ( > v_id UUID, > v_option_val VARCHAR(8192) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volume_options > SET option_val = v_option_val > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateReplicaCount ( > v_volume_id UUID, > v_replica_count INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE gluster_volumes > SET replica_count = v_replica_count, > _update_date = LOCALTIMESTAMP > WHERE id = v_volume_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetBricksByClusterIdAndNetworkId ( > v_cluster_id UUID, > v_network_id UUID > ) >RETURNS SETOF gluster_volume_bricks_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM gluster_volume_bricks_view > WHERE network_id = v_network_id > AND cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,873+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/host_device_sp.sql... >2019-02-26 17:06:40,875+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/host_device_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertHostDevice ( > v_host_id UUID, > v_device_name VARCHAR(255), > v_parent_device_name VARCHAR(255), > v_capability VARCHAR(32), > v_iommu_group INT, > v_product_name VARCHAR(255), > v_product_id VARCHAR(255), > v_vendor_name VARCHAR(255), > v_vendor_id VARCHAR(255), > v_physfn VARCHAR(255), > v_total_vfs INT, > v_net_iface_name VARCHAR(50), > v_driver VARCHAR(255), > v_is_assignable BOOLEAN, > v_address VARCHAR(255), > v_mdev_types TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > SET CONSTRAINTS ALL DEFERRED; > > INSERT INTO host_device ( > host_id, > device_name, > parent_device_name, > capability, > iommu_group, > product_name, > product_id, > vendor_name, > vendor_id, > physfn, > total_vfs, > net_iface_name, > driver, > is_assignable, > address, > mdev_types > ) > VALUES ( > v_host_id, > v_device_name, > v_parent_device_name, > v_capability, > v_iommu_group, > v_product_name, > v_product_id, > v_vendor_name, > v_vendor_id, > v_physfn, > v_total_vfs, > v_net_iface_name, > v_driver, > v_is_assignable, > v_address, > v_mdev_types > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateHostDevice ( > v_host_id UUID, > v_device_name VARCHAR(255), > v_parent_device_name VARCHAR(255), > v_capability VARCHAR(32), > v_iommu_group INT, > v_product_name VARCHAR(255), > v_product_id VARCHAR(255), > v_vendor_name VARCHAR(255), > v_vendor_id VARCHAR(255), > v_physfn VARCHAR(255), > v_total_vfs INT, > v_net_iface_name VARCHAR(50), > v_driver VARCHAR(255), > v_is_assignable BOOLEAN, > v_address VARCHAR(255), > v_mdev_types TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > SET CONSTRAINTS ALL DEFERRED; > > UPDATE host_device > SET host_id = v_host_id, > device_name = v_device_name, > parent_device_name = v_parent_device_name, > capability = v_capability, > iommu_group = v_iommu_group, > product_name = v_product_name, > product_id = v_product_id, > vendor_name = v_vendor_name, > vendor_id = v_vendor_id, > physfn = v_physfn, > total_vfs = v_total_vfs, > net_iface_name = v_net_iface_name, > driver = v_driver, > is_assignable = v_is_assignable, > address = v_address, > mdev_types = v_mdev_types > WHERE host_id = v_host_id > AND device_name = v_device_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteHostDevice ( > v_host_id UUID, > v_device_name VARCHAR(255) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > SET CONSTRAINTS ALL DEFERRED; > > DELETE > FROM host_device > WHERE host_id = v_host_id > AND device_name = v_device_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetHostDevicesByHostId (v_host_id UUID) >RETURNS SETOF host_device STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM host_device > WHERE host_id = v_host_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetHostDevicesByHostIdAndIommuGroup ( > v_host_id UUID, > v_iommu_group INT > ) >RETURNS SETOF host_device STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM host_device > WHERE host_id = v_host_id > AND iommu_group = v_iommu_group; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetHostDeviceByHostIdAndDeviceName ( > v_host_id UUID, > v_device_name VARCHAR(255) > ) >RETURNS SETOF host_device STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM host_device > WHERE host_id = v_host_id > AND device_name = v_device_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromHostDevices () >RETURNS SETOF host_device STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM host_device; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmExtendedHostDevicesByVmId (v_vm_id UUID) >RETURNS SETOF vm_host_device_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_host_device_view.* > FROM vm_host_device_view > WHERE vm_host_device_view.configured_vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetExtendedHostDevicesByHostId (v_host_id UUID) >RETURNS SETOF host_device_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT host_device_view.* > FROM host_device_view > WHERE host_device_view.host_id = v_host_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION CheckVmHostDeviceAvailability ( > v_vm_id UUID, > v_host_id UUID > ) >RETURNS BOOLEAN STABLE AS $PROCEDURE$ >BEGIN > RETURN NOT EXISTS ( > SELECT 1 > FROM vm_device > WHERE vm_id = v_vm_id > AND device IN ( > SELECT device_name > FROM host_device > WHERE host_id = v_host_id > AND vm_id IS NOT NULL > AND vm_id <> v_vm_id > ) > );-- device free or already belonging to the vm >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION MarkHostDevicesUsedByVmId ( > v_vm_id UUID, > v_host_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE host_device > SET vm_id = v_vm_id > WHERE host_id = v_host_id > AND device_name IN ( > SELECT device > FROM vm_device > WHERE vm_id = v_vm_id > AND type = 'hostdev' > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION SetVmIdOnHostDevice ( > v_host_id UUID, > v_device_name VARCHAR(255), > v_vm_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE host_device > SET vm_id = v_vm_id > WHERE host_id = v_host_id > AND device_name = v_device_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION FreeHostDevicesUsedByVmId (v_vm_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE host_device > SET vm_id = NULL > WHERE vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION CleanDownVms () >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE host_device > SET vm_id = NULL > FROM vm_dynamic > WHERE host_device.vm_id = vm_dynamic.vm_guid > AND vm_dynamic.status = 0; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmDevicesAttachedToHost (v_host_id UUID) >RETURNS SETOF vm_device AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_device.* > FROM vm_device > INNER JOIN vm_host_pinning_map > ON vm_device.vm_id = vm_host_pinning_map.vm_id > AND vm_host_pinning_map.vds_id = v_host_id > WHERE vm_device.type = 'hostdev'; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,895+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/images_sp.sql... >2019-02-26 17:06:40,897+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/images_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertImage ( > v_creation_date TIMESTAMP WITH TIME ZONE, > v_image_guid UUID, > v_it_guid UUID, > v_size BIGINT, > v_ParentId UUID, > v_imageStatus INT, > v_lastModified TIMESTAMP WITH TIME ZONE, > v_vm_snapshot_id UUID, > v_volume_type INT, > v_volume_format INT, > v_image_group_id UUID, > v_active BOOLEAN, > v_volume_classification SMALLINT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO images ( > creation_date, > image_guid, > it_guid, > size, > ParentId, > imageStatus, > lastModified, > vm_snapshot_id, > volume_type, > image_group_id, > volume_format, > active, > volume_classification > ) > VALUES ( > v_creation_date, > v_image_guid, > v_it_guid, > v_size, > v_ParentId, > v_imageStatus, > v_lastModified, > v_vm_snapshot_id, > v_volume_type, > v_image_group_id, > v_volume_format, > v_active, > v_volume_classification > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateImageStatus ( > v_image_id UUID, > v_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE images > SET imageStatus = v_status > WHERE image_guid = v_image_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStatusOfImagesByImageGroupId ( > v_image_group_id UUID, > v_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE images > SET imageStatus = v_status > WHERE image_group_id = v_image_group_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateImageVmSnapshotId ( > v_image_id UUID, > v_vm_snapshot_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE images > SET vm_snapshot_id = v_vm_snapshot_id > WHERE image_guid = v_image_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateImageSize ( > v_image_id UUID, > v_size BIGINT, > v_lastModified TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE images > SET size = v_size, > lastModified = v_lastModified > WHERE image_guid = v_image_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateImage ( > v_creation_date TIMESTAMP WITH TIME ZONE, > v_image_guid UUID, > v_it_guid UUID, > v_size BIGINT, > v_ParentId UUID, > v_imageStatus INT, > v_lastModified TIMESTAMP WITH TIME ZONE, > v_vm_snapshot_id UUID, > v_volume_type INT, > v_volume_format INT, > v_image_group_id UUID, > v_active BOOLEAN, > v_volume_classification SMALLINT, > v_qcow_compat INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE images > SET creation_date = v_creation_date, > it_guid = v_it_guid, > size = v_size, > ParentId = v_ParentId, > imageStatus = v_imageStatus, > lastModified = v_lastModified, > vm_snapshot_id = v_vm_snapshot_id, > volume_type = v_volume_type, > image_group_id = v_image_group_id, > volume_format = v_volume_format, > active = v_active, > volume_classification = v_volume_classification, > qcow_compat = v_qcow_compat, > _update_date = LOCALTIMESTAMP > WHERE image_guid = v_image_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteImage (v_image_guid UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > DELETE > FROM images > WHERE image_guid = v_image_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromImages () >RETURNS SETOF images STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM images; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetImageByImageId (v_image_guid UUID) >RETURNS SETOF images STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM images > WHERE image_guid = v_image_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetIsoDisksByStoragePool (v_storage_pool_id UUID) >RETURNS SETOF repo_file_meta_data STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT repo_domain_id, > repo_image_id, > size, > date_created, > last_refreshed, > file_type, > repo_image_name > FROM iso_disks_as_repo_images > WHERE storage_pool_id = v_storage_pool_id > AND status = 3 -- The status of an active storage domain is 3 > ORDER BY repo_image_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,916+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/image_storage_domain_map_sp.sql... >2019-02-26 17:06:40,918+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/image_storage_domain_map_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertimage_storage_domain_map ( > v_image_id UUID, > v_storage_domain_id UUID, > v_quota_id UUID, > v_disk_profile_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO image_storage_domain_map ( > image_id, > storage_domain_id, > quota_id, > disk_profile_id > ) > VALUES ( > v_image_id, > v_storage_domain_id, > v_quota_id, > v_disk_profile_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deleteimage_storage_domain_map ( > v_image_id UUID, > v_storage_domain_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM image_storage_domain_map > WHERE image_id = v_image_id > AND storage_domain_id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deleteimage_storage_domain_map_by_image_id (v_image_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM image_storage_domain_map > WHERE image_id = v_image_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getimage_storage_domain_mapByimage_id (v_image_id UUID) >RETURNS SETOF image_storage_domain_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM image_storage_domain_map > WHERE image_id = v_image_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getimage_storage_domain_mapBystorage_domain_id (v_storage_domain_id UUID) >RETURNS SETOF image_storage_domain_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM image_storage_domain_map > WHERE storage_domain_id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateQuotaForImageAndSnapshots ( > v_disk_id UUID, > v_storage_domain_id UUID, > v_quota_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE image_storage_domain_map AS isdm > SET quota_id = v_quota_id > FROM images AS i > WHERE i.image_group_id = v_disk_id > AND i.image_guid = isdm.image_id > AND storage_domain_id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateDiskProfileByImageGroupId ( > v_image_group_id UUID, > v_storage_domain_id UUID, > v_disk_profile_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE image_storage_domain_map AS isdm > SET disk_profile_id = v_disk_profile_id > FROM images AS i > WHERE i.image_group_id = v_image_group_id > AND i.image_guid = isdm.image_id > AND storage_domain_id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,935+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/image_transfers_sp.sql... >2019-02-26 17:06:40,937+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/image_transfers_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromImageUploads() >RETURNS SETOF image_transfers STABLE >AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT image_transfers.* > FROM image_transfers; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetImageUploadsByCommandId(v_command_id UUID, v_user_id UUID, v_is_filtered BOOLEAN) >RETURNS SETOF image_transfers STABLE >AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT image_transfers.* > FROM image_transfers > WHERE image_transfers.command_id = v_command_id AND > (NOT v_is_filtered OR EXISTS (SELECT 1 > FROM user_disk_permissions_view > WHERE user_disk_permissions_view.user_id = v_user_id AND > user_disk_permissions_view.entity_id = image_transfers.disk_id )); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetImageUploadsByDiskId(v_disk_id UUID) >RETURNS SETOF image_transfers STABLE >AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT image_transfers.* > FROM image_transfers > WHERE image_transfers.disk_id = v_disk_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetImageTransfersByVdsId(v_vds_id UUID) >RETURNS SETOF image_transfers STABLE >AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT image_transfers.* > FROM image_transfers > WHERE image_transfers.vds_id = v_vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateImageUploads( > v_command_id UUID, > v_command_type INTEGER, > v_phase INTEGER, > v_type INTEGER, > v_active BOOLEAN, > v_last_updated TIMESTAMP, > v_message VARCHAR, > v_vds_id UUID, > v_disk_id UUID, > v_imaged_ticket_id UUID, > v_proxy_uri VARCHAR, > v_daemon_uri VARCHAR, > v_signed_ticket VARCHAR, > v_bytes_sent BIGINT, > v_bytes_total BIGINT, > v_client_inactivity_timeout INTEGER > ) >RETURNS VOID >AS $PROCEDURE$ >BEGIN > UPDATE image_transfers > SET command_id = v_command_id, > command_type = v_command_type, > phase = v_phase, > type = v_type, > active = v_active, > last_updated = v_last_updated, > message = v_message, > vds_id = v_vds_id, > disk_id = v_disk_id, > imaged_ticket_id = v_imaged_ticket_id, > proxy_uri = v_proxy_uri, > daemon_uri = v_daemon_uri, > signed_ticket = v_signed_ticket, > bytes_sent = v_bytes_sent, > bytes_total = v_bytes_total, > client_inactivity_timeout = v_client_inactivity_timeout > WHERE command_id = v_command_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteImageUploads(v_command_id UUID) >RETURNS VOID >AS $PROCEDURE$ >BEGIN > DELETE > FROM image_transfers > WHERE command_id = v_command_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertImageUploads( > v_command_id UUID, > v_command_type INTEGER, > v_phase INTEGER, > v_type INTEGER, > v_active BOOLEAN, > v_last_updated TIMESTAMP, > v_message VARCHAR, > v_vds_id UUID, > v_disk_id UUID, > v_imaged_ticket_id UUID, > v_proxy_uri VARCHAR, > v_daemon_uri VARCHAR, > v_signed_ticket VARCHAR, > v_bytes_sent BIGINT, > v_bytes_total BIGINT, > v_client_inactivity_timeout INTEGER > ) >RETURNS VOID >AS $PROCEDURE$ >BEGIN > INSERT INTO image_transfers( > command_id, > command_type, > phase, > type, > active, > last_updated, > message, > vds_id, > disk_id, > imaged_ticket_id, > proxy_uri, > daemon_uri, > signed_ticket, > bytes_sent, > bytes_total, > client_inactivity_timeout > ) > VALUES ( > v_command_id, > v_command_type, > v_phase, > v_type, > v_active, > v_last_updated, > v_message, > v_vds_id, > v_disk_id, > v_imaged_ticket_id, > v_proxy_uri, > v_daemon_uri, > v_signed_ticket, > v_bytes_sent, > v_bytes_total, > v_client_inactivity_timeout > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,956+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/inst_sp.sql... >2019-02-26 17:06:40,958+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/inst_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION inst_update_default_storage_pool_type (v_is_local boolean) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE storage_pool > SET is_local = v_is_local, > _update_date = LOCALTIMESTAMP > WHERE storage_pool.name = 'Default' > AND NOT EXISTS ( > SELECT 1 > FROM storage_domains > WHERE storage_domains.storage_pool_name = 'Default' > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION inst_add_iso_storage_domain ( > v_storage_domain_id UUID, > v_name VARCHAR(250), > v_connection_id uuid, > v_connection VARCHAR(250), > v_available INT, > v_used INT > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE > >BEGIN > IF NOT EXISTS ( > SELECT 1 > FROM storage_server_connections > WHERE connection = v_connection > ) THEN > -- Insert storage server connection info > perform Insertstorage_server_connections(v_connection, cast(v_connection_id AS VARCHAR(250)), NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL); > -- Insert storage domain static info > perform Insertstorage_domain_static(v_storage_domain_id, cast(v_connection_id AS VARCHAR(250)), v_name, v_name, '', 1, 2, '0', 0, FALSE, FALSE, CAST(NULL AS VARCHAR(100)), CAST(NULL AS VARCHAR(100)), CAST(NULL AS INT), CAST(NULL AS INT), FALSE); > > -- Insert storage domain dynamic info > perform Insertstorage_domain_dynamic(v_available, v_storage_domain_id, v_used); > END IF; > > exception when others then RAISE EXCEPTION 'NUM:%, DETAILS:%', > SQLSTATE, > SQLERRM; > END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION inst_update_service_type ( > v_cluster_id uuid, > v_virt_service boolean, > v_gluster_service boolean > ) >RETURNS void AS $PROCEDURE$ >BEGIN > UPDATE cluster > SET virt_service = v_virt_service, > gluster_service = v_gluster_service > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION inst_add_glance_provider ( > v_provider_id UUID, > v_provider_name VARCHAR(128), > v_provider_description VARCHAR(4000), > v_provider_url VARCHAR(512), > v_storage_domain_id UUID, > v_auth_required boolean DEFAULT false, > v_auth_username VARCHAR(64) DEFAULT NULL, > v_auth_password TEXT DEFAULT NULL, > v_auth_url TEXT DEFAULT NULL, > v_tenant_name VARCHAR(128) DEFAULT NULL > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > -- Adding the Glance provider > INSERT INTO providers ( > id, > name, > description, > url, > provider_type, > auth_required, > auth_username, > auth_password, > auth_url, > tenant_name > ) > SELECT v_provider_id, > v_provider_name, > v_provider_description, > v_provider_url, > 'OPENSTACK_IMAGE', > v_auth_required, > v_auth_username, > v_auth_password, > v_auth_url, > v_tenant_name > WHERE NOT EXISTS ( > SELECT id > FROM providers > WHERE id = v_provider_id > ); > > -- Adding a proper storage domain static entry > INSERT INTO storage_domain_static ( > id, > storage, > storage_name, > storage_domain_type, > storage_type, > storage_domain_format_type, > recoverable > ) > SELECT v_storage_domain_id, > v_provider_id, > v_provider_name, > 4, > 8, > 0, > true > WHERE NOT EXISTS ( > SELECT id > FROM storage_domain_static > WHERE id = v_storage_domain_id > ); > > -- Adding a proper storage domain dynamic entry > INSERT INTO storage_domain_dynamic ( > id, > available_disk_size, > used_disk_size > ) > SELECT v_storage_domain_id, > NULL, > NULL > WHERE NOT EXISTS ( > SELECT id > FROM storage_domain_dynamic > WHERE id = v_storage_domain_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:40,976+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/iscsi_bonds_sp.sql... >2019-02-26 17:06:40,978+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/iscsi_bonds_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetIscsiBondByIscsiBondId (v_id UUID) >RETURNS SETOF iscsi_bonds STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT iscsi_bonds.* > FROM iscsi_bonds > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromIscsiBonds () >RETURNS SETOF iscsi_bonds STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT iscsi_bonds.* > FROM iscsi_bonds; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetIscsiBondsByStoragePoolId (v_storage_pool_id UUID) >RETURNS SETOF iscsi_bonds STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT iscsi_bonds.* > FROM iscsi_bonds > WHERE storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworksByIscsiBondId (v_iscsi_bond_id UUID) >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT iscsi_bonds_networks_map.network_id > FROM iscsi_bonds_networks_map > WHERE iscsi_bond_id = v_iscsi_bond_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetIscsiBondsByNetworkId (v_network_id UUID) >RETURNS SETOF iscsi_bonds STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT iscsi_bonds.* > FROM iscsi_bonds_networks_map, > iscsi_bonds > WHERE iscsi_bonds.id = iscsi_bonds_networks_map.iscsi_bond_id > AND network_id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertIscsiBond ( > v_id UUID, > v_name VARCHAR(50), > v_description VARCHAR(4000), > v_storage_pool_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO iscsi_bonds ( > id, > name, > description, > storage_pool_id > ) > VALUES ( > v_id, > v_name, > v_description, > v_storage_pool_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateIscsiBond ( > v_id UUID, > v_name VARCHAR(50), > v_description VARCHAR(4000) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE iscsi_bonds > SET name = v_name, > description = v_description > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteIscsiBond (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > DELETE > FROM iscsi_bonds > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION AddNetworkToIscsiBond ( > v_iscsi_bond_id UUID, > v_network_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO iscsi_bonds_networks_map ( > iscsi_bond_id, > network_id > ) > VALUES ( > v_iscsi_bond_id, > v_network_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveNetworkFromIscsiBond ( > v_iscsi_bond_id UUID, > v_network_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM iscsi_bonds_networks_map > WHERE iscsi_bond_id = v_iscsi_bond_id > AND network_id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION AddConnectionToIscsiBond ( > v_iscsi_bond_id UUID, > v_connection_id VARCHAR(50) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO iscsi_bonds_storage_connections_map ( > iscsi_bond_id, > connection_id > ) > VALUES ( > v_iscsi_bond_id, > v_connection_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveConnectionFromIscsiBond ( > v_iscsi_bond_id UUID, > v_connection_id VARCHAR(50) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM iscsi_bonds_storage_connections_map > WHERE iscsi_bond_id = v_iscsi_bond_id > AND connection_id = v_connection_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetConnectionsByIscsiBondId (v_iscsi_bond_id UUID) >RETURNS SETOF VARCHAR(50) STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT iscsi_bonds_storage_connections_map.connection_id > FROM iscsi_bonds_storage_connections_map > WHERE iscsi_bond_id = v_iscsi_bond_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,001+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/job_sp.sql... >2019-02-26 17:06:41,003+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/job_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertJob ( > v_job_id UUID, > v_action_type VARCHAR(50), > v_description TEXT, > v_status VARCHAR(32), > v_owner_id UUID, > v_engine_session_seq_id BIGINT, > v_visible BOOLEAN, > v_start_time TIMESTAMP WITH TIME ZONE, > v_end_time TIMESTAMP WITH TIME ZONE, > v_last_update_time TIMESTAMP WITH TIME ZONE, > v_correlation_id VARCHAR(50), > v_is_external boolean, > v_is_auto_cleared boolean > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO job ( > job_id, > action_type, > description, > status, > owner_id, > engine_session_seq_id, > visible, > start_time, > end_time, > last_update_time, > correlation_id, > is_external, > is_auto_cleared > ) > VALUES ( > v_job_id, > v_action_type, > v_description, > v_status, > v_owner_id, > v_engine_session_seq_id, > v_visible, > v_start_time, > v_end_time, > v_last_update_time, > v_correlation_id, > v_is_external, > v_is_auto_cleared > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetJobByJobId (v_job_id UUID) >RETURNS SETOF job STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT job.* > FROM JOB > WHERE job_id = v_job_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllJobs () >RETURNS SETOF job STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT job.* > FROM JOB > WHERE status != 'UNKNOWN' > ORDER BY start_time DESC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetJobsByOffsetAndPageSize ( > v_position INT, > v_page_size INT > ) >RETURNS SETOF job STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY(SELECT job.* FROM JOB WHERE status = 'STARTED' ORDER BY last_update_time DESC) > > UNION ALL > > ( > SELECT job.* > FROM JOB > WHERE status NOT IN ( > 'STARTED', > 'UNKNOWN' > ) > ORDER BY last_update_time DESC > ) OFFSET v_position LIMIT v_page_size; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetJobsByCorrelationId (v_correlation_id VARCHAR(50)) >RETURNS SETOF job STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT job.* > FROM JOB > WHERE correlation_id = v_correlation_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetJobsByEngineSessionSeqIdAndStatus ( > v_engine_session_seq_id BIGINT, > v_status VARCHAR(32) > ) >RETURNS SETOF job STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT job.* > FROM JOB > WHERE engine_session_seq_id = v_engine_session_seq_id > AND status = v_status; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateJob ( > v_job_id UUID, > v_action_type VARCHAR(50), > v_description TEXT, > v_status VARCHAR(32), > v_owner_id UUID, > v_engine_session_seq_id BIGINT, > v_visible BOOLEAN, > v_start_time TIMESTAMP WITH TIME ZONE, > v_end_time TIMESTAMP WITH TIME ZONE, > v_last_update_time TIMESTAMP WITH TIME ZONE, > v_correlation_id VARCHAR(50), > v_is_external boolean, > v_is_auto_cleared boolean > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE job > SET action_type = v_action_type, > description = v_description, > status = v_status, > owner_id = v_owner_id, > engine_session_seq_id = v_engine_session_seq_id, > visible = v_visible, > start_time = v_start_time, > end_time = v_end_time, > last_update_time = v_last_update_time, > correlation_id = v_correlation_id, > is_external = v_is_external, > is_auto_cleared = v_is_auto_cleared > WHERE job_id = v_job_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateJobLastUpdateTime ( > v_job_id UUID, > v_last_update_time TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE job > SET last_update_time = v_last_update_time > WHERE job_id = v_job_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteJobOlderThanDateWithStatus ( > v_end_time TIMESTAMP WITH TIME ZONE, > v_status TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM job > WHERE is_auto_cleared > AND end_time < v_end_time > AND status = ANY (string_to_array(v_status, ',')::VARCHAR []); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteJob (v_job_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM job > WHERE job_id = v_job_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertJobSubjectEntity ( > v_job_id UUID, > v_entity_id UUID, > v_entity_type VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO job_subject_entity ( > job_id, > entity_id, > entity_type > ) > VALUES ( > v_job_id, > v_entity_id, > v_entity_type > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetJobSubjectEntityByJobId (v_job_id UUID) >RETURNS SETOF job_subject_entity STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT job_subject_entity.* > FROM job_subject_entity > WHERE job_id = v_job_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllJobIdsByEntityId (v_entity_id UUID) >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT job_subject_entity.job_id > FROM job_subject_entity > WHERE entity_id = v_entity_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertStep ( > v_step_id UUID, > v_parent_step_id UUID, > v_job_id UUID, > v_step_type VARCHAR(32), > v_description TEXT, > v_step_number INT, > v_status VARCHAR(32), > v_progress SMALLINT, > v_start_time TIMESTAMP WITH TIME ZONE, > v_end_time TIMESTAMP WITH TIME ZONE, > v_correlation_id VARCHAR(50), > v_external_id UUID, > v_external_system_type VARCHAR(32), > v_is_external boolean > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO step ( > step_id, > parent_step_id, > job_id, > step_type, > description, > step_number, > status, > progress, > start_time, > end_time, > correlation_id, > external_id, > external_system_type, > is_external > ) > VALUES ( > v_step_id, > v_parent_step_id, > v_job_id, > v_step_type, > v_description, > v_step_number, > v_status, > v_progress, > v_start_time, > v_end_time, > v_correlation_id, > v_external_id, > v_external_system_type, > v_is_external > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStep ( > v_step_id UUID, > v_parent_step_id UUID, > v_job_id UUID, > v_step_type VARCHAR(32), > v_description TEXT, > v_step_number INT, > v_status VARCHAR(32), > v_progress SMALLINT, > v_start_time TIMESTAMP WITH TIME ZONE, > v_end_time TIMESTAMP WITH TIME ZONE, > v_correlation_id VARCHAR(50), > v_external_id UUID, > v_external_system_type VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE step > SET parent_step_id = v_parent_step_id, > job_id = v_job_id, > step_type = v_step_type, > description = v_description, > step_number = v_step_number, > status = v_status, > progress = v_progress, > start_time = v_start_time, > end_time = v_end_time, > correlation_id = v_correlation_id, > external_id = v_external_id, > external_system_type = v_external_system_type > WHERE step_id = v_step_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStepStatusAndEndTime ( > v_step_id UUID, > v_status VARCHAR(32), > v_end_time TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE step > SET status = v_status, > end_time = v_end_time > WHERE step_id = v_step_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStepExternalIdAndType ( > v_step_id UUID, > v_external_id UUID, > v_external_system_type VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE step > SET external_id = v_external_id, > external_system_type = v_external_system_type > WHERE step_id = v_step_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStepByStepId (v_step_id UUID) >RETURNS SETOF step STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT step.* > FROM step > WHERE step_id = v_step_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStepsByJobId (v_job_id UUID) >RETURNS SETOF step STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT step.* > FROM step > WHERE job_id = v_job_id > ORDER BY parent_step_id nulls first, > step_number; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStepsByParentStepId (v_parent_step_id UUID) >RETURNS SETOF step STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT step.* > FROM step > WHERE parent_step_id = v_parent_step_id > ORDER BY step_number; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllSteps () >RETURNS SETOF step STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT step.* > FROM step; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteStep (v_step_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM step > WHERE step_id = v_step_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertStepSubjectEntity ( > v_step_id UUID, > v_entity_id UUID, > v_entity_type VARCHAR(32), > v_step_entity_weight SMALLINT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO step_subject_entity ( > step_id, > entity_id, > entity_type, > step_entity_weight > ) > VALUES ( > v_step_id, > v_entity_id, > v_entity_type, > v_step_entity_weight > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteStepSubjectEntity ( > v_step_id UUID, > v_entity_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE FROM step_subject_entity sse > WHERE sse.step_id = v_step_id > AND sse.entity_id = v_entity_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStepSubjectEntitiesByStepId (v_step_id UUID) >RETURNS SETOF step_subject_entity STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM step_subject_entity > WHERE step_id = v_step_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION updateJobStepsCompleted ( > v_job_id UUID, > v_status VARCHAR(32), > v_end_time TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE step > SET status = v_status, > end_time = v_end_time > WHERE job_id = v_job_id > AND status = 'STARTED' > AND status != v_status; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION updateStepProgress ( > v_step_id UUID, > v_progress SMALLINT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE step > SET progress = v_progress > WHERE step_id = v_step_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStartedExecutionEntitiesToUnknown (v_end_time TIMESTAMP WITH TIME ZONE) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE job > SET status = 'UNKNOWN', > end_time = v_end_time, > last_update_time = v_end_time > WHERE job.status = 'STARTED' > AND job_id NOT IN ( > SELECT job_id > FROM step > WHERE external_id IS NOT NULL > ); > > UPDATE step > SET status = 'UNKNOWN', > end_time = v_end_time > WHERE status = 'STARTED' > AND job_id NOT IN ( > SELECT step.job_id > FROM step step > WHERE step.external_id IS NOT NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteRunningJobsOfTasklessCommands () >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM job > WHERE ( > status = 'STARTED' > AND action_type IN ( > 'MigrateVm', > 'MigrateVmToServer', > 'RunVm', > 'RunVmOnce' > ) > ) > AND job_id NOT IN ( > SELECT job_id > FROM step > WHERE step_id IN ( > SELECT step_id > FROM async_tasks > ) > ); > > DELETE > FROM job > WHERE job_id IN ( > SELECT job_id > FROM step > WHERE ( > status = 'STARTED' > AND step_type = 'MIGRATE_VM' > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteCompletedJobsOlderThanDate ( > v_succeeded_end_time TIMESTAMP WITH TIME ZONE, > v_failed_end_time TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM job > WHERE ( > is_auto_cleared > AND ( > ( > end_time < v_succeeded_end_time > AND status = 'FINISHED' > ) > OR ( > end_time < v_failed_end_time > AND status IN ( > 'FAILED', > 'ABORTED', > 'UNKNOWN' > ) > ) > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION CheckIfJobHasTasks (v_job_id UUID) >RETURNS SETOF booleanResultType STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT EXISTS ( > SELECT * > FROM step > WHERE job_id = v_job_id > AND external_id IS NOT NULL > AND external_system_type IN ( > 'VDSM', > 'GLUSTER' > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStepsByExternalTaskId (v_external_id UUID) >RETURNS SETOF step STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT step.* > FROM step > WHERE external_id = v_external_id > ORDER BY parent_step_id nulls first, > step_number; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetExternalIdsFromSteps ( > v_status VARCHAR(32), > v_external_system_type VARCHAR(32) > ) >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT step.external_id > FROM step > INNER JOIN job > ON step.job_id = job.job_id > WHERE job.status = v_status > AND step.external_system_type = v_external_system_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStepsForEntityByStatus ( > v_status VARCHAR(32), > v_entity_id UUID, > v_entity_type VARCHAR(32) > ) >RETURNS SETOF step STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT s.* > FROM step_subject_entity sse > INNER JOIN step s > ON sse.step_id = s.step_id > WHERE sse.entity_id = v_entity_id > AND sse.entity_type = v_entity_type > AND s.status = v_status; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,038+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/labels_sp.sql... >2019-02-26 17:06:41,040+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/labels_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION CreateLabel ( > v_label_id UUID, > v_label_name VARCHAR(50), > v_readonly BOOLEAN, > v_vms uuid[], > v_hosts uuid[] > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE > o uuid; >BEGIN > INSERT INTO labels ( > label_id, > label_name, > read_only > ) > VALUES ( > v_label_id, > v_label_name, > v_readonly > ); > > -- Insert VM references > FOREACH o IN ARRAY v_vms > LOOP > INSERT INTO labels_map ( > label_id, > vm_id > ) > VALUES ( > v_label_id, > o > ); > END LOOP; > > -- Insert host references > FOREACH o IN ARRAY v_hosts > LOOP > INSERT INTO labels_map ( > label_id, > vds_id > ) > VALUES ( > v_label_id, > o > ); > END LOOP; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateLabel ( > v_label_id UUID, > v_label_name VARCHAR(50), > v_readonly BOOLEAN, > v_vms uuid[], > v_hosts uuid[] > ) >RETURNS VOID > > AS $PROCEDURE$ >DECLARE > o uuid; >BEGIN > UPDATE labels > SET label_name = v_label_name, > read_only = v_readonly > WHERE label_id = v_label_id; > > DELETE FROM labels_map > WHERE label_id = v_label_id; > > -- Insert VM references > FOREACH o IN ARRAY v_vms > LOOP > INSERT INTO labels_map ( > label_id, > vm_id > ) > VALUES ( > v_label_id, > o > ); > END LOOP; > > -- Insert host references > FOREACH o IN ARRAY v_hosts > LOOP > INSERT INTO labels_map ( > label_id, > vds_id > ) > VALUES ( > v_label_id, > o > ); > END LOOP; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteLabel (v_label_id UUID) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > DELETE > FROM labels > WHERE label_id = v_label_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllLabels () >RETURNS SETOF labels_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT labels_map_view.* > FROM labels_map_view; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLabelById (v_label_id UUID) >RETURNS SETOF labels_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT labels_map_view.* > FROM labels_map_view > WHERE label_id = v_label_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLabelByIds (v_label_ids UUID[]) >RETURNS SETOF labels_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT labels_map_view.* > FROM labels_map_view > WHERE label_id = ANY(v_label_ids); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllLabelsForCluster (v_cluster_id UUID) >RETURNS SETOF labels_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT labels_map_view.* > FROM labels_map_view > WHERE label_id IN ( > SELECT DISTINCT label_id > FROM labels_map > LEFT JOIN vds_static ON vds_static.vds_id = labels_map.vds_id > LEFT JOIN vm_static ON vm_static.vm_guid = labels_map.vm_id > WHERE vds_static.cluster_id = v_cluster_id OR > vm_static.cluster_id = v_cluster_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLabelByName (v_label_name varchar(50)) >RETURNS SETOF labels_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT labels_map_view.* > FROM labels_map_view > WHERE label_name = v_label_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLabelsByReferencedIds (v_entity_ids UUID[]) >RETURNS SETOF labels_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT labels_map_view.* > FROM labels_map_view > WHERE vm_ids::uuid[] && v_entity_ids > OR vds_ids::uuid[] && v_entity_ids; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION AddVmToLabels ( > v_vm_id UUID, > v_labels uuid[] >) >RETURNS VOID AS $PROCEDURE$ >DECLARE > o uuid; >BEGIN > INSERT INTO labels_map ( > label_id, > vm_id > ) > SELECT unnest(v_labels), v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION AddHostToLabels ( > v_host_id UUID, > v_labels uuid[] >) >RETURNS VOID AS $PROCEDURE$ >DECLARE > o uuid; >BEGIN > INSERT INTO labels_map ( > label_id, > vds_id > ) > SELECT unnest(v_labels), v_host_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateLabelsForVm ( > v_vm_id UUID, > v_labels uuid[] >) >RETURNS VOID AS $PROCEDURE$ >BEGIN > -- Remove existing entries for the VM > DELETE FROM labels_map > WHERE vm_id = v_vm_id; > > -- Add the current entries for the VM > PERFORM > AddVmToLabels(v_vm_id, v_labels); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateLabelsForHost ( > v_host_id UUID, > v_labels uuid[] >) >RETURNS VOID AS $PROCEDURE$ >BEGIN > -- Remove existing entries for the host > DELETE FROM labels_map > WHERE vds_id = v_host_id; > > -- Add the current entries for the host > PERFORM > AddHostToLabels(v_host_id, v_labels); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS entity_name_map_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE entity_name_map_rs AS ( > entity_id UUID, > entity_name TEXT > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetEntitiesNameMap () >RETURNS SETOF entity_name_map_rs STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT concat(labels_map.vm_id, vds_static.vds_id)::UUID AS entity_id, > concat(vm_static.vm_name, vds_static.vds_name)::TEXT AS entity_name > FROM labels_map > LEFT JOIN vm_static > ON vm_static.vm_guid = labels_map.vm_id > LEFT JOIN vds_static > ON vds_static.vds_id = labels_map.vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,064+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/libvirt_secrets_sp.sql... >2019-02-26 17:06:41,066+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/libvirt_secrets_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLibvirtSecretByLibvirtSecretId (v_secret_id UUID) >RETURNS SETOF libvirt_secrets STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM libvirt_secrets > WHERE secret_id = v_secret_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertLibvirtSecret ( > v_secret_id UUID, > v_secret_value TEXT, > v_secret_usage_type INT, > v_secret_description TEXT, > v_provider_id UUID, > v__create_date TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO libvirt_secrets ( > secret_id, > secret_value, > secret_usage_type, > secret_description, > provider_id, > _create_date > ) > VALUES ( > v_secret_id, > v_secret_value, > v_secret_usage_type, > v_secret_description, > v_provider_id, > v__create_date > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateLibvirtSecret ( > v_secret_id UUID, > v_secret_value TEXT, > v_secret_usage_type INT, > v_secret_description TEXT, > v_provider_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE libvirt_secrets > SET secret_id = v_secret_id, > secret_value = v_secret_value, > secret_usage_type = v_secret_usage_type, > secret_description = v_secret_description, > provider_id = v_provider_id, > _update_date = LOCALTIMESTAMP > WHERE secret_id = v_secret_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteLibvirtSecret (v_secret_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM libvirt_secrets > WHERE secret_id = v_secret_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromLibvirtSecrets () >RETURNS SETOF libvirt_secrets STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM libvirt_secrets; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllLibvirtSecretsByProviderId (v_provider_id UUID) >RETURNS SETOF libvirt_secrets STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM libvirt_secrets > WHERE provider_id = v_provider_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLibvirtSecretsByPoolIdOnActiveDomains (v_storage_pool_id UUID) >RETURNS SETOF libvirt_secrets STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT libvirt_secrets.* > FROM libvirt_secrets > INNER JOIN storage_domain_static > ON CAST(libvirt_secrets.provider_id AS VARCHAR) = storage_domain_static.storage > INNER JOIN storage_pool_iso_map > ON storage_domain_static.id = storage_pool_iso_map.storage_id > WHERE storage_pool_iso_map.storage_pool_id = v_storage_pool_id > AND storage_pool_iso_map.status = 3;-- Active >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,085+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/mac_pools_sp.sql... >2019-02-26 17:06:41,087+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/mac_pools_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertMacPool ( > v_id UUID, > v_name VARCHAR(40), > v_allow_duplicate_mac_addresses BOOLEAN, > v_description VARCHAR(4000) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO mac_pools ( > id, > name, > allow_duplicate_mac_addresses, > description > ) > VALUES ( > v_id, > v_name, > v_allow_duplicate_mac_addresses, > v_description > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateMacPool ( > v_id UUID, > v_name VARCHAR(40), > v_allow_duplicate_mac_addresses BOOLEAN, > v_description VARCHAR(4000) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE mac_pools > SET id = v_id, > name = v_name, > allow_duplicate_mac_addresses = v_allow_duplicate_mac_addresses, > description = v_description > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteMacPool (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM mac_pools > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetMacPoolByMacPoolId (v_id UUID) >RETURNS SETOF mac_pools STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM mac_pools > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDefaultMacPool () >RETURNS SETOF mac_pools STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM mac_pools > WHERE default_pool IS true; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetMacPoolByClusterId (v_cluster_id UUID) >RETURNS SETOF mac_pools STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT mp.* > FROM mac_pools mp > INNER JOIN cluster c > ON c.mac_pool_id = mp.id > WHERE c.cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromMacPools () >RETURNS SETOF mac_pools STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM mac_pools; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllMacsByMacPoolId (v_id UUID) >RETURNS SETOF VARCHAR STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT mac_addr > FROM vm_interface > WHERE EXISTS ( > SELECT 1 > FROM vm_static > INNER JOIN cluster c > ON vm_static.cluster_id = c.cluster_id > WHERE c.mac_pool_id = v_id > AND vm_static.vm_guid = vm_interface.vm_guid > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertMacPoolRange ( > v_mac_pool_id UUID, > v_from_mac VARCHAR(17), > v_to_mac VARCHAR(17) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO mac_pool_ranges ( > mac_pool_id, > from_mac, > to_mac > ) > VALUES ( > v_mac_pool_id, > v_from_mac, > v_to_mac > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteMacPoolRangesByMacPoolId (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM mac_pool_ranges > WHERE mac_pool_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllMacPoolRangesByMacPoolId (v_id UUID) >RETURNS SETOF mac_pool_ranges STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM mac_pool_ranges > WHERE mac_pool_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,108+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/multi_level_administration_sp.sql... >2019-02-26 17:06:41,110+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/multi_level_administration_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertPermission ( > v_ad_element_id UUID, > v_id UUID, > v_role_id UUID, > v_object_id UUID, > v_object_type_id INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO permissions ( > ad_element_id, > id, > role_id, > object_id, > object_type_id > ) > VALUES ( > v_ad_element_id, > v_id, > v_role_id, > v_object_id, > v_object_type_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeletePermission (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT id > INTO v_val > FROM permissions > WHERE id = v_id > FOR > > UPDATE; > > DELETE > FROM permissions > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPermissionsByid (v_id UUID) >RETURNS SETOF permissions_view STABLE >AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM permissions_view > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION get_user_permissions_for_domain ( > v_name VARCHAR(255), > v_domain VARCHAR(255) > ) >RETURNS SETOF permissions_view STABLE AS $PROCEDURE$ >DECLARE v_user_name VARCHAR(255); > >v_index INT; > >BEGIN > -- find if name already includes domain (@) > v_index := POSITION('@' IN v_name); > > IF (v_index > 0) THEN > v_user_name := substr(v_name, 0, v_index); > ELSE > v_user_name := v_name; > END IF; > > RETURN QUERY > >SELECT * >FROM permissions_view >WHERE permissions_view.ad_element_id IN ( > SELECT users.user_id > FROM users > WHERE users.domain = v_domain > AND ( > users.name = v_user_name > OR users.name = v_user_name || '@' || upper(v_domain) > ) > );END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetConsumedPermissionsForQuotaId (v_quota_id UUID) >RETURNS SETOF permissions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM permissions_view > WHERE role_id IN ( > SELECT role_id > FROM ROLES_groups > WHERE action_group_id = 901 > ) > AND object_id IN ( > SELECT id > FROM fn_get_entity_parents(v_quota_id, 17) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPermissionsByAdElementIdAndGroupIds( > v_ad_element_id UUID, > v_user_id UUID, > v_user_groups UUID[], > v_is_filtered BOOLEAN, > v_app_mode INT > ) >RETURNS SETOF permissions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM permissions_view > WHERE (permissions_view.app_mode & v_app_mode) > 0 > AND ( > permissions_view.ad_element_id = v_ad_element_id > OR ad_element_id = ANY(array_append(v_user_groups, 'EEE00000-0000-0000-0000-123456789EEE')) > ) > AND (NOT v_is_filtered OR v_user_id = v_ad_element_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPermissionsByAdElementId ( > v_ad_element_id UUID, > v_engine_session_seq_id INT, > v_is_filtered BOOLEAN, > v_app_mode INT > ) >RETURNS SETOF permissions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM permissions_view > WHERE (permissions_view.app_mode & v_app_mode) > 0 > AND ( > permissions_view.ad_element_id = v_ad_element_id > OR ad_element_id IN ( > SELECT * > FROM GetSessionUserAndGroupsById(v_ad_element_id, v_engine_session_seq_id) > ) > ) > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_permissions_permissions_view uv, > engine_sessions > WHERE uv.user_id = engine_sessions.user_id > AND engine_sessions.id = v_engine_session_seq_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPermissionsByRoleId (v_role_id UUID) >RETURNS SETOF permissions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM permissions_view > WHERE role_id = v_role_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPermissionsByRoleIdAndAdElementId ( > v_role_id UUID, > v_ad_element_id UUID > ) >RETURNS SETOF permissions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM permissions_view > WHERE role_id = v_role_id > AND ad_element_id = v_ad_element_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPermissionsByRoleIdAndAdElementIdAndObjectId ( > v_role_id UUID, > v_ad_element_id UUID, > v_object_id UUID > ) >RETURNS SETOF permissions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM permissions_view > WHERE role_id = v_role_id > AND ad_element_id = v_ad_element_id > AND object_id = v_object_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDirectPermissionsByAdElementId (v_ad_element_id UUID) >RETURNS SETOF permissions_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM permissions_view > WHERE permissions_view.ad_element_id = v_ad_element_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertRole ( > v_description VARCHAR(4000), > v_id UUID, > v_name VARCHAR(126), > v_is_readonly BOOLEAN, > v_role_type INT, > v_allows_viewing_children BOOLEAN, > v_app_mode INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO roles ( > description, > id, > name, > is_readonly, > role_type, > allows_viewing_children, > app_mode > ) > VALUES ( > v_description, > v_id, > v_name, > v_is_readonly, > v_role_type, > v_allows_viewing_children, > v_app_mode > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateRole ( > v_description VARCHAR(4000), > v_id UUID, > v_name VARCHAR(126), > v_is_readonly BOOLEAN, > v_role_type INT, > v_allows_viewing_children BOOLEAN > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE roles > SET description = v_description, > name = v_name, > is_readonly = v_is_readonly, > role_type = v_role_type, > allows_viewing_children = v_allows_viewing_children > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteRole (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT id > INTO v_val > FROM roles > WHERE id = v_id > FOR > > UPDATE; > > DELETE > FROM roles > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromRole(v_app_mode INTEGER) >RETURNS SETOF roles STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM roles > WHERE (roles.app_mode & v_app_mode) > 0; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllNonAdminRoles(v_app_mode INTEGER) >RETURNS SETOF roles STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM roles > WHERE (roles.app_mode & v_app_mode) > 0 > AND role_type != 1; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetRolsByid(v_id UUID) >RETURNS SETOF roles STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM roles > WHERE id = v_id; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetRoleByName(v_name VARCHAR(126)) >RETURNS SETOF roles STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM roles > WHERE name = v_name; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAnyAdminRoleByUserIdAndGroupIds( > v_user_id UUID, > v_group_ids text, > v_app_mode INTEGER) >RETURNS SETOF roles STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT roles.* > FROM roles INNER JOIN > permissions ON permissions.role_id = roles.id > WHERE (roles.app_mode & v_app_mode) > 0 > AND role_type = 1 -- admin > AND (permissions.ad_element_id = v_user_id > OR permissions.ad_element_id in( > SELECT id > FROM getElementIdsByIdAndGroups(v_user_id, v_group_ids)) > ) LIMIT 1; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPermissionByRoleId(v_role_id UUID) >RETURNS SETOF permissions STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM permissions > WHERE role_id = v_role_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION get_entity_permissions( > v_user_id UUID, > v_action_group_id INTEGER, > v_object_id UUID,v_object_type_id INTEGER) >RETURNS SETOF UUID STABLE > > AS $procedure$ > DECLARE > v_everyone_object_id UUID; >BEGIN > v_everyone_object_id := getGlobalIds('everyone'); -- hardcoded also in MLA Handler > RETURN QUERY > SELECT id > FROM permissions > WHERE > role_id IN( > SELECT role_id > FROM roles_groups > WHERE action_group_id = v_action_group_id) > -- get allparents of object > AND (object_id IN( > SELECT id > FROM fn_get_entity_parents(v_object_id,v_object_type_id))) > -- get user and his groups > AND (ad_element_id = v_everyone_object_id > OR ad_element_id = v_user_id > OR ad_element_id IN( > SELECT * > FROM getUserAndGroupsById(v_user_id) > )) LIMIT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION get_entity_permissions_for_user_and_groups( > v_user_id UUID, > v_group_ids text, > v_action_group_id INTEGER, > v_object_id UUID, > v_object_type_id INTEGER, > v_ignore_everyone BOOLEAN) >RETURNS SETOF UUID STABLE > >AS $procedure$ > DECLARE > v_everyone_object_id UUID; >BEGIN > v_everyone_object_id := getGlobalIds('everyone'); -- hardcoded also in MLA Handler > RETURN QUERY > SELECT id from permissions > WHERE > -- get all roles of action > role_id IN( > SELECT role_id from roles_groups > WHERE action_group_id = v_action_group_id) > -- get allparents of object > AND (object_id IN( > SELECT id > FROM fn_get_entity_parents(v_object_id,v_object_type_id))) > -- get user and his groups > AND ((NOT v_ignore_everyone > AND ad_element_id = v_everyone_object_id) > OR ad_element_id = v_user_id > OR ad_element_id IN( > SELECT * > FROM fnsplitteruuid(v_group_ids) > )) LIMIT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insert_roles_groups( > v_action_group_id INTEGER, > v_role_id UUID) >RETURNS VOID > AS $procedure$ >BEGIN > INSERT INTO roles_groups( > action_group_id, > role_id) > VALUES( > v_action_group_id, > v_role_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Delete_roles_groups( > v_action_group_id INTEGER, > v_role_id UUID) >RETURNS VOID > AS $procedure$ >BEGIN > > DELETE FROM roles_groups > WHERE action_group_id = v_action_group_id > AND role_id = v_role_id; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Get_roles_groups_By_action_group_id_And_By_role_id( > v_action_group_id INTEGER, > v_role_id UUID) >RETURNS SETOF roles_groups STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM roles_groups > WHERE > action_group_id = v_action_group_id > AND role_id = v_role_id; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Get_role_groups_By_role_id(v_role_id UUID) >RETURNS SETOF roles_groups STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM roles_groups > WHERE > role_id = v_role_id; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPermissionsByEntityId( > v_id UUID, > v_engine_session_seq_id INTEGER, > v_is_filtered BOOLEAN, > v_app_mode INTEGER) >RETURNS SETOF permissions_view STABLE > > > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM permissions_view > WHERE (permissions_view.app_mode & v_app_mode) > 0 > AND object_id = v_id > AND (NOT v_is_filtered OR EXISTS ( > SELECT 1 > FROM GetUserPermissionsByEntityId( > v_id, > v_engine_session_seq_id, > v_is_filtered) > ) > ); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllUsersWithPermissionsOnEntityByEntityId( > v_id UUID, > v_engine_session_seq_id INTEGER, > v_is_filtered BOOLEAN, > v_app_mode INTEGER) >RETURNS SETOF permissions_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM permissions_view > WHERE (permissions_view.app_mode & v_app_mode) > 0 > AND object_id = v_id > AND (NOT v_is_filtered OR EXISTS ( > SELECT 1 > FROM GetAllUsersWithPermissionsByEntityId( > v_id, > v_engine_session_seq_id, > v_is_filtered) > ) > ); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetUserPermissionsByEntityId( > v_id UUID, > v_engine_session_seq_id INTEGER, > v_is_filtered BOOLEAN) >RETURNS SETOF permissions_view STABLE > > > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM permissions_view p > WHERE object_id = v_id > AND (NOT v_is_filtered OR EXISTS ( > SELECT 1 > FROM engine_session_user_flat_groups u > WHERE p.ad_element_id = u.granted_id > AND u.engine_session_seq_id = v_engine_session_seq_id)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllUsersWithPermissionsByEntityId( > v_id UUID, > v_engine_session_seq_id INTEGER, > v_is_filtered BOOLEAN) >RETURNS SETOF permissions_view STABLE > AS $procedure$ >DECLARE > r_type int4; >BEGIN > FOR r_type IN ( > SELECT DISTINCT role_type > FROM permissions_view p > WHERE object_id = v_id) > LOOP > RETURN QUERY SELECT * > FROM permissions_view p > WHERE object_id in (select id from fn_get_entity_parents(v_id, r_type)) > AND (NOT v_is_filtered OR EXISTS ( > SELECT 1 > FROM engine_session_user_flat_groups u > WHERE p.ad_element_id = u.granted_id > AND u.engine_session_seq_id = v_engine_session_seq_id)); > END LOOP; > RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeletePermissionsByEntityId(v_id UUID) >RETURNS VOID > > > AS $procedure$ >BEGIN > DELETE FROM permissions > WHERE object_id = v_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeletePermissionsByEntityIds(v_ids UUID[]) >RETURNS VOID > AS $procedure$ >BEGIN > DELETE FROM permissions > WHERE object_id = ANY(v_ids); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetRoleActionGroupsByRoleId(v_id UUID) >RETURNS SETOF roles_groups STABLE > > > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM roles_groups > WHERE role_id = v_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPermissionsTreeByEntityId( > v_id UUID, > v_object_type_id INTEGER, > v_engine_session_seq_id INTEGER, > v_is_filtered BOOLEAN, v_app_mode INTEGER) >RETURNS SETOF permissions_view STABLE > > > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM permissions_view p > WHERE (p.app_mode & v_app_mode) > 0 > AND object_id IN( > SELECT id > FROM fn_get_entity_parents(v_id,v_object_type_id)) > AND (NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM engine_session_user_flat_groups u > WHERE p.ad_element_id = u.granted_id > AND u.engine_session_seq_id = v_engine_session_seq_id) > ); > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPermissionsByRoleIdAndObjectId( > v_role_id UUID, > v_object_id UUID) >RETURNS SETOF permissions_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM permissions_view > WHERE role_id = v_role_id > AND object_id = v_object_id; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetForRoleAndAdElementAndObject_wGroupCheck( > v_role_id UUID, > v_ad_element_id UUID, > v_object_id UUID) >RETURNS SETOF permissions_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM permissions_view > WHERE role_id = v_role_id > AND object_id = v_object_id > AND ad_element_id IN ( > SELECT * > FROM getUserAndGroupsById(v_ad_element_id) > ); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPermissionsByAdElementAndObjectId( > v_ad_element_id UUID, > v_object_id UUID) >RETURNS SETOF permissions_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM permissions_view > WHERE ad_element_id = v_ad_element_id > AND object_id = v_object_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,145+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/network_sp.sql... >2019-02-26 17:06:41,147+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/network_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertnetwork ( > v_addr VARCHAR(50), > v_description VARCHAR(4000), > v_free_text_comment TEXT, > v_id UUID, > v_name VARCHAR(256), > v_vdsm_name VARCHAR(15), > v_subnet VARCHAR(20), > v_gateway VARCHAR(20), > v_type INT, > v_vlan_id INT, > v_stp BOOLEAN, > v_storage_pool_id UUID, > v_mtu INT, > v_vm_network BOOLEAN, > v_provider_network_provider_id UUID, > v_provider_network_external_id TEXT, > v_provider_physical_network_id UUID, > v_qos_id UUID, > v_label TEXT, > v_dns_resolver_configuration_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO network ( > addr, > description, > free_text_comment, > id, > name, > vdsm_name, > subnet, > gateway, > type, > vlan_id, > stp, > storage_pool_id, > mtu, > vm_network, > provider_network_provider_id, > provider_network_external_id, > provider_physical_network_id, > qos_id, > label, > dns_resolver_configuration_id > ) > VALUES ( > v_addr, > v_description, > v_free_text_comment, > v_id, > v_name, > v_vdsm_name, > v_subnet, > v_gateway, > v_type, > v_vlan_id, > v_stp, > v_storage_pool_id, > v_mtu, > v_vm_network, > v_provider_network_provider_id, > v_provider_network_external_id, > v_provider_physical_network_id, > v_qos_id, > v_label, > v_dns_resolver_configuration_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatenetwork ( > v_addr VARCHAR(50), > v_description VARCHAR(4000), > v_free_text_comment TEXT, > v_id UUID, > v_name VARCHAR(256), > v_vdsm_name VARCHAR(15), > v_subnet VARCHAR(20), > v_gateway VARCHAR(20), > v_type INT, > v_vlan_id INT, > v_stp BOOLEAN, > v_storage_pool_id UUID, > v_mtu INT, > v_vm_network BOOLEAN, > v_provider_network_provider_id UUID, > v_provider_network_external_id TEXT, > v_provider_physical_network_id UUID, > v_qos_id UUID, > v_label TEXT, > v_dns_resolver_configuration_id UUID > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE network > SET addr = v_addr, > description = v_description, > free_text_comment = v_free_text_comment, > name = v_name, > vdsm_name = v_vdsm_name, > subnet = v_subnet, > gateway = v_gateway, > type = v_type, > vlan_id = v_vlan_id, > stp = v_stp, > storage_pool_id = v_storage_pool_id, > mtu = v_mtu, > vm_network = v_vm_network, > provider_network_provider_id = v_provider_network_provider_id, > provider_network_external_id = v_provider_network_external_id, > provider_physical_network_id = v_provider_physical_network_id, > qos_id = v_qos_id, > label = v_label, > dns_resolver_configuration_id = v_dns_resolver_configuration_id > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletenetwork (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT id > INTO v_val > FROM network > WHERE id = v_id > FOR UPDATE; > > DELETE > FROM network > WHERE id = v_id; > > -- Delete the network's permissions > PERFORM DeletePermissionsByEntityId(v_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromnetwork ( > v_user_id uuid, > v_is_filtered boolean > ) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network > WHERE NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_network_permissions_view > WHERE user_id = v_user_id > AND entity_id = network.id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetnetworkByid ( > v_id UUID, > v_user_id uuid, > v_is_filtered boolean > ) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network > WHERE id = v_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_network_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworkByNameAndDataCenter ( > v_name VARCHAR(256), > v_storage_pool_id UUID > ) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT network.* > FROM network > WHERE network.name = v_name > AND network.storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworkByNameAndCluster ( > v_name VARCHAR(256), > v_cluster_id UUID > ) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT network.* > FROM network > WHERE network.name = v_name > AND EXISTS ( > SELECT 1 > FROM network_cluster > WHERE network.id = network_cluster.network_id > AND network_cluster.cluster_id = v_cluster_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllNetworksByProviderPhysicalNetworkId (v_network_id UUID) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT network.* > FROM network > WHERE provider_physical_network_id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworkByVdsmNameAndDataCenterId ( > v_vdsm_name VARCHAR(15), > v_data_center_id UUID > ) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT network.* > FROM network > WHERE vdsm_name = v_vdsm_name > AND storage_pool_id = v_data_center_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetManagementNetworkByCluster (v_cluster_id UUID) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT network.* > FROM network > WHERE id = ( > SELECT network_id > FROM network_cluster > WHERE network_cluster.cluster_id = v_cluster_id > AND network_cluster.management > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllNetworkByStoragePoolId ( > v_id UUID, > v_user_id uuid, > v_is_filtered boolean > ) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network > WHERE storage_pool_id = v_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_network_permissions_view > WHERE user_id = v_user_id > AND entity_id = network.id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS networkViewClusterType CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE networkViewClusterType AS ( > id uuid, > name VARCHAR(256), > vdsm_name VARCHAR(15), > description VARCHAR(4000), > free_text_comment TEXT, > type INT, > addr VARCHAR(50), > subnet VARCHAR(20), > gateway VARCHAR(20), > vlan_id INT, > stp BOOLEAN, > storage_pool_id UUID, > mtu INT, > vm_network BOOLEAN, > label TEXT, > provider_network_provider_id UUID, > provider_network_external_id TEXT, > provider_physical_network_id UUID, > qos_id UUID, > dns_resolver_configuration_id UUID, > network_id UUID, > cluster_id UUID, > status INT, > is_display BOOLEAN, > required BOOLEAN, > migration BOOLEAN, > management BOOLEAN, > is_gluster BOOLEAN, > default_route BOOLEAN > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllNetworkByClusterId ( > v_id UUID, > v_user_id uuid, > v_is_filtered boolean > ) >RETURNS SETOF networkViewClusterType STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT network.id, > network.name, > network.vdsm_name, > network.description, > network.free_text_comment, > network.type, > network.addr, > network.subnet, > network.gateway, > network.vlan_id, > network.stp, > network.storage_pool_id, > network.mtu, > network.vm_network, > network.label, > network.provider_network_provider_id, > network.provider_network_external_id, > network.provider_physical_network_id, > network.qos_id, > network.dns_resolver_configuration_id, > network_cluster.network_id, > network_cluster.cluster_id, > network_cluster.status, > network_cluster.is_display, > network_cluster.required, > network_cluster.migration, > network_cluster.management, > network_cluster.is_gluster, > network_cluster.default_route > FROM network > INNER JOIN network_cluster > ON network.id = network_cluster.network_id > WHERE network_cluster.cluster_id = v_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_network_permissions_view > WHERE user_id = v_user_id > AND entity_id = network.id > ) > ) > ORDER BY network.name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllNetworksByQosId (v_id UUID) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network > WHERE qos_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllNetworksByNetworkProviderId (v_id UUID) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network > WHERE provider_network_provider_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllNetworkViewsByNetworkProviderId (v_id UUID) >RETURNS SETOF network_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_view > WHERE provider_network_provider_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllNetworkLabelsByDataCenterId (v_id UUID) >RETURNS SETOF TEXT STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT label > FROM network > WHERE network.storage_pool_id = v_id > AND label IS NOT NULL; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetRequiredNetworksByDataCenterId (v_data_center_id UUID) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT network.* > FROM network > INNER JOIN network_cluster > ON network.id = network_cluster.network_id > WHERE network_cluster.required > AND network.storage_pool_id = v_data_center_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertvds_interface ( > v_addr VARCHAR(20), > v_bond_name VARCHAR(50), > v_bond_type INT, > v_gateway VARCHAR(20), > v_ipv4_default_route BOOLEAN, > v_id UUID, > v_is_bond BOOLEAN, > v_reported_switch_type VARCHAR(6), > v_bond_opts VARCHAR(4000), > v_mac_addr VARCHAR(20), > v_name VARCHAR(50), > v_network_name VARCHAR(256), > v_speed INT, > v_subnet VARCHAR(20), > v_boot_protocol INT, > v_type INT, > v_vds_id UUID, > v_base_interface VARCHAR(50), > v_vlan_id INT, > v_mtu INT, > v_bridged BOOLEAN, > v_labels TEXT, > v_ipv6_boot_protocol INT, > v_ipv6_address VARCHAR(50), > v_ipv6_prefix INT, > v_ipv6_gateway VARCHAR(50), > v_ad_partner_mac VARCHAR(50), > v_ad_aggregator_id INT, > v_bond_active_slave VARCHAR(50) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vds_interface ( > addr, > bond_name, > bond_type, > gateway, > ipv4_default_route, > id, > is_bond, > reported_switch_type, > bond_opts, > mac_addr, > name, > network_name, > speed, > subnet, > boot_protocol, > type, > VDS_ID, > base_interface, > vlan_id, > mtu, > bridged, > labels, > ipv6_address, > ipv6_gateway, > ipv6_prefix, > ipv6_boot_protocol, > ad_partner_mac, > ad_aggregator_id, > bond_active_slave > ) > VALUES ( > v_addr, > v_bond_name, > v_bond_type, > v_gateway, > v_ipv4_default_route, > v_id, > v_is_bond, > v_reported_switch_type, > v_bond_opts, > v_mac_addr, > v_name, > v_network_name, > v_speed, > v_subnet, > v_boot_protocol, > v_type, > v_vds_id, > v_base_interface, > v_vlan_id, > v_mtu, > v_bridged, > v_labels, > v_ipv6_address, > v_ipv6_gateway, > v_ipv6_prefix, > v_ipv6_boot_protocol, > v_ad_partner_mac, > v_ad_aggregator_id, > v_bond_active_slave > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatevds_interface ( > v_addr VARCHAR(20), > v_bond_name VARCHAR(50), > v_bond_type INT, > v_gateway VARCHAR(20), > v_ipv4_default_route BOOLEAN, > v_id UUID, > v_is_bond BOOLEAN, > v_reported_switch_type VARCHAR(6), > v_bond_opts VARCHAR(4000), > v_mac_addr VARCHAR(20), > v_name VARCHAR(50), > v_network_name VARCHAR(256), > v_speed INT, > v_subnet VARCHAR(20), > v_boot_protocol INT, > v_type INT, > v_vds_id UUID, > v_base_interface VARCHAR(50), > v_vlan_id INT, > v_mtu INT, > v_bridged BOOLEAN, > v_labels TEXT, > v_ipv6_address VARCHAR(50), > v_ipv6_gateway VARCHAR(50), > v_ipv6_prefix INT, > v_ipv6_boot_protocol INT, > v_ad_partner_mac VARCHAR(50), > v_ad_aggregator_id INT, > v_bond_active_slave VARCHAR(50) > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE vds_interface > SET addr = v_addr, > bond_name = v_bond_name, > bond_type = v_bond_type, > gateway = v_gateway, > ipv4_default_route = v_ipv4_default_route, > is_bond = v_is_bond, > reported_switch_type = v_reported_switch_type, > bond_opts = v_bond_opts, > mac_addr = v_mac_addr, > name = v_name, > network_name = v_network_name, > speed = v_speed, > subnet = v_subnet, > boot_protocol = v_boot_protocol, > type = v_type, > VDS_ID = v_vds_id, > base_interface = v_base_interface, > vlan_id = v_vlan_id, > _update_date = LOCALTIMESTAMP, > mtu = v_mtu, > bridged = v_bridged, > labels = v_labels, > ipv6_address = v_ipv6_address, > ipv6_gateway = v_ipv6_gateway, > ipv6_prefix = v_ipv6_prefix, > ipv6_boot_protocol = v_ipv6_boot_protocol, > ad_partner_mac = v_ad_partner_mac, > ad_aggregator_id = v_ad_aggregator_id, > bond_active_slave = v_bond_active_slave > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletevds_interface (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vds_interface > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Clear_network_from_nics (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vds_interface > SET network_name = NULL > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getinterface_viewByvds_id ( > v_vds_id UUID, > v_user_id UUID, > v_is_filtered boolean > ) >RETURNS SETOF vds_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vds_interface_view > WHERE vds_id = v_vds_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vds_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vds_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS host_networks_by_cluster_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE host_networks_by_cluster_rs AS ( > vds_id UUID, > network_name VARCHAR > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetHostNetworksByCluster (v_cluster_id UUID) >RETURNS SETOF host_networks_by_cluster_rs STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_static.vds_id, > vds_interface.network_name > FROM vds_static > INNER JOIN vds_interface > ON vds_interface.vds_id = vds_static.vds_id > AND vds_static.cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getinterface_viewByAddr ( > v_cluster_id UUID, > v_addr VARCHAR(50) > ) >RETURNS SETOF vds_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_interface_view.* > FROM vds_interface_view > INNER JOIN vds_static > ON vds_interface_view.vds_id = vds_static.vds_id > WHERE vds_interface_view.addr = v_addr > AND vds_static.cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsManagedInterfaceByVdsId ( > v_vds_id UUID, > v_user_id UUID, > v_is_filtered boolean > ) >RETURNS SETOF vds_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vds_interface_view > -- Checking if the 2nd bit in the type column is set, meaning that the interface is managed > WHERE vds_id = v_vds_id > AND (type & 2) = 2 > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vds_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vds_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsInterfacesByNetworkId (v_network_id UUID) >RETURNS SETOF vds_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_interface_view.* > FROM vds_interface_view > INNER JOIN vds > ON vds.vds_id = vds_interface_view.vds_id > INNER JOIN network_cluster > ON network_cluster.cluster_id = vds.cluster_id > INNER JOIN network > ON network.id = network_cluster.network_id > AND network.name = vds_interface_view.network_name > WHERE network.id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsInterfaceById (v_vds_interface_id UUID) >RETURNS SETOF vds_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vds_interface_view > WHERE id = v_vds_interface_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsInterfaceByName ( > v_host_id UUID, > v_name VARCHAR(50) > ) >RETURNS SETOF vds_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vds_interface_view > WHERE name = v_name > AND vds_id = v_host_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetInterfacesByClusterId (v_cluster_id UUID) >RETURNS SETOF vds_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_interface_view.* > FROM vds_interface_view > INNER JOIN vds_static > ON vds_interface_view.vds_id = vds_static.vds_id > WHERE vds_static.cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetInterfacesByDataCenterId (v_data_center_id UUID) >RETURNS SETOF vds_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_interface_view.* > FROM vds_interface_view > INNER JOIN vds_static > ON vds_interface_view.vds_id = vds_static.vds_id > INNER JOIN cluster > ON vds_static.cluster_id = cluster.cluster_id > WHERE cluster.storage_pool_id = v_data_center_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmInterface ( > v_id UUID, > v_mac_addr VARCHAR(20), > v_name VARCHAR(50), > v_speed INT, > v_vnic_profile_id UUID, > v_vm_guid UUID, > v_vmt_guid UUID, > v_type INT, > v_linked BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_interface ( > id, > mac_addr, > name, > speed, > vnic_profile_id, > vm_guid, > vmt_guid, > type, > linked > ) > VALUES ( > v_id, > v_mac_addr, > v_name, > v_speed, > v_vnic_profile_id, > v_vm_guid, > v_vmt_guid, > v_type, > v_linked > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmInterface ( > v_id UUID, > v_mac_addr VARCHAR(20), > v_name VARCHAR(50), > v_speed INT, > v_vnic_profile_id UUID, > v_vm_guid UUID, > v_vmt_guid UUID, > v_type INT, > v_linked BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_interface > SET mac_addr = v_mac_addr, > name = v_name, > speed = v_speed, > vnic_profile_id = v_vnic_profile_id, > vm_guid = v_vm_guid, > vmt_guid = v_vmt_guid, > type = v_type, > _update_date = LOCALTIMESTAMP, > linked = v_linked > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmInterface (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT id > INTO v_val > FROM vm_interface > WHERE id = v_id > FOR > > UPDATE; > > DELETE > FROM vm_interface > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmInterfaceByVmInterfaceId (v_id UUID) >RETURNS SETOF vm_interface STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_interface > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmInterfaces () >RETURNS SETOF vm_interface STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_interface; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmInterfacesByVmId (v_vm_id UUID) >RETURNS SETOF vm_interface STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_interface > WHERE vm_guid = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmInterfaceByTemplateId (v_template_id UUID) >RETURNS SETOF vm_interface STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_interface > WHERE vmt_guid = v_template_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmInterfacesByNetworkId (v_network_id UUID) >RETURNS SETOF vm_interface STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_interface.* > FROM vm_interface > INNER JOIN vnic_profiles > ON vm_interface.vnic_profile_id = vnic_profiles.id > INNER JOIN vm_static > ON vm_interface.vm_guid = vm_static.vm_guid > WHERE vnic_profiles.network_id = v_network_id > AND vm_static.entity_type = 'VM'; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmTemplateInterfacesByNetworkId (v_network_id UUID) >RETURNS SETOF vm_interface STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_interface.* > FROM vm_interface > INNER JOIN vm_static > ON vm_interface.vmt_guid = vm_static.vm_guid > INNER JOIN vnic_profiles > ON vm_interface.vnic_profile_id = vnic_profiles.id > WHERE vnic_profiles.network_id = v_network_id > AND vm_static.entity_type = 'TEMPLATE'; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetMacsByDataCenterId (v_data_center_id UUID) >RETURNS SETOF VARCHAR STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT mac_addr > FROM vm_interface > WHERE EXISTS ( > SELECT 1 > FROM vm_static > INNER JOIN cluster > ON vm_static.cluster_id = cluster.cluster_id > WHERE cluster.storage_pool_id = v_data_center_id > AND vm_static.vm_guid = vm_interface.vm_guid > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetMacsByClusterId (v_cluster_id UUID) >RETURNS SETOF VARCHAR STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT mac_addr > FROM vm_interface > WHERE EXISTS ( > SELECT 1 > FROM vm_static > WHERE vm_static.cluster_id = v_cluster_id > AND vm_static.vm_guid = vm_interface.vm_guid > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmNetworkInterfaceViews () >RETURNS SETOF vm_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_interface_view; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmNetworkInterfaceViewByVmNetworkInterfaceViewId (v_id UUID) >RETURNS SETOF vm_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_interface_view > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPluggedVmInterfacesByMac (v_mac_address VARCHAR(20)) >RETURNS SETOF vm_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_interface_view > WHERE mac_addr = v_mac_address > AND is_plugged = true; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmNetworkInterfaceViewByVmId ( > v_vm_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF vm_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_interface_view > WHERE vm_guid = v_vm_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vm_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmNetworkInterfaceToMonitorByVmId (v_vm_id UUID) >RETURNS SETOF vm_interface_monitoring_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_interface_monitoring_view > WHERE vm_guid = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmNetworkInterfaceViewByTemplateId ( > v_template_id UUID, > v_user_id UUID, > v_is_filtered boolean > ) >RETURNS SETOF vm_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_interface_view > WHERE vmt_guid = v_template_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_template_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_template_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmInterfaceViewsByNetworkId (v_network_id UUID) >RETURNS SETOF vm_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_interface_view.* > FROM vm_interface_view > INNER JOIN vnic_profiles > ON vnic_profiles.id = vm_interface_view.vnic_profile_id > WHERE vnic_profiles.network_id = v_network_id > AND vm_interface_view.vm_entity_type = 'VM'; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmTemplateInterfaceViewsByNetworkId (v_network_id UUID) >RETURNS SETOF vm_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_interface_view.* > FROM vm_interface_view > INNER JOIN vnic_profiles > ON vnic_profiles.id = vm_interface_view.vnic_profile_id > WHERE vnic_profiles.network_id = v_network_id > AND vm_interface_view.vm_entity_type = 'TEMPLATE'; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getvm_interface_statisticsById (v_id UUID) >RETURNS SETOF vm_interface_statistics STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_interface_statistics > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertvm_interface_statistics ( > v_id UUID, > v_rx_drop DECIMAL(18, 4), > v_rx_rate DECIMAL(18, 4), > v_rx_total BIGINT, > v_rx_offset BIGINT, > v_tx_drop DECIMAL(18, 4), > v_tx_rate DECIMAL(18, 4), > v_tx_total BIGINT, > v_tx_offset BIGINT, > v_iface_status INT, > v_sample_time FLOAT, > v_vm_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_interface_statistics ( > id, > rx_drop, > rx_rate, > rx_total, > rx_offset, > tx_drop, > tx_rate, > tx_total, > tx_offset, > vm_id, > iface_status, > sample_time > ) > VALUES ( > v_id, > v_rx_drop, > v_rx_rate, > v_rx_total, > v_rx_offset, > v_tx_drop, > v_tx_rate, > v_tx_total, > v_tx_offset, > v_vm_id, > v_iface_status, > v_sample_time > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatevm_interface_statistics ( > v_id UUID, > v_rx_drop DECIMAL(18, 4), > v_rx_rate DECIMAL(18, 4), > v_rx_total BIGINT, > v_rx_offset BIGINT, > v_tx_drop DECIMAL(18, 4), > v_tx_rate DECIMAL(18, 4), > v_tx_total BIGINT, > v_tx_offset BIGINT, > v_iface_status INT, > v_sample_time FLOAT, > v_vm_id UUID > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE vm_interface_statistics > SET rx_drop = v_rx_drop, > rx_rate = v_rx_rate, > rx_total = v_rx_total, > rx_offset = v_rx_offset, > tx_drop = v_tx_drop, > tx_rate = v_tx_rate, > tx_total = v_tx_total, > tx_offset = v_tx_offset, > vm_id = v_vm_id, > iface_status = v_iface_status, > sample_time = v_sample_time, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletevm_interface_statistics (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT id > INTO v_val > FROM vm_interface_statistics > WHERE id = v_id > FOR > > UPDATE; > > DELETE > FROM vm_interface_statistics > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmGuestAgentInterfacesByVmId ( > v_vm_id UUID, > v_user_id UUID, > v_filtered BOOLEAN > ) >RETURNS SETOF vm_guest_agent_interfaces STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_guest_agent_interfaces > WHERE vm_id = v_vm_id > AND ( > NOT v_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vm_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmGuestAgentInterfacesByVmIds (v_vm_ids UUID[]) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_guest_agent_interfaces > WHERE vm_id = ANY(v_vm_ids); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmGuestAgentInterface ( > v_vm_id UUID, > v_interface_name VARCHAR(50), > v_mac_address VARCHAR(59), > v_ipv4_addresses TEXT, > v_ipv6_addresses TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_guest_agent_interfaces ( > vm_id, > interface_name, > mac_address, > ipv4_addresses, > ipv6_addresses > ) > VALUES ( > v_vm_id, > v_interface_name, > v_mac_address, > v_ipv4_addresses, > v_ipv6_addresses > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertvds_interface_statistics ( > v_id UUID, > v_rx_drop DECIMAL(18, 4), > v_rx_rate DECIMAL(18, 4), > v_rx_total BIGINT, > v_rx_offset BIGINT, > v_tx_drop DECIMAL(18, 4), > v_tx_rate DECIMAL(18, 4), > v_tx_total BIGINT, > v_tx_offset BIGINT, > v_iface_status INT, > v_sample_time FLOAT, > v_vds_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vds_interface_statistics ( > id, > rx_drop, > rx_rate, > rx_total, > rx_offset, > tx_drop, > tx_rate, > tx_total, > tx_offset, > vds_id, > iface_status, > sample_time > ) > VALUES ( > v_id, > v_rx_drop, > v_rx_rate, > v_rx_total, > v_rx_offset, > v_tx_drop, > v_tx_rate, > v_tx_total, > v_tx_offset, > v_vds_id, > v_iface_status, > v_sample_time > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatevds_interface_statistics ( > v_id UUID, > v_rx_drop DECIMAL(18, 4), > v_rx_rate DECIMAL(18, 4), > v_rx_total BIGINT, > v_rx_offset BIGINT, > v_tx_drop DECIMAL(18, 4), > v_tx_rate DECIMAL(18, 4), > v_tx_total BIGINT, > v_tx_offset BIGINT, > v_iface_status INT, > v_sample_time FLOAT, > v_vds_id UUID > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE vds_interface_statistics > SET rx_drop = v_rx_drop, > rx_rate = v_rx_rate, > rx_total = v_rx_total, > rx_offset = v_rx_offset, > tx_drop = v_tx_drop, > tx_rate = v_tx_rate, > tx_total = v_tx_total, > tx_offset = v_tx_offset, > vds_id = v_vds_id, > iface_status = v_iface_status, > sample_time = v_sample_time, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletevds_interface_statistics (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT id > INTO v_val > FROM vds_interface_statistics > WHERE id = v_id > FOR > > UPDATE; > > DELETE > FROM vds_interface_statistics > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertnetwork_cluster ( > v_cluster_id UUID, > v_network_id UUID, > v_status INT, > v_is_display BOOLEAN, > v_required BOOLEAN, > v_migration BOOLEAN, > v_management BOOLEAN, > v_is_gluster BOOLEAN, > v_default_route BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO network_cluster ( > cluster_id, > network_id, > status, > is_display, > required, > migration, > management, > is_gluster, > default_route > ) > VALUES ( > v_cluster_id, > v_network_id, > v_status, > v_is_display, > v_required, > v_migration, > v_management, > v_is_gluster, > v_default_route > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatenetwork_cluster ( > v_cluster_id UUID, > v_network_id UUID, > v_status INT, > v_is_display BOOLEAN, > v_required BOOLEAN, > v_migration BOOLEAN, > v_management BOOLEAN, > v_is_gluster BOOLEAN, > v_default_route BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE network_cluster > SET status = v_status, > is_display = v_is_display, > required = v_required, > migration = v_migration, > management = v_management, > is_gluster = v_is_gluster, > default_route = v_default_route > WHERE cluster_id = v_cluster_id > AND network_id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatenetwork_cluster_status ( > v_cluster_id UUID, > v_network_id UUID, > v_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE network_cluster > SET status = v_status > WHERE cluster_id = v_cluster_id > AND network_id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletenetwork_cluster ( > v_cluster_id UUID, > v_network_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM network_cluster > WHERE cluster_id = v_cluster_id > AND network_id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromnetwork_cluster () >RETURNS SETOF network_cluster STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_cluster; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromnetwork_clusterByClusterId (v_cluster_id UUID) >RETURNS SETOF network_cluster STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_cluster > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllManagementNetworksByDataCenterId (v_data_center_id UUID) >RETURNS SETOF network STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT network.* > FROM network > INNER JOIN network_cluster > ON network.id = network_cluster.network_id > INNER JOIN cluster > ON network_cluster.cluster_id = cluster.cluster_id > WHERE cluster.storage_pool_id = v_data_center_id > AND network_cluster.management; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromnetwork_clusterByNetworkId (v_network_id UUID) >RETURNS SETOF network_cluster STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_cluster > WHERE network_id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getnetwork_clusterBycluster_idAndBynetwork_id ( > v_cluster_id UUID, > v_network_id UUID > ) >RETURNS SETOF network_cluster STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_cluster > WHERE cluster_id = v_cluster_id > AND network_id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetvmStaticByGroupIdAndNetwork ( > v_groupId UUID, > v_networkName VARCHAR(50) > ) >RETURNS SETOF vm_static STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_static.* > FROM vm_static > INNER JOIN vm_interface_view > ON vm_static.vm_guid = vm_interface_view.vm_guid > AND network_name = v_networkName > AND vm_static.cluster_id = v_groupId; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION set_network_exclusively_as_display ( > v_cluster_id UUID, > v_network_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE network_cluster > SET is_display = true > WHERE cluster_id = v_cluster_id > AND network_id = v_network_id; > > IF FOUND THEN > UPDATE network_cluster > SET is_display = false > WHERE cluster_id = v_cluster_id > AND network_id != v_network_id; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION set_network_exclusively_as_migration ( > v_cluster_id UUID, > v_network_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE network_cluster > SET migration = true > WHERE cluster_id = v_cluster_id > AND network_id = v_network_id; > > IF FOUND THEN > UPDATE network_cluster > SET migration = false > WHERE cluster_id = v_cluster_id > AND network_id != v_network_id; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION set_network_exclusively_as_default_role_network ( > v_cluster_id UUID, > v_network_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE network_cluster > SET default_route = true > WHERE cluster_id = v_cluster_id > AND network_id = v_network_id; > > IF FOUND THEN > UPDATE network_cluster > SET default_route = false > WHERE cluster_id = v_cluster_id > AND network_id != v_network_id; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION set_network_exclusively_as_gluster ( > v_cluster_id UUID, > v_network_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE network_cluster > SET is_gluster = COALESCE(network_id = v_network_id, false) > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION set_network_exclusively_as_management ( > v_cluster_id UUID, > v_network_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE network_cluster > SET management = true > WHERE cluster_id = v_cluster_id > AND network_id = v_network_id; > > IF FOUND THEN > UPDATE network_cluster > SET management = false > WHERE cluster_id = v_cluster_id > AND network_id != v_network_id; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVnicProfileByVnicProfileId (v_id UUID) >RETURNS SETOF vnic_profiles STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vnic_profiles > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVnicProfile ( > v_id UUID, > v_name VARCHAR(256), > v_network_id UUID, > v_network_qos_id UUID, > v_port_mirroring BOOLEAN, > v_passthrough BOOLEAN, > v_migratable BOOLEAN, > v_custom_properties TEXT, > v_description TEXT, > v_network_filter_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vnic_profiles ( > id, > name, > network_id, > network_qos_id, > port_mirroring, > passthrough, > migratable, > custom_properties, > description, > network_filter_id > ) > VALUES ( > v_id, > v_name, > v_network_id, > v_network_qos_id, > v_port_mirroring, > v_passthrough, > v_migratable, > v_custom_properties, > v_description, > v_network_filter_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVnicProfile ( > v_id UUID, > v_name VARCHAR(256), > v_network_id UUID, > v_network_qos_id UUID, > v_port_mirroring BOOLEAN, > v_passthrough BOOLEAN, > v_migratable BOOLEAN, > v_custom_properties TEXT, > v_description TEXT, > v_network_filter_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vnic_profiles > SET id = v_id, > name = v_name, > network_id = v_network_id, > network_qos_id = v_network_qos_id, > port_mirroring = v_port_mirroring, > passthrough = v_passthrough, > migratable = v_migratable, > custom_properties = v_custom_properties, > description = v_description, > _update_date = LOCALTIMESTAMP, > network_filter_id = v_network_filter_id > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVnicProfile (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > DELETE > FROM vnic_profiles > WHERE id = v_id; > > -- Delete the vnic profiles permissions > PERFORM DeletePermissionsByEntityId(v_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVnicProfiles () >RETURNS SETOF vnic_profiles STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vnic_profiles; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVnicProfilesByNetworkId (v_network_id UUID) >RETURNS SETOF vnic_profiles STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vnic_profiles > WHERE network_id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVnicProfileViewByVnicProfileViewId ( > v_id UUID, > v_user_id uuid, > v_is_filtered boolean > ) >RETURNS SETOF vnic_profiles_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vnic_profiles_view > WHERE id = v_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vnic_profile_permissions_view > WHERE user_id = v_user_id > AND entity_id = vnic_profiles_view.id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVnicProfileViews ( > v_user_id uuid, > v_is_filtered boolean > ) >RETURNS SETOF vnic_profiles_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vnic_profiles_view > WHERE NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vnic_profile_permissions_view > WHERE user_id = v_user_id > AND entity_id = vnic_profiles_view.id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVnicProfileViewsByNetworkId ( > v_network_id UUID, > v_user_id uuid, > v_is_filtered boolean > ) >RETURNS SETOF vnic_profiles_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vnic_profiles_view > WHERE network_id = v_network_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vnic_profile_permissions_view > WHERE user_id = v_user_id > AND entity_id = vnic_profiles_view.id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVnicProfileViewsByDataCenterId ( > v_id UUID, > v_user_id uuid, > v_is_filtered boolean > ) >RETURNS SETOF vnic_profiles_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vnic_profiles_view > WHERE data_center_id = v_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vnic_profile_permissions_view > WHERE user_id = v_user_id > AND entity_id = vnic_profiles_view.id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVnicProfileViewsByClusterId ( > v_id UUID, > v_user_id uuid, > v_is_filtered boolean > ) >RETURNS SETOF vnic_profiles_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vnic_profiles_view > WHERE EXISTS ( > SELECT 1 > FROM network_cluster > WHERE cluster_id = v_id > AND network_cluster.network_id = vnic_profiles_view.network_id > ) > AND ( > NOT v_is_filtered > OR EXISTS( > SELECT 1 > FROM user_vnic_profile_permissions_view > WHERE user_id = v_user_id > AND entity_id = vnic_profiles_view.id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVnicProfileViewsByNetworkQosId (v_network_qos_id UUID) >RETURNS SETOF vnic_profiles_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vnic_profiles_view > WHERE network_qos_id = v_network_qos_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetIscsiIfacesByHostIdAndStorageTargetId ( > v_host_id UUID, > v_target_id VARCHAR(50) > ) >RETURNS SETOF vds_interface_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_interface_view.* > FROM vds_interface_view, > network_cluster, > network, > iscsi_bonds_networks_map, > iscsi_bonds_storage_connections_map > WHERE iscsi_bonds_storage_connections_map.connection_id = v_target_id > AND iscsi_bonds_storage_connections_map.iscsi_bond_id = iscsi_bonds_networks_map.iscsi_bond_id > AND iscsi_bonds_networks_map.network_id = network.id > AND network.id = network_cluster.network_id > AND network.name = vds_interface_view.network_name > AND network_cluster.cluster_id = vds_interface_view.cluster_id > AND vds_interface_view.vds_id = v_host_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getActiveMigrationNetworkInterfaceForHost (v_host_id UUID) >RETURNS SETOF active_migration_network_interfaces STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM active_migration_network_interfaces > WHERE vds_id = v_host_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertHostNicVfsConfig ( > v_id UUID, > v_nic_id UUID, > v_is_all_networks_allowed BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO host_nic_vfs_config ( > id, > nic_id, > is_all_networks_allowed > ) > VALUES ( > v_id, > v_nic_id, > v_is_all_networks_allowed > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateHostNicVfsConfig ( > v_id UUID, > v_nic_id UUID, > v_is_all_networks_allowed BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE host_nic_vfs_config > SET id = v_id, > nic_id = v_nic_id, > is_all_networks_allowed = v_is_all_networks_allowed, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteHostNicVfsConfig (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM host_nic_vfs_config > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetHostNicVfsConfigById (v_id UUID) >RETURNS SETOF host_nic_vfs_config STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM host_nic_vfs_config > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVfsConfigByNicId (v_nic_id UUID) >RETURNS SETOF host_nic_vfs_config STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM host_nic_vfs_config > WHERE nic_id = v_nic_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromHostNicVfsConfigs () >RETURNS SETOF host_nic_vfs_config STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM host_nic_vfs_config; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllVfsConfigByHostId (v_host_id UUID) >RETURNS SETOF host_nic_vfs_config STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT host_nic_vfs_config.* > FROM host_nic_vfs_config > INNER JOIN vds_interface > ON host_nic_vfs_config.nic_id = vds_interface.id > WHERE vds_interface.vds_id = v_host_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDnsResolverConfigurationByDnsResolverConfigurationId (v_id UUID) >RETURNS SETOF dns_resolver_configuration STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM dns_resolver_configuration > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromDnsResolverConfigurations () >RETURNS SETOF dns_resolver_configuration STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM dns_resolver_configuration; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertDnsResolverConfiguration ( > v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO dns_resolver_configuration (id) > VALUES (v_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateDnsResolverConfiguration (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE dns_resolver_configuration > SET id = v_id > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteDnsResolverConfiguration (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM dns_resolver_configuration > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNameServersByDnsResolverConfigurationId (v_dns_resolver_configuration_id UUID) >RETURNS SETOF name_server STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM name_server > WHERE dns_resolver_configuration_id = v_dns_resolver_configuration_id > ORDER BY position ASC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertNameServer ( > v_dns_resolver_configuration_id UUID, > v_address VARCHAR(45), > v_position SMALLINT) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO > name_server( > address, > position, > dns_resolver_configuration_id) > VALUES ( > v_address, > v_position, > v_dns_resolver_configuration_id); > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteNameServersByDnsResolverConfigurationId (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM name_server > WHERE dns_resolver_configuration_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteDnsResolverConfigurationByNetworkAttachmentId (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM dns_resolver_configuration > WHERE id = ( > SELECT > dns_resolver_configuration_id > FROM > network_attachments > WHERE > id = v_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteDnsResolverConfigurationByNetworkId (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM dns_resolver_configuration > WHERE id = ( > SELECT > dns_resolver_configuration_id > FROM > network > WHERE > id = v_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteDnsResolverConfigurationByVdsDynamicId (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM dns_resolver_configuration > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworkAttachmentByNetworkAttachmentId (v_id UUID) >RETURNS SETOF network_attachments STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_attachments > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertNetworkAttachment ( > v_id UUID, > v_network_id UUID, > v_nic_id UUID, > v_boot_protocol VARCHAR(20), > v_address VARCHAR(20), > v_netmask VARCHAR(20), > v_gateway VARCHAR(20), > v_ipv6_boot_protocol VARCHAR(20), > v_ipv6_address VARCHAR(50), > v_ipv6_prefix INT, > v_ipv6_gateway VARCHAR(50), > v_custom_properties TEXT, > v_dns_resolver_configuration_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO network_attachments ( > id, > network_id, > nic_id, > boot_protocol, > address, > netmask, > gateway, > ipv6_boot_protocol, > ipv6_address, > ipv6_prefix, > ipv6_gateway, > custom_properties, > dns_resolver_configuration_id > ) > VALUES ( > v_id, > v_network_id, > v_nic_id, > v_boot_protocol, > v_address, > v_netmask, > v_gateway, > v_ipv6_boot_protocol, > v_ipv6_address, > v_ipv6_prefix, > v_ipv6_gateway, > v_custom_properties, > v_dns_resolver_configuration_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateNetworkAttachment ( > v_id UUID, > v_network_id UUID, > v_nic_id UUID, > v_boot_protocol VARCHAR(20), > v_address VARCHAR(20), > v_netmask VARCHAR(20), > v_gateway VARCHAR(20), > v_ipv6_boot_protocol VARCHAR(20), > v_ipv6_address VARCHAR(50), > v_ipv6_prefix INT, > v_ipv6_gateway VARCHAR(50), > v_custom_properties TEXT, > v_dns_resolver_configuration_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE network_attachments > SET network_id = v_network_id, > nic_id = v_nic_id, > boot_protocol = v_boot_protocol, > address = v_address, > netmask = v_netmask, > gateway = v_gateway, > custom_properties = v_custom_properties, > ipv6_boot_protocol = v_ipv6_boot_protocol, > ipv6_address = v_ipv6_address, > ipv6_prefix = v_ipv6_prefix, > ipv6_gateway = v_ipv6_gateway, > _update_date = LOCALTIMESTAMP, > dns_resolver_configuration_id = v_dns_resolver_configuration_id > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteNetworkAttachment (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM network_attachments > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromNetworkAttachments () >RETURNS SETOF network_attachments STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_attachments; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworkAttachmentsByNicId (v_nic_id UUID) >RETURNS SETOF network_attachments STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_attachments > WHERE nic_id = v_nic_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworkAttachmentsByNetworkId (v_network_id UUID) >RETURNS SETOF network_attachments STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_attachments > WHERE network_id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworkAttachmentsByHostId (v_host_id UUID) >RETURNS SETOF network_attachments STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_attachments > WHERE EXISTS ( > SELECT 1 > FROM vds_interface > WHERE network_attachments.nic_id = vds_interface.id > AND vds_interface.vds_id = v_host_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworkAttachmentByNicIdAndNetworkId ( > v_nic_id UUID, > v_network_id UUID > ) >RETURNS SETOF network_attachments STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT na.* > FROM network_attachments na > WHERE na.network_id = v_network_id > AND na.nic_id = v_nic_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveNetworkAttachmentByNetworkId (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM network_attachments na > WHERE na.network_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVfsConfigNetwork ( > v_vfs_config_id UUID, > v_network_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vfs_config_networks ( > vfs_config_id, > network_id > ) > VALUES ( > v_vfs_config_id, > v_network_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVfsConfigNetwork ( > v_vfs_config_id UUID, > v_network_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vfs_config_networks > WHERE vfs_config_id = v_vfs_config_id > AND network_id = v_network_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllVfsConfigNetworks (v_vfs_config_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vfs_config_networks > WHERE vfs_config_id = v_vfs_config_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworksByVfsConfigId (v_vfs_config_id UUID) >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT network_id > FROM vfs_config_networks > WHERE vfs_config_id = v_vfs_config_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVfsConfigLabel ( > v_vfs_config_id UUID, > v_label TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vfs_config_labels ( > vfs_config_id, > label > ) > VALUES ( > v_vfs_config_id, > v_label > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVfsConfigLabel ( > v_vfs_config_id UUID, > v_label TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vfs_config_labels > WHERE vfs_config_id = v_vfs_config_id > AND label = v_label; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllVfsConfigLabels (v_vfs_config_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vfs_config_labels > WHERE vfs_config_id = v_vfs_config_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLabelsByVfsConfigId (v_vfs_config_id UUID) >RETURNS SETOF TEXT STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT label > FROM vfs_config_labels > WHERE vfs_config_id = v_vfs_config_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllNetworkFilters () >RETURNS SETOF network_filter STABLE >AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_filter; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllSupportedNetworkFiltersByVersion (v_version VARCHAR(40)) >RETURNS SETOF network_filter STABLE >AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_filter > WHERE v_version >= version; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworkFilterById (v_filter_id UUID) >RETURNS SETOF network_filter STABLE >AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_filter > WHERE filter_id = v_filter_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNetworkFilterByName (v_filter_name VARCHAR(50)) >RETURNS SETOF network_filter STABLE >AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM network_filter > WHERE filter_name like v_filter_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetHostProviderBinding ( > v_vds_id UUID, > v_plugin_type character varying(64) > ) >RETURNS SETOF character varying(64) STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT binding_host_id > FROM provider_binding_host_id > WHERE vds_id = v_vds_id > AND plugin_type = v_plugin_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateHostProviderBinding ( > v_vds_id UUID, > v_plugin_types character varying(64)[], > v_provider_binding_host_ids character varying(64)[] > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > PERFORM 1 FROM provider_binding_host_id WHERE vds_id = v_vds_id FOR UPDATE; > DELETE FROM provider_binding_host_id WHERE vds_id = v_vds_id; > INSERT INTO provider_binding_host_id ( > vds_id, > plugin_type, > binding_host_id > ) > SELECT v_vds_id, unnest(v_plugin_types), unnest(v_provider_binding_host_ids); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,235+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/numa_sp.sql... >2019-02-26 17:06:41,237+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/numa_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertNumaNode ( > v_numa_node_id UUID, > v_vds_id UUID, > v_vm_id UUID, > v_numa_node_index SMALLINT, > v_mem_total BIGINT, > v_cpu_count SMALLINT, > v_mem_free BIGINT, > v_usage_mem_percent INT, > v_cpu_sys DECIMAL(5, 2), > v_cpu_user DECIMAL(5, 2), > v_cpu_idle DECIMAL(5, 2), > v_usage_cpu_percent INT, > v_distance TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > INSERT INTO numa_node ( > numa_node_id, > vds_id, > vm_id, > numa_node_index, > mem_total, > cpu_count, > mem_free, > usage_mem_percent, > cpu_sys, > cpu_user, > cpu_idle, > usage_cpu_percent, > distance > ) > VALUES ( > v_numa_node_id, > v_vds_id, > v_vm_id, > v_numa_node_index, > v_mem_total, > v_cpu_count, > v_mem_free, > v_usage_mem_percent, > v_cpu_sys, > v_cpu_user, > v_cpu_idle, > v_usage_cpu_percent, > v_distance > ); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateNumaNode ( > v_numa_node_id UUID, > v_numa_node_index SMALLINT, > v_mem_total BIGINT, > v_cpu_count SMALLINT, > v_distance TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > UPDATE numa_node > SET numa_node_index = v_numa_node_index, > mem_total = v_mem_total, > cpu_count = v_cpu_count, > distance = v_distance > WHERE numa_node_id = v_numa_node_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateNumaNodeStatistics ( > v_numa_node_id UUID, > v_mem_free BIGINT, > v_usage_mem_percent INT, > v_cpu_sys DECIMAL(5, 2), > v_cpu_user DECIMAL(5, 2), > v_cpu_idle DECIMAL(5, 2), > v_usage_cpu_percent INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > UPDATE numa_node > SET mem_free = v_mem_free, > usage_mem_percent = v_usage_mem_percent, > cpu_sys = v_cpu_sys, > cpu_user = v_cpu_user, > cpu_idle = v_cpu_idle, > usage_cpu_percent = v_usage_cpu_percent > WHERE numa_node_id = v_numa_node_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteNumaNode (v_numa_node_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > DELETE > FROM numa_node > WHERE numa_node_id = v_numa_node_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNumaNodeByVdsId (v_vds_id UUID) >RETURNS SETOF numa_node_cpus_view STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT numa_node_cpus_view.* > FROM numa_node_cpus_view > WHERE vds_id = v_vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNumaNodeByVmId (v_vm_id UUID) >RETURNS SETOF numa_node_cpus_view STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT numa_node_cpus_view.* > FROM numa_node_cpus_view > WHERE vm_id = v_vm_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertNumaNodeCpu ( > v_id UUID, > v_numa_node_id UUID, > v_cpu_core_id INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > INSERT INTO numa_node_cpu_map ( > id, > numa_node_id, > cpu_core_id > ) > VALUES ( > v_id, > v_numa_node_id, > v_cpu_core_id > ); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteNumaNodeCpuByNumaNodeId (v_numa_node_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > DELETE > FROM numa_node_cpu_map > WHERE numa_node_id = v_numa_node_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromNumaNodeCpuMap () >RETURNS SETOF numa_node_cpu_map STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT numa_node_cpu_map.* > FROM numa_node_cpu_map; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertNumaNodeMap ( > v_id UUID, > v_vm_numa_node_id UUID, > v_vds_numa_node_index SMALLINT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > INSERT INTO vm_vds_numa_node_map ( > id, > vm_numa_node_id, > vds_numa_node_index > ) > VALUES ( > v_id, > v_vm_numa_node_id, > v_vds_numa_node_index > ); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteNumaNodeMapByVmNumaNodeId (v_vm_numa_node_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > DELETE > FROM vm_vds_numa_node_map > WHERE vm_numa_node_id = v_vm_numa_node_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllAssignedNumaNodeInfomation () >RETURNS SETOF numa_node_assignment_view STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT numa_node_assignment_view.* > FROM numa_node_assignment_view; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmNumaNodeByCluster (v_cluster_id UUID) >RETURNS SETOF numa_node_with_cluster_view STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT numa_node_with_cluster_view.* > FROM numa_node_with_cluster_view > WHERE cluster_id = v_cluster_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,259+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/policy_unit_sp.sql... >2019-02-26 17:06:41,261+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/policy_unit_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromPolicyUnits () >RETURNS SETOF policy_units STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM policy_units; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetPolicyUnitByPolicyUnitId (v_id UUID) >RETURNS SETOF policy_units STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM policy_units > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertPolicyUnit ( > v_id UUID, > v_name VARCHAR(128), > v_description TEXT, > v_is_internal BOOLEAN, > v_type SMALLINT, > v_custom_properties_regex TEXT, > v_enabled BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO policy_units ( > id, > name, > description, > is_internal, > type, > custom_properties_regex, > enabled > ) > VALUES ( > v_id, > v_name, > v_description, > v_is_internal, > v_type, > v_custom_properties_regex, > v_enabled > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdatePolicyUnit ( > v_id UUID, > v_enabled BOOLEAN, > v_custom_properties_regex TEXT, > v_description TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE policy_units > SET custom_properties_regex = v_custom_properties_regex, > enabled = v_enabled, > description = v_description > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeletePolicyUnit (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM policy_units > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,278+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/providers_sp.sql... >2019-02-26 17:06:41,281+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/providers_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertProvider ( > v_id UUID, > v_name VARCHAR(128), > v_description VARCHAR(4000), > v_url VARCHAR(512), > v_provider_type VARCHAR(32), > v_auth_required BOOLEAN, > v_auth_username VARCHAR(64), > v_auth_password TEXT, > v_custom_properties TEXT, > v_tenant_name VARCHAR DEFAULT NULL, > v_plugin_type VARCHAR DEFAULT NULL, > v_agent_configuration TEXT DEFAULT NULL, > v_additional_properties TEXT DEFAULT NULL, > v_auth_url TEXT DEFAULT NULL, > v_read_only BOOLEAN DEFAULT FALSE, > v_is_unmanaged BOOLEAN DEFAULT FALSE, > v_auto_sync BOOLEAN DEFAULT FALSE, > v_user_domain_name VARCHAR(128) DEFAULT NULL, > v_project_name VARCHAR(128) DEFAULT NULL, > v_project_domain_name VARCHAR(128) DEFAULT NULL > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO providers ( > id, > name, > description, > url, > provider_type, > auth_required, > auth_username, > auth_password, > custom_properties, > tenant_name, > plugin_type, > agent_configuration, > additional_properties, > auth_url, > read_only, > is_unmanaged, > auto_sync, > user_domain_name, > project_name, > project_domain_name > ) > VALUES ( > v_id, > v_name, > v_description, > v_url, > v_provider_type, > v_auth_required, > v_auth_username, > v_auth_password, > v_custom_properties, > v_tenant_name, > v_plugin_type, > v_agent_configuration, > v_additional_properties, > v_auth_url, > v_read_only, > v_is_unmanaged, > v_auto_sync, > v_user_domain_name, > v_project_name, > v_project_domain_name > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateProvider ( > v_id UUID, > v_name VARCHAR(128), > v_description VARCHAR(4000), > v_url VARCHAR(512), > v_provider_type VARCHAR(32), > v_auth_required BOOLEAN, > v_auth_username VARCHAR(64), > v_auth_password TEXT, > v_custom_properties TEXT, > v_tenant_name VARCHAR DEFAULT NULL, > v_plugin_type VARCHAR DEFAULT NULL, > v_agent_configuration TEXT DEFAULT NULL, > v_additional_properties TEXT DEFAULT NULL, > v_auth_url TEXT DEFAULT NULL, > v_read_only BOOLEAN DEFAULT FALSE, > v_is_unmanaged BOOLEAN DEFAULT FALSE, > v_auto_sync BOOLEAN DEFAULT FALSE, > v_user_domain_name VARCHAR(128) DEFAULT NULL, > v_project_name VARCHAR(128) DEFAULT NULL, > v_project_domain_name VARCHAR(128) DEFAULT NULL > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE providers > SET name = v_name, > description = v_description, > url = v_url, > provider_type = v_provider_type, > auth_required = v_auth_required, > auth_username = v_auth_username, > auth_password = v_auth_password, > custom_properties = v_custom_properties, > tenant_name = v_tenant_name, > plugin_type = v_plugin_type, > _update_date = NOW(), > agent_configuration = v_agent_configuration, > additional_properties = v_additional_properties, > auth_url = v_auth_url, > read_only = v_read_only, > is_unmanaged = v_is_unmanaged, > auto_sync = v_auto_sync, > user_domain_name = v_user_domain_name, > project_name = v_project_name, > project_domain_name = v_project_domain_name > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteProvider (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM providers > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromProviders () >RETURNS SETOF providers STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM providers; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromProvidersByTypes(v_provider_types varchar[]) >RETURNS SETOF providers AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM providers > WHERE provider_type = ANY(v_provider_types); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetProviderByProviderId (v_id UUID) >RETURNS SETOF providers STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM providers > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetProviderByName (v_name VARCHAR) >RETURNS SETOF providers STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM providers > WHERE name = v_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,300+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/qos_sp.sql... >2019-02-26 17:06:41,302+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/qos_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertStorageQos ( > v_id uuid, > v_qos_type SMALLINT, > v_name VARCHAR(50), > v_description TEXT, > v_storage_pool_id uuid, > v_max_throughput INT, > v_max_read_throughput INT, > v_max_write_throughput INT, > v_max_iops INT, > v_max_read_iops INT, > v_max_write_iops INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO qos ( > id, > qos_type, > name, > description, > storage_pool_id, > max_throughput, > max_read_throughput, > max_write_throughput, > max_iops, > max_read_iops, > max_write_iops > ) > VALUES ( > v_id, > v_qos_type, > v_name, > v_description, > v_storage_pool_id, > v_max_throughput, > v_max_read_throughput, > v_max_write_throughput, > v_max_iops, > v_max_read_iops, > v_max_write_iops > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertCpuQos ( > v_id uuid, > v_qos_type SMALLINT, > v_name VARCHAR(50), > v_description TEXT, > v_storage_pool_id uuid, > v_cpu_limit INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO qos ( > id, > qos_type, > name, > description, > storage_pool_id, > cpu_limit > ) > VALUES ( > v_id, > v_qos_type, > v_name, > v_description, > v_storage_pool_id, > v_cpu_limit > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertNetworkQos ( > v_id uuid, > v_qos_type SMALLINT, > v_name VARCHAR(50), > v_description TEXT, > v_storage_pool_id uuid, > v_inbound_average INT, > v_inbound_peak INT, > v_inbound_burst INT, > v_outbound_average INT, > v_outbound_peak INT, > v_outbound_burst INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO qos ( > id, > qos_type, > name, > description, > storage_pool_id, > inbound_average, > inbound_peak, > inbound_burst, > outbound_average, > outbound_peak, > outbound_burst > ) > VALUES ( > v_id, > v_qos_type, > v_name, > v_description, > v_storage_pool_id, > v_inbound_average, > v_inbound_peak, > v_inbound_burst, > v_outbound_average, > v_outbound_peak, > v_outbound_burst > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertHostNetworkQos ( > v_id uuid, > v_qos_type SMALLINT, > v_name VARCHAR(50), > v_description TEXT, > v_storage_pool_id uuid, > v_out_average_linkshare INT, > v_out_average_upperlimit INT, > v_out_average_realtime INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO qos ( > id, > qos_type, > name, > description, > storage_pool_id, > out_average_linkshare, > out_average_upperlimit, > out_average_realtime > ) > VALUES ( > v_id, > v_qos_type, > v_name, > v_description, > v_storage_pool_id, > v_out_average_linkshare, > v_out_average_upperlimit, > v_out_average_realtime > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStorageQos ( > v_id uuid, > v_qos_type SMALLINT, > v_name VARCHAR(50), > v_description TEXT, > v_storage_pool_id uuid, > v_max_throughput INT, > v_max_read_throughput INT, > v_max_write_throughput INT, > v_max_iops INT, > v_max_read_iops INT, > v_max_write_iops INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE qos > SET qos_type = v_qos_type, > name = v_name, > description = v_description, > storage_pool_id = v_storage_pool_id, > max_throughput = v_max_throughput, > max_read_throughput = v_max_read_throughput, > max_write_throughput = v_max_write_throughput, > max_iops = v_max_iops, > max_read_iops = v_max_read_iops, > max_write_iops = v_max_write_iops, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateCpuQos ( > v_id uuid, > v_qos_type SMALLINT, > v_name VARCHAR(50), > v_description TEXT, > v_storage_pool_id uuid, > v_cpu_limit INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE qos > SET qos_type = v_qos_type, > name = v_name, > description = v_description, > storage_pool_id = v_storage_pool_id, > cpu_limit = v_cpu_limit, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateNetworkQos ( > v_id uuid, > v_qos_type SMALLINT, > v_name VARCHAR(50), > v_description TEXT, > v_storage_pool_id uuid, > v_inbound_average INT, > v_inbound_peak INT, > v_inbound_burst INT, > v_outbound_average INT, > v_outbound_peak INT, > v_outbound_burst INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE qos > SET qos_type = v_qos_type, > name = v_name, > description = v_description, > storage_pool_id = v_storage_pool_id, > inbound_average = v_inbound_average, > inbound_peak = v_inbound_peak, > inbound_burst = v_inbound_burst, > outbound_average = v_outbound_average, > outbound_peak = v_outbound_peak, > outbound_burst = v_outbound_burst, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateHostNetworkQos ( > v_id uuid, > v_qos_type SMALLINT, > v_name VARCHAR(50), > v_description TEXT, > v_storage_pool_id uuid, > v_out_average_linkshare INT, > v_out_average_upperlimit INT, > v_out_average_realtime INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE qos > SET qos_type = v_qos_type, > name = v_name, > description = v_description, > storage_pool_id = v_storage_pool_id, > out_average_linkshare = v_out_average_linkshare, > out_average_upperlimit = v_out_average_upperlimit, > out_average_realtime = v_out_average_realtime, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteQos (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM qos > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetQosByQosId (v_id UUID) >RETURNS SETOF qos STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM qos > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllQosForStoragePoolByQosType ( > v_storage_pool_id UUID, > v_qos_type SMALLINT > ) >RETURNS SETOF qos STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM qos > WHERE storage_pool_id = v_storage_pool_id > AND qos_type = v_qos_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllQosForStoragePool (v_storage_pool_id UUID) >RETURNS SETOF qos STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM qos > WHERE storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllQosByQosType (v_qos_type SMALLINT) >RETURNS SETOF qos STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM qos > WHERE qos_type = v_qos_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetQosByDiskProfiles (v_disk_profile_ids UUID[]) >RETURNS SETOF qos_for_disk_profile_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM qos_for_disk_profile_view > WHERE disk_profile_id = ANY(v_disk_profile_ids); > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetQosByVmIds (v_vm_ids UUID[]) >RETURNS SETOF qos_for_vm_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM qos_for_vm_view > WHERE vm_id = ANY(v_vm_ids); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetHostNetworkQosOfMigrationNetworkByClusterId (v_cluster_id UUID) >RETURNS SETOF host_network_qos_of_migration_network_by_cluster STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM host_network_qos_of_migration_network_by_cluster > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,326+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/quota_sp.sql... >2019-02-26 17:06:41,328+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/quota_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertQuota ( > v_id UUID, > v_storage_pool_id UUID, > v_quota_name VARCHAR(50), > v_description VARCHAR(500), > v_threshold_cluster_percentage INT, > v_threshold_storage_percentage INT, > v_grace_cluster_percentage INT, > v_grace_storage_percentage INT, > v_is_default BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO quota ( > id, > storage_pool_id, > quota_name, > description, > threshold_cluster_percentage, > threshold_storage_percentage, > grace_cluster_percentage, > grace_storage_percentage, > is_default > ) > VALUES ( > v_id, > v_storage_pool_id, > v_quota_name, > v_description, > v_threshold_cluster_percentage, > v_threshold_storage_percentage, > v_grace_cluster_percentage, > v_grace_storage_percentage, > v_is_default > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertQuotaLimitation ( > v_id UUID, > v_quota_id UUID, > v_storage_id UUID, > v_cluster_id UUID, > v_virtual_cpu INT, > v_mem_size_mb BIGINT, > v_storage_size_gb BIGINT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO quota_limitation ( > id, > quota_id, > storage_id, > cluster_id, > virtual_cpu, > mem_size_mb, > storage_size_gb > ) > VALUES ( > v_id, > v_quota_id, > v_storage_id, > v_cluster_id, > v_virtual_cpu, > v_mem_size_mb, > v_storage_size_gb > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetQuotaStorageByStorageGuid ( > v_storage_id UUID, > v_id UUID, > v_allow_empty BOOLEAN > ) >RETURNS SETOF quota_storage_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM ( > SELECT COALESCE(q_storage_view.quota_storage_id, q_g_view.quota_id) AS quota_storage_id, > q_g_view.quota_id AS quota_id, > q_storage_view.storage_id, > q_storage_view.storage_name, > COALESCE(q_storage_view.storage_size_gb, q_g_view.storage_size_gb) AS storage_size_gb, > COALESCE(q_storage_view.storage_size_gb_usage, q_g_view.storage_size_gb_usage) AS storage_size_gb_usage > FROM quota_global_view q_g_view > LEFT JOIN quota_storage_view q_storage_view > ON q_g_view.quota_id = q_storage_view.quota_id > AND ( > v_storage_id = q_storage_view.storage_id > OR v_storage_id IS NULL > ) > WHERE q_g_view.quota_id = v_id > ) sub > WHERE ( > v_allow_empty > OR storage_size_gb IS NOT NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetQuotaByAdElementId ( > v_ad_element_id UUID, > v_storage_pool_id UUID, > v_recursive BOOLEAN > ) >RETURNS SETOF quota_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM quota_view > WHERE quota_view.quota_id IN ( > SELECT object_id > FROM PERMISSIONS > WHERE object_type_id = 17 > AND role_id IN ( > SELECT role_id > FROM ROLES_groups > WHERE action_group_id = 901 > ) > AND ad_element_id = v_ad_element_id > OR ( > v_recursive > AND ad_element_id IN ( > SELECT * > FROM getUserAndGroupsById(v_ad_element_id) > ) > ) > ) > AND ( > v_storage_pool_id = quota_view.storage_pool_id > OR v_storage_pool_id IS NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getAllThinQuota () >RETURNS SETOF quota_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM quota_view; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getQuotaCount () >RETURNS SETOF BIGINT STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT count(*) AS num_quota > FROM quota; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetQuotaStorageByQuotaGuid (v_id UUID) >RETURNS SETOF quota_storage_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM quota_storage_view > WHERE quota_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetQuotaClusterByClusterGuid ( > v_cluster_id UUID, > v_id UUID, > v_allow_empty BOOLEAN > ) >RETURNS SETOF quota_cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM ( > SELECT COALESCE(q_vds_view.quota_cluster_id, q_g_view.quota_id) AS quota_cluster_id, > q_g_view.quota_id AS quota_id, > q_vds_view.cluster_id AS cluster_id, > q_vds_view.cluster_name AS cluster_name, > COALESCE(q_vds_view.virtual_cpu, q_g_view.virtual_cpu) AS virtual_cpu, > COALESCE(q_vds_view.virtual_cpu_usage, q_g_view.virtual_cpu_usage) AS virtual_cpu_usage, > COALESCE(q_vds_view.mem_size_mb, q_g_view.mem_size_mb) AS mem_size_mb, > COALESCE(q_vds_view.mem_size_mb_usage, q_g_view.mem_size_mb_usage) AS mem_size_mb_usage > FROM quota_global_view q_g_view > LEFT JOIN quota_cluster_view q_vds_view > ON q_g_view.quota_id = q_vds_view.quota_id > AND ( > v_cluster_id = q_vds_view.cluster_id > OR v_cluster_id IS NULL > ) > WHERE q_g_view.quota_id = v_id > ) sub > WHERE v_allow_empty > OR virtual_cpu IS NOT NULL > OR mem_size_mb IS NOT NULL; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetQuotaClusterByQuotaGuid (v_id UUID) >RETURNS SETOF quota_cluster_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT quota_cluster_view.* > FROM quota_cluster_view > WHERE quota_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteQuotaByQuotaGuid (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM quota > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteQuotaLimitationByQuotaGuid (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM quota_limitation > WHERE quota_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateQuotaMetaData ( > v_id UUID, > v_storage_pool_id UUID, > v_quota_name VARCHAR(50), > v_description VARCHAR(500), > v_threshold_cluster_percentage INT, > v_threshold_storage_percentage INT, > v_grace_cluster_percentage INT, > v_grace_storage_percentage INT, > v_is_default BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE quota > SET storage_pool_id = v_storage_pool_id, > quota_name = v_quota_name, > description = v_description, > _update_date = LOCALTIMESTAMP, > threshold_cluster_percentage = v_threshold_cluster_percentage, > threshold_storage_percentage = v_threshold_storage_percentage, > grace_cluster_percentage = v_grace_cluster_percentage, > grace_storage_percentage = v_grace_storage_percentage, > is_default = v_is_default > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetQuotaByStoragePoolGuid (v_storage_pool_id UUID) >RETURNS SETOF quota_global_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM quota_global_view > WHERE ( > storage_pool_id = v_storage_pool_id > OR v_storage_pool_id IS NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDefaultQuotaForStoragePool (v_storage_pool_id UUID) >RETURNS SETOF quota_global_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM quota_global_view > WHERE is_default = TRUE > AND storage_pool_id = v_storage_pool_id; >END; >$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetQuotaByQuotaGuid (v_id UUID) >RETURNS SETOF quota_global_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM quota_global_view > WHERE quota_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetQuotaByQuotaName (v_quota_name VARCHAR, v_storage_pool_id UUID) >RETURNS SETOF quota_global_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM quota_global_view > WHERE quota_name = v_quota_name > AND storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllThinQuotasByStorageId ( > v_storage_id UUID, > v_engine_session_seq_id INT, > v_is_filtered boolean > ) >RETURNS SETOF quota_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT quota_id, > storage_pool_id, > storage_pool_name, > quota_name, > description, > threshold_cluster_percentage, > threshold_storage_percentage, > grace_cluster_percentage, > grace_storage_percentage, > quota_enforcement_type, > is_default > FROM quota_limitations_view > WHERE ( > storage_id = v_storage_id > OR ( > is_global > AND NOT is_empty > AND storage_size_gb IS NOT NULL > AND storage_pool_id IN ( > SELECT storage_pool_id > FROM storage_pool_iso_map > WHERE storage_id = v_storage_id > ) > ) > ) > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM permissions p > INNER JOIN engine_session_user_flat_groups u > ON u.granted_id = p.ad_element_id > WHERE u.engine_session_seq_id = v_engine_session_seq_id > AND p.object_type_id = 17 > AND -- quota object > p.role_id = 'def0000a-0000-0000-0000-def00000000a' > AND -- consume quota > quota_id = p.object_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllThinQuotasByClusterId ( > v_cluster_id UUID, > v_engine_session_seq_id INT, > v_is_filtered boolean > ) >RETURNS SETOF quota_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT quota_id, > storage_pool_id, > storage_pool_name, > quota_name, > description, > threshold_cluster_percentage, > threshold_storage_percentage, > grace_cluster_percentage, > grace_storage_percentage, > quota_enforcement_type, > is_default > FROM quota_limitations_view > WHERE ( > cluster_id = v_cluster_id > OR ( > is_global > AND NOT is_empty > AND virtual_cpu IS NOT NULL > AND storage_pool_id IN ( > SELECT storage_pool_id > FROM cluster > WHERE cluster_id = v_cluster_id > ) > ) > ) > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM permissions p > INNER JOIN engine_session_user_flat_groups u > ON u.granted_id = p.ad_element_id > WHERE u.engine_session_seq_id = v_engine_session_seq_id > AND p.object_type_id = 17 > AND -- quota object > p.role_id = 'def0000a-0000-0000-0000-def00000000a' > AND -- consume quota > quota_id = p.object_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION IsQuotaInUse (v_quota_id UUID) >RETURNS boolean STABLE AS $BODY$ > >DECLARE result boolean := FALSE; > >BEGIN > IF EXISTS ( > SELECT quota_id > FROM image_storage_domain_map > WHERE quota_id = v_quota_id > > UNION > > SELECT quota_id > FROM vm_static > WHERE quota_id = v_quota_id > ) THEN result := TRUE; > END IF; > RETURN result; >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,355+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/repo_files_meta_data_sp.sql... >2019-02-26 17:06:41,357+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/repo_files_meta_data_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertRepo_domain_file_meta_data ( > v_repo_domain_id UUID, > v_repo_image_id VARCHAR(256), > v_repo_image_name VARCHAR(256), > v_size BIGINT, > v_date_created TIMESTAMP WITH TIME ZONE, > v_last_refreshed BIGINT, > v_file_type INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO repo_file_meta_data ( > repo_domain_id, > repo_image_id, > repo_image_name, > size, > date_created, > last_refreshed, > file_type > ) > VALUES ( > v_repo_domain_id, > v_repo_image_id, > v_repo_image_name, > v_size, > v_date_created, > v_last_refreshed, > v_file_type > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteRepo_domain_file_list ( > v_storage_domain_id UUID, > v_file_type INT DEFAULT NULL > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM repo_file_meta_data > WHERE repo_domain_id = v_storage_domain_id > AND ( > v_file_type IS NULL > OR file_type = v_file_type > ); > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetRepo_files_by_storage_domain ( > v_storage_domain_id UUID, > v_file_type INT DEFAULT NULL > ) >RETURNS SETOF repo_file_meta_data STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT repo_file_meta_data.* > FROM repo_file_meta_data > WHERE repo_domain_id = v_storage_domain_id > AND ( > v_file_type IS NULL > OR repo_file_meta_data.file_type = v_file_type > ) > ORDER BY repo_file_meta_data.last_refreshed; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,373+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/snapshots_sp.sql... >2019-02-26 17:06:41,376+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/snapshots_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertSnapshot ( > v_snapshot_id UUID, > v_vm_id UUID, > v_snapshot_type VARCHAR(32), > v_status VARCHAR(32), > v_description VARCHAR(4000), > v_creation_date TIMESTAMP WITH TIME ZONE, > v_app_list TEXT, > v_vm_configuration TEXT, > v_memory_dump_disk_id UUID, > v_memory_metadata_disk_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO snapshots ( > snapshot_id, > status, > vm_id, > snapshot_type, > description, > creation_date, > app_list, > vm_configuration, > memory_dump_disk_id, > memory_metadata_disk_id > ) > VALUES( > v_snapshot_id, > v_status, > v_vm_id, > v_snapshot_type, > v_description, > v_creation_date, > v_app_list, > v_vm_configuration, > v_memory_dump_disk_id, > v_memory_metadata_disk_id > ); >END; $PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateSnapshot ( > v_snapshot_id UUID, > v_vm_id UUID, > v_snapshot_type VARCHAR(32), > v_status VARCHAR(32), > v_description VARCHAR(4000), > v_creation_date TIMESTAMP WITH TIME ZONE, > v_app_list TEXT, > v_vm_configuration TEXT, > v_memory_dump_disk_id UUID, > v_memory_metadata_disk_id UUID, > v_vm_configuration_broken BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE snapshots > SET status = v_status, > vm_id = v_vm_id, > snapshot_type = v_snapshot_type, > description = v_description, > creation_date = v_creation_date, > app_list = v_app_list, > vm_configuration = v_vm_configuration, > memory_dump_disk_id = v_memory_dump_disk_id, > memory_metadata_disk_id = v_memory_metadata_disk_id, > vm_configuration_broken = v_vm_configuration_broken, > _update_date = NOW() > WHERE snapshot_id = v_snapshot_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateSnapshotStatus ( > v_snapshot_id UUID, > v_status VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE snapshots > SET status = v_status > WHERE snapshot_id = v_snapshot_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateSnapshotId ( > v_snapshot_id UUID, > v_new_snapshot_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE snapshots > SET snapshot_id = v_new_snapshot_id > WHERE snapshot_id = v_snapshot_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteSnapshot (v_snapshot_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM snapshots > WHERE snapshot_id = v_snapshot_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromSnapshots () >RETURNS SETOF snapshots STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM snapshots; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllSnapshotsByStorageDomainId (v_storage_id UUID) >RETURNS SETOF snapshots STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT snapshots.* > FROM snapshots > INNER JOIN images > ON snapshots.snapshot_id = images.vm_snapshot_id > INNER JOIN image_storage_domain_map > ON image_storage_domain_map.storage_domain_id = v_storage_id > AND image_storage_domain_map.image_id = images.image_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetSnapshotByVmIdAndType ( > v_vm_id UUID, > v_snapshot_type VARCHAR(32), > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF snapshots STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM snapshots > WHERE vm_id = v_vm_id > AND snapshot_type = v_snapshot_type > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vm_id > ) > ) > ORDER BY creation_date ASC LIMIT 1; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetSnapshotByVmIdAndTypeAndStatus ( > v_vm_id UUID, > v_snapshot_type VARCHAR(32), > v_status VARCHAR(32) > ) >RETURNS SETOF snapshots STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM snapshots > WHERE vm_id = v_vm_id > AND snapshot_type = v_snapshot_type > AND status = v_status > ORDER BY creation_date ASC LIMIT 1; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetSnapshotByVmIdAndStatus ( > v_vm_id UUID, > v_status VARCHAR(32) > ) >RETURNS SETOF snapshots STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM snapshots > WHERE vm_id = v_vm_id > AND status = v_status > ORDER BY creation_date ASC LIMIT 1; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS GetAllFromSnapshotsByVmId_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE GetAllFromSnapshotsByVmId_rs AS ( > snapshot_id UUID, > vm_id UUID, > snapshot_type VARCHAR(32), > status VARCHAR(32), > description VARCHAR(4000), > creation_date TIMESTAMP WITH TIME ZONE, > app_list TEXT, > memory_dump_disk_id UUID, > memory_metadata_disk_id UUID, > vm_configuration TEXT, > vm_configuration_available BOOLEAN, > vm_configuration_broken BOOLEAN > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromSnapshotsByVmId ( > v_vm_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN, > v_fill_configuration BOOLEAN > ) >RETURNS SETOF GetAllFromSnapshotsByVmId_rs STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT snapshot_id, > vm_id, > snapshot_type, > status, > description, > creation_date, > app_list, > memory_dump_disk_id, > memory_metadata_disk_id, > CASE > WHEN v_fill_configuration = TRUE > THEN vm_configuration > ELSE NULL > END, > vm_configuration IS NOT NULL > AND LENGTH(vm_configuration) > 0, > vm_configuration_broken > FROM snapshots > WHERE vm_id = v_vm_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vm_id > ) > ) > ORDER BY creation_date ASC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetSnapshotBySnapshotId ( > v_snapshot_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF snapshots STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM snapshots > WHERE snapshot_id = v_snapshot_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id > AND entity_id = ( > SELECT vm_id > FROM snapshots > WHERE snapshot_id = v_snapshot_id > ) > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetSnapshotIdsByVmIdAndType ( > v_vm_id UUID, > v_snapshot_type VARCHAR(32) > ) >RETURNS SETOF idUuidType STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT snapshot_id > FROM snapshots > WHERE vm_id = v_vm_id > AND snapshot_type = v_snapshot_type > ORDER BY creation_date ASC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetSnapshotIdsByVmIdAndTypeAndStatus ( > v_vm_id UUID, > v_snapshot_type VARCHAR(32), > v_status VARCHAR(32) > ) >RETURNS SETOF idUuidType STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT snapshot_id > FROM snapshots > WHERE vm_id = v_vm_id > AND snapshot_type = v_snapshot_type > AND status = v_status > ORDER BY creation_date ASC; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION CheckIfSnapshotExistsByVmIdAndType ( > v_vm_id UUID, > v_snapshot_type VARCHAR(32) > ) >RETURNS SETOF booleanResultType STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT EXISTS ( > SELECT * > FROM snapshots > WHERE vm_id = v_vm_id > AND snapshot_type = v_snapshot_type > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION CheckIfSnapshotExistsByVmIdAndStatus ( > v_vm_id UUID, > v_status VARCHAR(32) > ) >RETURNS SETOF booleanResultType STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT EXISTS ( > SELECT * > FROM snapshots > WHERE vm_id = v_vm_id > AND status = v_status > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION CheckIfSnapshotExistsByVmIdAndSnapshotId ( > v_vm_id UUID, > v_snapshot_id UUID > ) >RETURNS SETOF booleanResultType STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT EXISTS ( > SELECT * > FROM snapshots > WHERE vm_id = v_vm_id > AND snapshot_id = v_snapshot_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNumOfSnapshotsByMemoryVolume(v_memory_disk_ids UUID[]) >RETURNS SETOF BIGINT STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT COUNT(*) > FROM snapshots > WHERE memory_dump_disk_id = ANY(v_memory_disk_ids) > OR memory_metadata_disk_id = ANY(v_memory_disk_ids); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateMemory ( > v_memory_dump_disk_id UUID, > v_memory_metadata_disk_id UUID, > v_vm_id UUID, > v_snapshot_type VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE snapshots > SET memory_dump_disk_id = v_memory_dump_disk_id, > memory_metadata_disk_id = v_memory_metadata_disk_id > WHERE vm_id = v_vm_id > AND snapshot_type = v_snapshot_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveMemoryFromSnapshotByVmIdAndType ( > v_vm_id UUID, > v_snapshot_type VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE snapshots > SET memory_dump_disk_id = NULL, > memory_metadata_disk_id = NULL > WHERE vm_id = v_vm_id > AND snapshot_type = v_snapshot_type; >END; $PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveMemoryFromSnapshotBySnapshotId (v_snapshot_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE snapshots > SET memory_dump_disk_id = NULL, > memory_metadata_disk_id = NULL > WHERE snapshot_id = v_snapshot_id; >END; $PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllSnapshotsByMemoryDisk(v_memory_disk_id UUID) >RETURNS SETOF snapshots STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM snapshots > WHERE v_memory_disk_id IN (memory_dump_disk_id, memory_metadata_disk_id); >END; $PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,404+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/sso_clients_sp.sql... >2019-02-26 17:06:41,406+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/sso_clients_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION sso_oauth_register_client ( > v_client_id VARCHAR(128), > v_client_secret VARCHAR(1024), > v_scope VARCHAR(1024), > v_certificate_location VARCHAR(1024) DEFAULT NULL, > v_callback_prefix VARCHAR(1024) DEFAULT NULL, > v_description TEXT DEFAULT 'oVirt Engine', > v_email VARCHAR(256) DEFAULT '', > v_trusted BOOLEAN DEFAULT TRUE, > v_notification_callback VARCHAR(1024) DEFAULT NULL, > v_notification_callback_protocol VARCHAR(32) DEFAULT 'TLSv1', > v_notification_callback_verify_host BOOLEAN DEFAULT TRUE, > v_notification_callback_verify_chain BOOLEAN DEFAULT TRUE > ) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > -- Adding the sso client > INSERT INTO sso_clients ( > client_id, > client_secret, > scope, > certificate_location, > callback_prefix, > description, > email, > trusted, > notification_callback, > notification_callback_protocol, > notification_callback_verify_host, > notification_callback_verify_chain > ) > VALUES ( > v_client_id, > v_client_secret, > v_scope, > v_certificate_location, > v_callback_prefix, > v_description, > v_email, > v_trusted, > v_notification_callback, > v_notification_callback_protocol, > v_notification_callback_verify_host, > v_notification_callback_verify_chain > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION sso_oauth_unregister_client (v_client_id VARCHAR(128)) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > -- Removing the sso client > DELETE > FROM sso_clients > WHERE client_id = v_client_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION sso_oauth_client_exists (v_client_id VARCHAR(128)) >RETURNS SETOF INT IMMUTABLE AS $PROCEDURE$ > >BEGIN > IF EXISTS ( > SELECT 1 > FROM sso_clients > WHERE client_id = v_client_id > ) THEN > RETURN QUERY > SELECT 1; > ELSE > > RETURN QUERY > SELECT 0; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION get_oauth_client (v_client_id VARCHAR(128)) >RETURNS SETOF sso_clients STABLE AS $PROCEDURE$ > >BEGIN > RETURN QUERY > > SELECT * > FROM sso_clients > WHERE client_id = v_client_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION update_oauth_client ( > v_client_id VARCHAR(128), > v_scope VARCHAR(1024), > v_certificate_location VARCHAR(1024) DEFAULT NULL, > v_callback_prefix VARCHAR(1024) DEFAULT NULL, > v_description TEXT DEFAULT 'oVirt Engine', > v_email VARCHAR(256) DEFAULT '', > v_trusted BOOLEAN DEFAULT TRUE, > v_notification_callback VARCHAR(1024) DEFAULT NULL > ) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > UPDATE sso_clients > SET scope = v_scope, > certificate_location = v_certificate_location, > callback_prefix = v_callback_prefix, > description = v_description, > email = v_email, > trusted = v_trusted, > notification_callback = v_notification_callback > WHERE client_id = v_client_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION update_oauth_client_callback_prefix ( > v_client_id VARCHAR(128), > v_callback_prefix VARCHAR(1024) DEFAULT NULL > ) >RETURNS VOID AS $PROCEDURE$ > >BEGIN > UPDATE sso_clients > SET callback_prefix = v_callback_prefix > WHERE client_id = v_client_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,426+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/storage_device_sp.sql... >2019-02-26 17:06:41,429+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/storage_device_sp.sql >********* QUERY ********** >/* ---------------------------------------------------------------- > Stored procedures for database operations on Storage Device > related table: storage_device >----------------------------------------------------------------*/ >CREATE OR REPLACE FUNCTION InsertStorageDevice ( > v_id UUID, > v_name TEXT, > v_device_uuid VARCHAR(38), > v_filesystem_uuid VARCHAR(38), > v_vds_id UUID, > v_description TEXT, > v_device_type VARCHAR(50), > v_device_path TEXT, > v_filesystem_type VARCHAR(50), > v_mount_point TEXT, > v_size BIGINT, > v_is_free BOOLEAN, > v_is_gluster_brick BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO storage_device ( > id, > name, > device_uuid, > filesystem_uuid, > vds_id, > description, > device_type, > device_path, > filesystem_type, > mount_point, > size, > is_free, > is_gluster_brick > ) > VALUES ( > v_id, > v_name, > v_device_uuid, > v_filesystem_uuid, > v_vds_id, > v_description, > v_device_type, > v_device_path, > v_filesystem_type, > v_mount_point, > v_size, > v_is_free, > v_is_gluster_brick > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStorageDevice ( > v_id UUID, > v_name TEXT, > v_device_uuid VARCHAR(38), > v_filesystem_uuid VARCHAR(38), > v_description TEXT, > v_device_type VARCHAR(50), > v_device_path TEXT, > v_filesystem_type VARCHAR(50), > v_mount_point TEXT, > v_size BIGINT, > v_is_free BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE storage_device > SET name = v_name, > device_uuid = v_device_uuid, > filesystem_uuid = v_filesystem_uuid, > description = v_description, > device_type = v_device_type, > device_path = v_device_path, > filesystem_type = v_filesystem_type, > mount_point = v_mount_point, > size = v_size, > is_free = v_is_free, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageDeviceById (v_id UUID) >RETURNS SETOF storage_device STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_device > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageDevicesByVdsId (v_vds_id UUID) >RETURNS SETOF storage_device STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_device > WHERE vds_id = v_vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteStorageDeviceById (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM storage_device > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateIsFreeFlagById ( > v_id UUID, > v_is_free BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE storage_device > SET is_free = v_is_free, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,451+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/storage_domain_dr_sp.sql... >2019-02-26 17:06:41,454+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/storage_domain_dr_sp.sql >********* QUERY ********** >/*-------------------------------------------------------------- >Stored procedures for database operations on storage_domain_dr table >--------------------------------------------------------------*/ >CREATE OR REPLACE FUNCTION InsertStorageDomainDR ( > v_storage_domain_id UUID, > v_georep_session_id UUID, > v_sync_schedule VARCHAR(256), > v_qrtz_job_id VARCHAR(256) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO storage_domain_dr ( > storage_domain_id, > georep_session_id, > sync_schedule, > qrtz_job_id > ) > VALUES ( > v_storage_domain_id, > v_georep_session_id, > v_sync_schedule, > v_qrtz_job_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStorageDomainDR ( > v_storage_domain_id UUID, > v_georep_session_id UUID, > v_sync_schedule VARCHAR(256), > v_qrtz_job_id VARCHAR(256) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE storage_domain_dr > set sync_schedule = v_sync_schedule, > qrtz_job_id = v_qrtz_job_id > WHERE storage_domain_id = v_storage_domain_id > AND georep_session_id = v_georep_session_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageDomainDR ( > v_storage_domain_id UUID, > v_georep_session_id UUID > ) >RETURNS SETOF storage_domain_dr STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM storage_domain_dr > WHERE storage_domain_id = v_storage_domain_id > AND georep_session_id = v_georep_session_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageDomainDRList ( > v_storage_domain_id UUID > ) >RETURNS SETOF storage_domain_dr STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM storage_domain_dr > WHERE storage_domain_id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageDomainDRWithGeoRep ( > v_georep_session_id UUID > ) >RETURNS SETOF storage_domain_dr STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM storage_domain_dr > WHERE georep_session_id = v_georep_session_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteStorageDomainDR ( > v_storage_domain_id UUID, > v_georep_session_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM storage_domain_dr > WHERE storage_domain_id = v_storage_domain_id > AND georep_session_id = v_georep_session_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,476+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/storages_san_sp.sql... >2019-02-26 17:06:41,479+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/storages_san_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertLUNs ( > v_LUN_id VARCHAR(255), > v_physical_volume_id VARCHAR(50), > v_volume_group_id VARCHAR(50), > v_serial VARCHAR(4000), > v_lun_mapping INT, > v_vendor_id VARCHAR(50), > v_product_id VARCHAR(50), > v_device_size INT, > v_discard_max_size BIGINT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO LUNs ( > LUN_id, > physical_volume_id, > volume_group_id, > serial, > lun_mapping, > vendor_id, > product_id, > device_size, > discard_max_size > ) > VALUES ( > v_LUN_id, > v_physical_volume_id, > v_volume_group_id, > v_serial, > v_lun_mapping, > v_vendor_id, > v_product_id, > v_device_size, > v_discard_max_size > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateLUNs ( > v_LUN_id VARCHAR(255), > v_physical_volume_id VARCHAR(50), > v_volume_group_id VARCHAR(50), > v_serial VARCHAR(4000), > v_lun_mapping INT, > v_vendor_id VARCHAR(50), > v_product_id VARCHAR(50), > v_device_size INT, > v_discard_max_size BIGINT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE LUNs > SET LUN_id = v_LUN_id, > physical_volume_id = v_physical_volume_id, > volume_group_id = v_volume_group_id, > serial = v_serial, > lun_mapping = v_lun_mapping, > vendor_id = v_vendor_id, > product_id = v_product_id, > device_size = v_device_size, > discard_max_size = v_discard_max_size > WHERE LUN_id = v_LUN_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteLUN (v_LUN_id VARCHAR(255)) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM LUNs > WHERE LUN_id = v_LUN_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromLUNs () >RETURNS SETOF luns_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM luns_view; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLUNsBystorage_server_connection (v_storage_server_connection VARCHAR(50)) >RETURNS SETOF luns_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT luns_view.* > FROM luns_view > INNER JOIN LUN_storage_server_connection_map > ON LUN_storage_server_connection_map.LUN_id = luns_view.LUN_id > WHERE LUN_storage_server_connection_map.storage_server_connection = v_storage_server_connection; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLUNsByVolumeGroupId (v_volume_group_id VARCHAR(50)) >RETURNS SETOF luns_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM luns_view > WHERE volume_group_id = v_volume_group_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLUNByLUNId (v_LUN_id VARCHAR(255)) >RETURNS SETOF luns_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM luns_view > WHERE LUN_id = v_LUN_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertstorage_domain_dynamic ( > v_available_disk_size INT, > v_id UUID, > v_used_disk_size INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO storage_domain_dynamic ( > available_disk_size, > id, > used_disk_size > ) > VALUES ( > v_available_disk_size, > v_id, > v_used_disk_size > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatestorage_domain_dynamic ( > v_available_disk_size INT, > v_id UUID, > v_used_disk_size INT > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE storage_domain_dynamic > SET available_disk_size = v_available_disk_size, > used_disk_size = v_used_disk_size, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStorageDomainConfirmedSize ( > v_confirmed_available_disk_size INT, > v_vdo_savings INT, > v_id UUID > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE storage_domain_dynamic > SET confirmed_available_disk_size = v_confirmed_available_disk_size, > vdo_savings = v_vdo_savings, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStorageDomainExternalStatus ( > v_storage_id UUID, > v_external_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE storage_domain_dynamic > SET external_status = v_external_status > WHERE id = v_storage_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletestorage_domain_dynamic (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM storage_domain_dynamic > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromstorage_domain_dynamic () >RETURNS SETOF storage_domain_dynamic STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domain_dynamic; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domain_dynamicByid (v_id UUID) >RETURNS SETOF storage_domain_dynamic STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domain_dynamic > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertstorage_pool_iso_map ( > v_storage_id UUID, > v_storage_pool_id UUID, > v_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO storage_pool_iso_map ( > storage_id, > storage_pool_id, > status > ) > VALUES ( > v_storage_id, > v_storage_pool_id, > v_status > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletestorage_pool_iso_map ( > v_storage_id UUID, > v_storage_pool_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM storage_pool_iso_map > WHERE storage_id = v_storage_id > AND storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromstorage_pool_iso_map () >RETURNS SETOF storage_pool_iso_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_pool_iso_map; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_pool_iso_mapBystorage_idAndBystorage_pool_id ( > v_storage_id UUID, > v_storage_pool_id UUID > ) >RETURNS SETOF storage_pool_iso_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_pool_iso_map > WHERE storage_id = v_storage_id > AND storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_pool_iso_mapsBystorage_id (v_storage_id UUID) >RETURNS SETOF storage_pool_iso_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_pool_iso_map > WHERE storage_id = v_storage_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_pool_iso_mapsByBystorage_pool_id ( > v_storage_id UUID, > v_storage_pool_id UUID > ) >RETURNS SETOF storage_pool_iso_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT storage_pool_iso_map.* > FROM storage_pool_iso_map > INNER JOIN storage_domain_static > ON storage_pool_iso_map.storage_id = storage_domain_static.id > WHERE storage_pool_id = v_storage_pool_id > AND storage_domain_static.storage_type != 9 > AND storage_domain_static.storage_type != 10; -- filter Cinder and Managed block storage domains >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatestorage_pool_iso_map_status ( > v_storage_id UUID, > v_storage_pool_id UUID, > v_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE storage_pool_iso_map > SET status = v_status > WHERE storage_pool_id = v_storage_pool_id > AND storage_id = v_storage_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertstorage_server_connections ( > v_connection VARCHAR(250), > v_id VARCHAR(50), > v_iqn VARCHAR(128), > v_port VARCHAR(50), > v_portal VARCHAR(50), > v_password TEXT, > v_storage_type INT, > v_user_name TEXT, > v_mount_options VARCHAR(500), > v_vfs_type VARCHAR(128), > v_nfs_version VARCHAR(4), > v_nfs_timeo SMALLINT, > v_nfs_retrans SMALLINT, > v_gluster_volume_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO storage_server_connections ( > connection, > id, > iqn, > port, > portal, > password, > storage_type, > user_name, > mount_options, > vfs_type, > nfs_version, > nfs_timeo, > nfs_retrans, > gluster_volume_id > ) > VALUES ( > v_connection, > v_id, > v_iqn, > v_port, > v_portal, > v_password, > v_storage_type, > v_user_name, > v_mount_options, > v_vfs_type, > v_nfs_version, > v_nfs_timeo, > v_nfs_retrans, > v_gluster_volume_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatestorage_server_connections ( > v_connection VARCHAR(250), > v_id VARCHAR(50), > v_iqn VARCHAR(128), > v_password TEXT, > v_storage_type INT, > v_port VARCHAR(50), > v_portal VARCHAR(50), > v_user_name TEXT, > v_mount_options VARCHAR(500), > v_vfs_type VARCHAR(128), > v_nfs_version VARCHAR(4), > v_nfs_timeo SMALLINT, > v_nfs_retrans SMALLINT, > v_gluster_volume_id UUID > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE storage_server_connections > SET connection = v_connection, > iqn = v_iqn, > password = v_password, > port = v_port, > portal = v_portal, > storage_type = v_storage_type, > user_name = v_user_name, > mount_options = v_mount_options, > vfs_type = v_vfs_type, > nfs_version = v_nfs_version, > nfs_timeo = v_nfs_timeo, > nfs_retrans = v_nfs_retrans, > gluster_volume_id = v_gluster_volume_id > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletestorage_server_connections (v_id VARCHAR(50)) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val VARCHAR(50); > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT id > INTO v_val > FROM storage_server_connections > WHERE id = v_id > FOR UPDATE; > > DELETE > FROM storage_server_connections > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_server_connectionsByid (v_id VARCHAR(50)) >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connections > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_server_connectionsByConnection (v_connection VARCHAR(250)) >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connections > WHERE connection = v_connection; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_server_connectionsByIqn (v_iqn VARCHAR(128)) >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connections > WHERE iqn = v_iqn > OR iqn IS NULL > AND v_iqn IS NULL; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_server_connectionsByIqnAndConnection ( > v_iqn VARCHAR(128), > v_connection VARCHAR(250) > ) >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connections > WHERE iqn = v_iqn > AND ( > connection = v_connection > OR connection IS NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_server_connectionsByKey ( > v_iqn VARCHAR(128), > v_connection VARCHAR(250), > v_port VARCHAR(50), > v_portal VARCHAR(50), > v_username VARCHAR(50) > ) >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connections > WHERE ( > iqn = v_iqn > OR ( > iqn IS NULL > AND v_iqn IS NULL > ) > ) > AND (connection = v_connection) > AND ( > port = v_port > OR ( > port IS NULL > AND v_port IS NULL > ) > ) > AND ( > portal = v_portal > OR ( > portal IS NULL > AND v_portal IS NULL > ) > ) > AND ( > user_name = v_username > OR ( > user_name IS NULL > AND v_username IS NULL > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_server_connectionsByStorageType (v_storage_type INT) >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connections > WHERE storage_type = v_storage_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllstorage_server_connections () >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connections; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageServerConnectionsByIds (v_ids TEXT) >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connections > WHERE id = ANY (string_to_array(v_ids, ',')::VARCHAR []); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_server_connectionsByVolumeGroupId (v_volume_group_id VARCHAR(50)) >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT storage_server_connections.* > FROM LUN_storage_server_connection_map LUN_storage_server_connection_map > INNER JOIN LUNs > ON LUN_storage_server_connection_map.LUN_id = LUNs.LUN_id > INNER JOIN storage_domain_static > ON LUNs.volume_group_id = storage_domain_static.storage > INNER JOIN storage_server_connections > ON LUN_storage_server_connection_map.storage_server_connection = storage_server_connections.id > WHERE (storage_domain_static.storage = v_volume_group_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageConnectionsByStorageTypeAndStatus ( > v_storage_pool_id UUID, > v_storage_type INT, > v_statuses VARCHAR(20) > ) >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >DECLARE statuses INT []; > >BEGIN > statuses := string_to_array(v_statuses, ',')::INT []; > > RETURN QUERY > > SELECT * > FROM storage_server_connections > WHERE ( > v_storage_type IS NULL > OR storage_server_connections.storage_type = v_storage_type > ) > AND ( > id IN ( > SELECT storage > FROM storage_domains > WHERE storage_domains.storage_pool_id = v_storage_pool_id > AND storage_domains.status = ANY (statuses) > ) > OR ( > id IN ( > SELECT lun_storage_server_connection_map.storage_server_connection > FROM lun_storage_server_connection_map > INNER JOIN luns > ON lun_storage_server_connection_map.lun_id = luns.lun_id > INNER JOIN storage_domains > ON luns.volume_group_id = storage_domains.storage > WHERE ( > storage_domains.storage_pool_id = v_storage_pool_id > AND storage_domains.status = ANY (statuses) > ) > ) > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_server_connectionsByLunId (v_lunId VARCHAR(50)) >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT storage_server_connections.* > FROM storage_server_connections storage_server_connections > INNER JOIN lun_storage_server_connection_map > ON lun_storage_server_connection_map.storage_server_connection = storage_server_connections.id > WHERE (lun_storage_server_connection_map.lun_id = v_lunId); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertLUN_storage_server_connection_map ( > v_LUN_id VARCHAR(255), > v_storage_server_connection VARCHAR(50) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO LUN_storage_server_connection_map ( > LUN_id, > storage_server_connection > ) > VALUES ( > v_LUN_id, > v_storage_server_connection > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateLUN_storage_server_connection_map ( > v_LUN_id VARCHAR(255), > v_storage_server_connection VARCHAR(50) > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteLUN_storage_server_connection_map ( > v_LUN_id VARCHAR(255), > v_storage_server_connection VARCHAR(50) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM LUN_storage_server_connection_map > WHERE LUN_id = v_LUN_id > AND storage_server_connection = v_storage_server_connection; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromLUN_storage_server_connection_map () >RETURNS SETOF LUN_storage_server_connection_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM LUN_storage_server_connection_map lUN_storage_server_connection_map; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLUN_storage_server_connection_mapByLUN ( > v_LUN_id VARCHAR(255) > ) >RETURNS SETOF LUN_storage_server_connection_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM LUN_storage_server_connection_map lUN_storage_server_connection_map > WHERE LUN_id = v_LUN_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetLUN_storage_server_connection_mapByLUNBystorage_server_conn ( > v_LUN_id VARCHAR(255), > v_storage_server_connection VARCHAR(50) > ) >RETURNS SETOF LUN_storage_server_connection_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM LUN_storage_server_connection_map lUN_storage_server_connection_map > WHERE LUN_id = v_LUN_id > AND storage_server_connection = v_storage_server_connection; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertStorageServerConnectionExtension ( > v_id UUID, > v_vds_id UUID, > v_iqn VARCHAR(128), > v_user_name TEXT, > v_password TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO storage_server_connection_extension ( > id, > vds_id, > iqn, > user_name, > password > ) > VALUES ( > v_id, > v_vds_id, > v_iqn, > v_user_name, > v_password > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStorageServerConnectionExtension ( > v_id UUID, > v_vds_id UUID, > v_iqn VARCHAR(128), > v_user_name TEXT, > v_password TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE storage_server_connection_extension > SET vds_id = v_vds_id, > iqn = v_iqn, > user_name = v_user_name, > password = v_password > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteStorageServerConnectionExtension (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM storage_server_connection_extension > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageServerConnectionExtensionById (v_id UUID) >RETURNS SETOF storage_server_connection_extension STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connection_extension > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageServerConnectionExtensionsByHostId (v_vds_id UUID) >RETURNS SETOF storage_server_connection_extension STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connection_extension > WHERE vds_id = v_vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageServerConnectionExtensionsByHostIdAndTarget ( > v_vds_id UUID, > v_iqn VARCHAR(128) > ) >RETURNS SETOF storage_server_connection_extension STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connection_extension > WHERE vds_id = v_vds_id > AND iqn = v_iqn; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromStorageServerConnectionExtensions () >RETURNS SETOF storage_server_connection_extension STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connection_extension; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,527+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/storages_sp.sql... >2019-02-26 17:06:41,530+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/storages_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertstorage_pool ( > v_description VARCHAR(4000), > v_free_text_comment TEXT, > v_id UUID, > v_name VARCHAR(40), > v_status INT, > v_is_local BOOLEAN, > v_master_domain_version INT, > v_spm_vds_id UUID, > v_compatibility_version VARCHAR(40), > v_quota_enforcement_type INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO storage_pool ( > description, > free_text_comment, > id, > name, > status, > is_local, > master_domain_version, > spm_vds_id, > compatibility_version, > quota_enforcement_type > ) > VALUES ( > v_description, > v_free_text_comment, > v_id, > v_name, > v_status, > v_is_local, > v_master_domain_version, > v_spm_vds_id, > v_compatibility_version, > v_quota_enforcement_type > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatestorage_pool ( > v_description VARCHAR(4000), > v_free_text_comment TEXT, > v_id UUID, > v_name VARCHAR(40), > v_status INT, > v_is_local BOOLEAN, > v_storage_pool_format_type VARCHAR(50), > v_master_domain_version INT, > v_spm_vds_id UUID, > v_compatibility_version VARCHAR(40), > v_quota_enforcement_type INT > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE storage_pool > SET description = v_description, > free_text_comment = v_free_text_comment, > name = v_name, > is_local = v_is_local, > status = v_status, > storage_pool_format_type = v_storage_pool_format_type, > master_domain_version = v_master_domain_version, > spm_vds_id = v_spm_vds_id, > compatibility_version = v_compatibility_version, > _update_date = LOCALTIMESTAMP, > quota_enforcement_type = v_quota_enforcement_type > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatestorage_pool_partial ( > v_description VARCHAR(4000), > v_free_text_comment TEXT, > v_id UUID, > v_name VARCHAR(40), > v_is_local BOOLEAN, > v_storage_pool_format_type VARCHAR(50), > v_compatibility_version VARCHAR(40), > v_quota_enforcement_type INT > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE storage_pool > SET description = v_description, > free_text_comment = v_free_text_comment, > name = v_name, > is_local = v_is_local, > storage_pool_format_type = v_storage_pool_format_type, > compatibility_version = v_compatibility_version, > _update_date = LOCALTIMESTAMP, > quota_enforcement_type = v_quota_enforcement_type > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatestorage_pool_status ( > v_id UUID, > v_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE storage_pool > SET status = v_status, > _update_date = LOCALTIMESTAMP > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION IncreaseStoragePoolMasterVersion (v_id UUID) >RETURNS INT AS $PROCEDURE$ >DECLARE v_master_domain_version INT; > >BEGIN > UPDATE storage_pool > SET master_domain_version = master_domain_version + 1 > WHERE id = v_id RETURNING master_domain_version > INTO v_master_domain_version; > > RETURN v_master_domain_version; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletestorage_pool (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > SELECT vm_guid > INTO v_val > FROM vm_static > WHERE vm_guid IN ( > SELECT vm_guid > FROM vms > WHERE storage_pool_id = v_id > ) > FOR > > UPDATE; > > DELETE > FROM snapshots > WHERE vm_id IN ( > SELECT vm_guid > FROM vms > WHERE storage_pool_id = v_id > ); > > DELETE > FROM vm_static > WHERE vm_guid IN ( > SELECT vm_guid > FROM vms > WHERE storage_pool_id = v_id > ); > > -- Delete vm pools as empty pools are not supported > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > SELECT vm_pool_id > INTO v_val > FROM vm_pools > WHERE vm_pool_id IN ( > SELECT vm_pool_id > FROM vm_pools_view > WHERE storage_pool_id = v_id > ) > FOR > > UPDATE; > > DELETE > FROM vm_pools > WHERE vm_pool_id IN ( > SELECT vm_pool_id > FROM vm_pools_view > WHERE storage_pool_id = v_id > ); > > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT id > INTO v_val > FROM storage_pool > WHERE id = v_id > FOR > > UPDATE; > > DELETE > FROM storage_pool > WHERE id = v_id; > > -- delete StoragePool permissions -- > PERFORM DeletePermissionsByEntityId(v_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromstorage_pool ( > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF storage_pool STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_pool > WHERE ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_storage_pool_permissions_view > WHERE user_id = v_user_id > AND entity_id = id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllByStatus (v_status INT) >RETURNS SETOF storage_pool STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_pool > WHERE status = v_status; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_poolByid ( > v_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF storage_pool STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_pool > WHERE id = v_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_storage_pool_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_poolByName ( > v_name VARCHAR(40), > v_is_case_sensitive BOOLEAN > ) >RETURNS SETOF storage_pool STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_pool > WHERE name = v_name > OR ( > NOT v_is_case_sensitive > AND name ilike v_name > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_poolsByStorageDomainId (v_storage_domain_id UUID) >RETURNS SETOF storage_pool STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT storage_pool.* > FROM storage_pool > INNER JOIN storage_pool_iso_map > ON storage_pool.id = storage_pool_iso_map.storage_pool_id > WHERE storage_pool_iso_map.storage_id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmAndTemplatesIdsByStorageDomainId ( > v_storage_domain_id UUID, > v_include_shareable BOOLEAN, > v_active_only BOOLEAN > ) >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT vd.vm_id > FROM vm_device vd > INNER JOIN images_storage_domain_view i > ON i.image_group_id = vd.device_id > WHERE i.storage_id = v_storage_domain_id > AND i.active = v_active_only > AND i.shareable = v_include_shareable; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_poolsByVdsId (v_vdsId UUID) >RETURNS SETOF storage_pool STABLE AS $PROCEDURE$ >DECLARE v_clusterId UUID; > >BEGIN > SELECT cluster_id > INTO v_clusterId > FROM Vds_static > WHERE vds_id = v_vdsId; > > RETURN QUERY > > SELECT * > FROM storage_pool > WHERE storage_pool.id IN ( > SELECT storage_pool_id > FROM cluster > WHERE cluster_id = v_clusterId > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_poolsByClusterId (v_clusterId UUID) >RETURNS SETOF storage_pool STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_pool > WHERE storage_pool.id IN ( > SELECT storage_pool_id > FROM cluster > WHERE cluster_id = v_clusterId > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION LoadStorageDomainInfoByDomainId (v_storage_domain_id UUID) >RETURNS SETOF storage_domains_ovf_info STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains_ovf_info ovf > WHERE ovf.storage_domain_id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION LoadStorageDomainInfoByDiskId (v_disk_id UUID) >RETURNS SETOF storage_domains_ovf_info STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains_ovf_info ovf > WHERE ovf.ovf_disk_id = v_disk_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertStorageDomainOvfInfo ( > v_storage_domain_id UUID, > v_status INT, > v_ovf_disk_id UUID, > v_stored_ovfs_ids TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO storage_domains_ovf_info ( > storage_domain_id, > status, > ovf_disk_id, > stored_ovfs_ids > ) > VALUES ( > v_storage_domain_id, > v_status, > v_ovf_disk_id, > v_stored_ovfs_ids > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION LoadStorageDomainsForOvfIds (v_ovfs_ids TEXT) >RETURNS SETOF UUID AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT ovf.storage_domain_id > FROM storage_domains_ovf_info ovf > WHERE string_to_array(ovf.stored_ovfs_ids, ',') && string_to_array(v_ovfs_ids, ','); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateStorageDomainOvfInfo ( > v_storage_domain_id UUID, > v_status INT, > v_ovf_disk_id UUID, > v_stored_ovfs_ids TEXT, > v_last_updated TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE storage_domains_ovf_info > SET status = v_status, > storage_domain_id = v_storage_domain_id, > ovf_disk_id = v_ovf_disk_id, > stored_ovfs_ids = v_stored_ovfs_ids, > last_updated = v_last_updated > WHERE ovf_disk_id = v_ovf_disk_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteStorageDomainOvfInfo (v_ovf_disk_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM storage_domains_ovf_info > WHERE ovf_disk_id = v_ovf_disk_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateOvfUpdatedInfo ( > v_storage_domains_ids VARCHAR(5000), > v_status INT, > v_except_status INT > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE curs_storages_ids CURSOR >FOR >SELECT * >FROM fnSplitterUuid(v_storage_domains_ids); > >id UUID; > >BEGIN > OPEN curs_storages_ids; > > LOOP > > FETCH curs_storages_ids > INTO id; > > IF NOT FOUND THEN > EXIT; > END IF; > UPDATE storage_domains_ovf_info > SET status = v_status > WHERE storage_domain_id = id > AND status != v_except_status; > END LOOP; > > CLOSE curs_storages_ids; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertstorage_domain_static ( > v_id UUID, > v_storage VARCHAR(250), > v_storage_name VARCHAR(250), > v_storage_description VARCHAR(4000), > v_storage_comment TEXT, > v_storage_type INT, > v_storage_domain_type INT, > v_storage_domain_format_type VARCHAR(50), > v_last_time_used_as_master BIGINT, > v_wipe_after_delete BOOLEAN, > v_discard_after_delete BOOLEAN, > v_first_metadata_device VARCHAR(100), > v_vg_metadata_device VARCHAR(100), > v_warning_low_space_indicator INT, > v_critical_space_action_blocker INT, > v_warning_low_confirmed_space_indicator INT, > v_backup BOOLEAN, > v_block_size INTEGER > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO storage_domain_static ( > id, > storage, > storage_name, > storage_description, > storage_comment, > storage_type, > storage_domain_type, > storage_domain_format_type, > last_time_used_as_master, > wipe_after_delete, > discard_after_delete, > first_metadata_device, > vg_metadata_device, > warning_low_space_indicator, > critical_space_action_blocker, > warning_low_confirmed_space_indicator, > backup, > block_size > ) > VALUES ( > v_id, > v_storage, > v_storage_name, > v_storage_description, > v_storage_comment, > v_storage_type, > v_storage_domain_type, > v_storage_domain_format_type, > v_last_time_used_as_master, > v_wipe_after_delete, > v_discard_after_delete, > v_first_metadata_device, > v_vg_metadata_device, > v_warning_low_space_indicator, > v_critical_space_action_blocker, > v_warning_low_confirmed_space_indicator, > v_backup, > v_block_size > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domains_List_By_ImageId (v_image_id UUID) >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains > WHERE id IN ( > SELECT storage_domain_id > FROM image_storage_domain_map > WHERE image_id = v_image_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatestorage_domain_static ( > v_id UUID, > v_storage VARCHAR(250), > v_storage_name VARCHAR(250), > v_storage_description VARCHAR(4000), > v_storage_comment TEXT, > v_storage_type INT, > v_storage_domain_type INT, > v_storage_domain_format_type INT, > v_last_time_used_as_master BIGINT, > v_wipe_after_delete BOOLEAN, > v_discard_after_delete BOOLEAN, > v_first_metadata_device VARCHAR(100), > v_vg_metadata_device VARCHAR(100), > v_warning_low_space_indicator INT, > v_critical_space_action_blocker INT, > v_warning_low_confirmed_space_indicator INT, > v_backup BOOLEAN, > v_block_size INTEGER > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE storage_domain_static > SET storage = v_storage, > storage_name = v_storage_name, > storage_type = v_storage_type, > storage_domain_type = v_storage_domain_type, > _update_date = LOCALTIMESTAMP, > storage_domain_format_type = v_storage_domain_format_type, > last_time_used_as_master = v_last_time_used_as_master, > wipe_after_delete = v_wipe_after_delete, > discard_after_delete = v_discard_after_delete, > first_metadata_device=v_first_metadata_device, > vg_metadata_device=v_vg_metadata_device, > storage_description = v_storage_description, > storage_comment = v_storage_comment, > warning_low_space_indicator = v_warning_low_space_indicator, > critical_space_action_blocker = v_critical_space_action_blocker, > warning_low_confirmed_space_indicator = v_warning_low_confirmed_space_indicator, > backup = v_backup, > block_size = v_block_size > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletestorage_domain_static (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT id > INTO v_val > FROM storage_domain_static > WHERE id = v_id > FOR UPDATE; > > DELETE > FROM storage_domain_static > WHERE id = v_id; > > -- delete Storage permissions -- > PERFORM DeletePermissionsByEntityId(v_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromstorage_domain_static () >RETURNS SETOF storage_domain_static STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domain_static; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domain_staticByid (v_id UUID) >RETURNS SETOF storage_domain_static STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domain_static > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domain_staticByName (v_name VARCHAR(250)) >RETURNS SETOF storage_domain_static STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domain_static > WHERE storage_name = v_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domain_staticByNameFiltered ( > v_name VARCHAR(250), > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF storage_domain_static STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domain_static sds > WHERE storage_name = v_name > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_storage_domain_permissions_view > WHERE user_id = v_user_id > AND entity_id = sds.id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domain_staticBystorage_pool_id (v_storage_pool_id UUID) >RETURNS SETOF storage_domain_static STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT storage_domain_static.* > FROM storage_domain_static > INNER JOIN storage_pool_iso_map > ON storage_pool_iso_map.storage_id = storage_domain_static.id > WHERE storage_pool_iso_map.storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS GetStorageDomainIdsByStoragePoolIdAndStatus_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE GetStorageDomainIdsByStoragePoolIdAndStatus_rs AS (storage_id UUID); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageDomainIdsByStoragePoolIdAndStatus ( > v_storage_pool_id UUID, > v_status INT > ) >RETURNS SETOF GetStorageDomainIdsByStoragePoolIdAndStatus_rs STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT storage_id > FROM storage_pool_iso_map > INNER JOIN storage_domain_static > ON storage_pool_iso_map.storage_id = storage_domain_static.id > WHERE storage_pool_id = v_storage_pool_id > AND status = v_status > AND storage_domain_static.storage_type != 9 > AND storage_domain_static.storage_type != 10; -- filter Cinder and Managed block storage domains >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domains_By_id ( > v_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF storage_domains_without_storage_pools STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains_without_storage_pools > WHERE id = v_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_storage_domain_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domains_by_storage_pool_id_with_permitted_action ( > v_user_id UUID, > v_action_group_id INT, > v_storage_pool_id UUID > ) >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains > WHERE storage_pool_id = v_storage_pool_id > AND ( > SELECT get_entity_permissions(v_user_id, v_action_group_id, id, 11) > ) IS NOT NULL; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domains_By_id_and_by_storage_pool_id ( > v_id UUID, > v_storage_pool_id UUID > ) >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains > WHERE id = v_id > AND storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domains_By_storagePoolId ( > v_storage_pool_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains > WHERE storage_pool_id = v_storage_pool_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_storage_domain_permissions_view > WHERE user_id = v_user_id > AND entity_id = id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domain_by_type_storagePoolId_and_status ( > v_storage_domain_type INT, > v_storage_pool_id UUID, > v_status INT > ) >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains > WHERE storage_pool_id = v_storage_pool_id > AND storage_domain_type = v_storage_domain_type > AND ( > v_status IS NULL > OR status = v_status > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domains_By_connection (v_connection VARCHAR) >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains > WHERE storage IN ( > SELECT id > FROM storage_server_connections > WHERE connection = v_connection > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromStorageDomainsByConnectionId (v_connection_id VARCHAR) >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains > WHERE storage = v_connection_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromstorage_domains ( > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT ON (id) * > FROM storage_domains > WHERE ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_storage_domain_permissions_view > WHERE user_id = v_user_id > AND entity_id = id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Remove_Entities_From_storage_domain (v_storage_domain_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_ids UUID[]; >BEGIN > BEGIN > -- Creating a temporary table which will give all the images and the disks which resids on only the specified storage domain. (copied template disks on multiple storage domains will not be part of this table) > CREATE TEMPORARY TABLE STORAGE_DOMAIN_MAP_TABLE AS > > SELECT image_guid AS image_id, > disk_id > FROM images_storage_domain_view > WHERE storage_id = v_storage_domain_id > > EXCEPT > > SELECT image_guid AS image_id, > disk_id > FROM images_storage_domain_view > WHERE storage_id != v_storage_domain_id; > > exception when others then > > TRUNCATE TABLE STORAGE_DOMAIN_MAP_TABLE; > > INSERT INTO STORAGE_DOMAIN_MAP_TABLE > SELECT image_guid AS image_id, > disk_id > FROM images_storage_domain_view > WHERE storage_id = v_storage_domain_id > > EXCEPT > > SELECT image_guid AS image_id, > disk_id > FROM images_storage_domain_view > WHERE storage_id != v_storage_domain_id; > END; > > BEGIN > -- All the VMs/Templates which have disks both on the specified domain and other domains. > CREATE TEMPORARY TABLE ENTITY_IDS_ON_OTHER_STORAGE_DOMAINS_TEMPORARY_TABLE AS > > SELECT DISTINCT vm_static.vm_guid > FROM vm_static > INNER JOIN ( > -- Join vm_static only with VMs and Templates that have images on the storage domain v_storage_domain_id > SELECT vm_static.vm_guid > FROM vm_static > INNER JOIN vm_device vd > ON vd.vm_id = vm_static.vm_guid > INNER JOIN images i > ON i.image_group_id = vd.device_id > INNER JOIN STORAGE_DOMAIN_MAP_TABLE > ON i.image_guid = STORAGE_DOMAIN_MAP_TABLE.image_id > ) vm_guids_with_disks_on_storage_domain > ON vm_static.vm_guid = vm_guids_with_disks_on_storage_domain.vm_guid > -- With all the VMs which have images on the storage domain, get all of their images and check if there is an image on another storage domain. > INNER JOIN vm_device vd > ON vd.vm_id = vm_static.vm_guid > INNER JOIN images i > ON i.image_group_id = vd.device_id > INNER JOIN image_storage_domain_map > ON i.image_guid = image_storage_domain_map.image_id > WHERE image_storage_domain_map.storage_domain_id != v_storage_domain_id; > > exception when others then > > TRUNCATE TABLE ENTITY_IDS_ON_OTHER_STORAGE_DOMAINS_TEMPORARY_TABLE; > > INSERT INTO ENTITY_IDS_ON_OTHER_STORAGE_DOMAINS_TEMPORARY_TABLE > SELECT DISTINCT vm_static.vm_guid > FROM vm_static > INNER JOIN ( > SELECT vm_static.vm_guid > FROM vm_static > INNER JOIN vm_device vd > ON vd.vm_id = vm_static.vm_guid > INNER JOIN images i > ON i.image_group_id = vd.device_id > INNER JOIN STORAGE_DOMAIN_MAP_TABLE > ON i.image_guid = STORAGE_DOMAIN_MAP_TABLE.image_id > ) vm_guids_with_disks_on_storage_domain > ON vm_static.vm_guid = vm_guids_with_disks_on_storage_domain.vm_guid > INNER JOIN vm_device vd > ON vd.vm_id = vm_static.vm_guid > INNER JOIN images i > ON i.image_group_id = vd.device_id > INNER JOIN image_storage_domain_map > ON i.image_guid = image_storage_domain_map.image_id > WHERE image_storage_domain_map.storage_domain_id != v_storage_domain_id; > > -- Add VMs with direct luns as part of entity ids with disks on other storage domains. > INSERT INTO ENTITY_IDS_ON_OTHER_STORAGE_DOMAINS_TEMPORARY_TABLE > SELECT DISTINCT vm_static.vm_guid > FROM vm_static > INNER JOIN vm_device vd > ON vd.vm_id = vm_static.vm_guid > INNER JOIN disk_lun_map dlm > ON dlm.disk_id = vd.device_id; > END; > > BEGIN > -- Templates with any images residing on only the specified storage domain > CREATE TEMPORARY TABLE TEMPLATES_IDS_TEMPORARY_TABLE AS > > SELECT vm_device.vm_id AS vm_guid > FROM images_storage_domain_view > INNER JOIN vm_device > ON vm_device.device_id = images_storage_domain_view.disk_id > INNER JOIN STORAGE_DOMAIN_MAP_TABLE > ON STORAGE_DOMAIN_MAP_TABLE.image_id = images_storage_domain_view.image_guid > WHERE entity_type = 'TEMPLATE' > AND storage_id = v_storage_domain_id > AND vm_device.vm_id NOT IN ( > SELECT vm_guid > FROM ENTITY_IDS_ON_OTHER_STORAGE_DOMAINS_TEMPORARY_TABLE > ); > > exception when others then > > TRUNCATE TABLE TEMPLATES_IDS_TEMPORARY_TABLE; > > INSERT INTO TEMPLATES_IDS_TEMPORARY_TABLE > SELECT vm_device.vm_id AS vm_guid > FROM images_storage_domain_view > INNER JOIN vm_device > ON vm_device.device_id = images_storage_domain_view.disk_id > INNER JOIN STORAGE_DOMAIN_MAP_TABLE > ON STORAGE_DOMAIN_MAP_TABLE.image_id = images_storage_domain_view.image_guid > WHERE entity_type = 'TEMPLATE' > AND storage_id = v_storage_domain_id > AND vm_device.vm_id NOT IN ( > SELECT vm_guid > FROM ENTITY_IDS_ON_OTHER_STORAGE_DOMAINS_TEMPORARY_TABLE > ); > END; > > -- Add also Template Versions based on the selected templates > INSERT INTO TEMPLATES_IDS_TEMPORARY_TABLE > SELECT vm_guid > FROM vm_static > WHERE vmt_guid IN ( > SELECT vm_guid > FROM TEMPLATES_IDS_TEMPORARY_TABLE > ) > AND entity_type = 'TEMPLATE'; > > BEGIN > -- Vms which resides on the storage domain > CREATE TEMPORARY TABLE VM_IDS_TEMPORARY_TABLE AS > > SELECT vm_id, > vm_images_view.entity_type AS entity_type > FROM vm_images_view > INNER JOIN vm_device > ON vm_device.device_id = vm_images_view.disk_id > WHERE v_storage_domain_id IN ( > SELECT * > FROM fnsplitteruuid(storage_id) > ) > AND vm_id NOT IN ( > SELECT vm_guid > FROM ENTITY_IDS_ON_OTHER_STORAGE_DOMAINS_TEMPORARY_TABLE > ); > > exception when others then > > TRUNCATE TABLE VM_IDS_TEMPORARY_TABLE; > > INSERT INTO VM_IDS_TEMPORARY_TABLE > SELECT vm_id, > vm_images_view.entity_type AS entity_type > FROM vm_images_view > INNER JOIN vm_device > ON vm_device.device_id = vm_images_view.disk_id > WHERE v_storage_domain_id IN ( > SELECT * > FROM fnsplitteruuid(storage_id) > ) > AND vm_id NOT IN ( > SELECT vm_guid > FROM ENTITY_IDS_ON_OTHER_STORAGE_DOMAINS_TEMPORARY_TABLE > ); > END; > > v_ids := array_agg(vm_id::UUID) AS vm_guid FROM VM_IDS_TEMPORARY_TABLE WHERE entity_type <> 'TEMPLATE'; > PERFORM DeletePermissionsByEntityIds(v_ids); > > DELETE > FROM snapshots > WHERE vm_id IN ( > SELECT vm_id AS vm_guid > FROM VM_IDS_TEMPORARY_TABLE > ); > > DELETE > FROM image_storage_domain_map > WHERE storage_domain_id = v_storage_domain_id; > > DELETE > FROM images > WHERE image_guid IN ( > SELECT image_id > FROM STORAGE_DOMAIN_MAP_TABLE > ); > > DELETE > FROM vm_interface > WHERE vmt_guid IN ( > SELECT vm_guid > FROM TEMPLATES_IDS_TEMPORARY_TABLE > ); > > v_ids := array_agg(vm_guid::UUID) FROM TEMPLATES_IDS_TEMPORARY_TABLE; > PERFORM DeletePermissionsByEntityIds(v_ids); > > DELETE > FROM vm_static > WHERE vm_guid IN ( > SELECT vm_id AS vm_guid > FROM VM_IDS_TEMPORARY_TABLE > WHERE entity_type <> 'TEMPLATE' > ); > > -- Delete devices which are related to VMs/Templates with Multiple Storage Domain (VMs/Templates which has not removed) > DELETE > FROM vm_device > WHERE device_id IN ( > SELECT disk_id > FROM STORAGE_DOMAIN_MAP_TABLE > ); > > -- Delete pools and snapshots of pools based on templates from the storage domain to be removed > DELETE > FROM snapshots > WHERE vm_id IN ( > SELECT vm_guid > FROM vm_static > WHERE vmt_guid IN ( > SELECT vm_guid > FROM TEMPLATES_IDS_TEMPORARY_TABLE > ) > ); > > DELETE > FROM vm_static > WHERE vmt_guid IN ( > SELECT vm_guid > FROM TEMPLATES_IDS_TEMPORARY_TABLE > ); > > DELETE > FROM vm_static > WHERE vm_guid IN ( > SELECT vm_guid > FROM TEMPLATES_IDS_TEMPORARY_TABLE > ); > > -- Deletes the disks which the only storage domain they are reside on, is the storage domain. > DELETE > FROM base_disks > WHERE disk_id IN ( > SELECT disk_id > FROM STORAGE_DOMAIN_MAP_TABLE > ); > > -- Deletes the disks's permissions which the only storage domain they are reside on, is the storage domain. > v_ids := array_agg(disk_id::UUID) FROM STORAGE_DOMAIN_MAP_TABLE; > PERFORM DeletePermissionsByEntityIds(v_ids); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Force_Delete_storage_domain (v_storage_domain_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > PERFORM Remove_Entities_From_storage_domain(v_storage_domain_id); > > PERFORM DeletePermissionsByEntityId(v_storage_domain_id); > > DELETE > FROM storage_domain_dynamic > WHERE id = v_storage_domain_id; > > DELETE > FROM storage_domain_static > WHERE id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domains_List_By_storageDomainId (v_storage_domain_id UUID, v_user_id UUID, v_is_filtered BOOLEAN) >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains > WHERE storage_domains.id = v_storage_domain_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_storage_pool_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_storage_domain_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_perms_get_storage_pools_with_permitted_action_on_clusters ( > v_user_id UUID, > v_action_group_id INT, > v_supports_virt_service boolean, > v_supports_gluster_service boolean > ) >RETURNS SETOF storage_pool STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT sp.* > FROM storage_pool sp > WHERE sp.id IN ( > SELECT vg.storage_pool_id > FROM cluster vg > WHERE ( > SELECT get_entity_permissions(v_user_id, v_action_group_id, vg.cluster_id, 9) > ) IS NOT NULL > AND ( > ( > v_supports_virt_service = TRUE > AND vg.virt_service = TRUE > ) > OR ( > v_supports_gluster_service = TRUE > AND vg.gluster_service = TRUE > ) > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getstorage_domains_By_storage_pool_id_and_connection ( > v_storage_pool_id UUID, > v_connection VARCHAR > ) >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains > WHERE storage_pool_id = v_storage_pool_id > AND storage IN ( > SELECT id > FROM storage_server_connections > WHERE connection = v_connection > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetFailingStorage_domains () >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains > WHERE recoverable > AND status = 4;--inactive >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetFailingVdss () >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vds > WHERE recoverable > AND status = 10;--non operational >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStoragePoolsByClusterService ( > v_supports_virt_service BOOLEAN, > v_supports_gluster_service BOOLEAN > ) >RETURNS SETOF storage_pool STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT sp.* > FROM storage_pool SP > WHERE EXISTS ( > SELECT 1 > FROM cluster vg > WHERE ( > ( > v_supports_virt_service = TRUE > AND vg.virt_service = TRUE > ) > OR ( > v_supports_gluster_service = TRUE > AND vg.gluster_service = TRUE > ) > ) > AND vg.storage_pool_id = sp.id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageServerConnectionsForDomain (v_storage_domain_id UUID) >RETURNS SETOF storage_server_connections STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_server_connections > WHERE EXISTS ( > SELECT 1 > FROM storage_domain_static > WHERE storage_domain_static.id = v_storage_domain_id > AND storage_domain_static.storage_type IN ( > 1, > 4, > 6, > 7 > ) -- file storage domains - nfs,posix,local,gluster > AND storage_server_connections.id = storage_domain_static.storage > > UNION ALL > > SELECT 1 > FROM storage_domain_static > INNER JOIN luns > ON storage_domain_static.storage = luns.volume_group_id > INNER JOIN lun_storage_server_connection_map > ON luns.lun_id = lun_storage_server_connection_map.lun_id > AND storage_server_connections.id = lun_storage_server_connection_map.storage_server_connection > WHERE storage_domain_static.id = v_storage_domain_id > AND storage_domain_static.storage_type = 3 -- storage type = iscsi > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDcIdByExternalNetworkId (v_external_id TEXT) >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT storage_pool_id > FROM network > WHERE provider_network_external_id = v_external_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNumberOfImagesInStorageDomain (v_storage_domain_id UUID) >RETURNS SETOF BIGINT STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT COUNT(*) > FROM image_storage_domain_map > WHERE storage_domain_id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetHostedEngineStorageDomainIds() >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT id > FROM hosted_engine_storage_domains_ids_view; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetStorageDomainByGlusterVolumeId (v_gluster_vol_id UUID) >RETURNS SETOF storage_domains STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM storage_domains > WHERE storage IN ( > SELECT id > FROM storage_server_connections > WHERE gluster_volume_id = v_gluster_vol_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertCinderStorage ( > v_storage_domain_id UUID, > v_driver_options JSONB, > v_driver_sensitive_options TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO cinder_storage ( > storage_domain_id, > driver_options, > driver_sensitive_options > ) > VALUES ( > v_storage_domain_id, > v_driver_options, > v_driver_sensitive_options > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateCinderStorage ( > v_storage_domain_id UUID, > v_driver_options JSONB, > v_driver_sensitive_options TEXT > ) >RETURNS VOID > AS $PROCEDURE$ >BEGIN > UPDATE cinder_storage > SET driver_options = v_driver_options, > driver_sensitive_options = v_driver_sensitive_options > WHERE storage_domain_id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteCinderStorage (v_storage_domain_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT id > INTO v_val > FROM cinder_storage > WHERE storage_domain_id = v_storage_domain_id > FOR UPDATE; > > DELETE > FROM cinder_storage > WHERE id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetCinderStorage (v_storage_domain_id UUID) >RETURNS SETOF cinder_storage STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM cinder_storage > WHERE storage_domain_id = v_storage_domain_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetCinderStorageByDrivers ( > v_driver_options JSONB) >RETURNS SETOF cinder_storage STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM cinder_storage > WHERE driver_options = v_driver_options; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,589+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/system_statistics_sp.sql... >2019-02-26 17:06:41,591+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/system_statistics_sp.sql >********* QUERY ********** >DROP TYPE IF EXISTS Getsystem_statistics_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE Getsystem_statistics_rs AS (val INT); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getsystem_statistics ( > v_entity VARCHAR(10), > v_status VARCHAR(20) > ) >RETURNS Getsystem_statistics_rs STABLE AS $PROCEDURE$ >DECLARE v_i Getsystem_statistics_rs; > >v_sql VARCHAR(4000); > >v_sys_entity VARCHAR(10); > >BEGIN > v_sql := NULL; > > v_sys_entity := upper(v_entity); > > IF v_sys_entity = 'VM' THEN > v_sql := 'SELECT count(vm_guid) FROM vm_dynamic'; > ELSIF v_sys_entity = 'HOST' THEN > v_sql := 'SELECT count(vds_id) FROM vds_dynamic'; > > ELSIF v_sys_entity = 'USER' THEN > v_sql := 'SELECT count(user_id) FROM users'; > > ELSIF v_sys_entity = 'TSD' THEN > v_sql := 'SELECT count(id) FROM storage_domain_static'; > > ELSIF v_sys_entity = 'ASD' THEN > v_sql := 'SELECT count(storage_id) FROM storage_pool_iso_map'; > ELSE > RAISE 'Unknown entity type "%"', v_entity; > END IF; > > IF v_status != '' THEN > IF v_sys_entity != 'USER' > AND v_sys_entity != 'TSD' THEN > v_sql := coalesce(v_sql, '') || ' where status in (' || coalesce(v_status, '') || ')'; > END IF; > END IF; > EXECUTE v_sql > INTO v_i; > >RETURN v_i;END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,613+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/tags_sp.sql... >2019-02-26 17:06:41,615+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/tags_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION Inserttags ( > v_description VARCHAR(4000), > v_tag_id UUID, > v_tag_name VARCHAR(50), > v_parent_id UUID, > v_readonly BOOLEAN, > v_type INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO tags ( > tag_id, > description, > tag_name, > parent_id, > readonly, > type > ) > VALUES ( > v_tag_id, > v_description, > v_tag_name, > v_parent_id, > v_readonly, > v_type > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatetags ( > v_description VARCHAR(4000), > v_tag_id UUID, > v_tag_name VARCHAR(50), > v_parent_id UUID, > v_readonly BOOLEAN, > v_type INT > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE tags > SET description = v_description, > tag_name = v_tag_name, > parent_id = v_parent_id, > readonly = v_readonly, > type = v_type, > _update_date = LOCALTIMESTAMP > WHERE tag_id = v_tag_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletetags (v_tag_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT tag_id > INTO v_val > FROM tags > WHERE tag_id = v_tag_id > FOR > > UPDATE; > > DELETE > FROM tags_user_group_map > WHERE tag_id = v_tag_id; > > DELETE > FROM tags_user_map > WHERE tag_id = v_tag_id; > > DELETE > FROM tags_vm_map > WHERE tag_id = v_tag_id; > > DELETE > FROM tags_vds_map > WHERE tag_id = v_tag_id; > > DELETE > FROM tags_vm_pool_map > WHERE tag_id = v_tag_id; > > DELETE > FROM tags > WHERE tag_id = v_tag_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromtags () >RETURNS SETOF tags STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags.* > FROM tags; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GettagsBytag_id (v_tag_id UUID) >RETURNS SETOF tags STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags.* > FROM tags > WHERE tag_id = v_tag_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GettagsByparent_id (v_parent_id UUID) >RETURNS SETOF tags STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags.* > FROM tags > WHERE parent_id = v_parent_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GettagsBytag_name (v_tag_name VARCHAR(50)) >RETURNS SETOF tags STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags.* > FROM tags > WHERE tag_name = v_tag_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Inserttags_user_group_map ( > v_group_id UUID, > v_tag_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO tags_user_group_map ( > group_id, > tag_id > ) > VALUES ( > v_group_id, > v_tag_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletetags_user_group_map ( > v_group_id UUID, > v_tag_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM tags_user_group_map > WHERE group_id = v_group_id > AND tag_id = v_tag_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromtags_user_group_map () >RETURNS SETOF tags_user_group_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags_user_group_map.* > FROM tags_user_group_map; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetTagUserGroupByGroupIdAndByTagId ( > v_group_id UUID, > v_tag_id UUID > ) >RETURNS SETOF tags_user_group_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags_user_group_map.* > FROM tags_user_group_map > WHERE group_id = v_group_id > AND tag_id = v_tag_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetTagsByUserGroupId (v_group_ids VARCHAR(4000)) >RETURNS SETOF tags_user_group_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT tags_user_group_map_view.* > FROM tags_user_group_map_view > WHERE group_id IN ( > SELECT * > FROM fnSplitterUuid(v_group_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Inserttags_user_map ( > v_tag_id UUID, > v_user_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO tags_user_map ( > tag_id, > user_id > ) > VALUES ( > v_tag_id, > v_user_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletetags_user_map ( > v_tag_id UUID, > v_user_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM tags_user_map > WHERE tag_id = v_tag_id > AND user_id = v_user_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromtags_user_map () >RETURNS SETOF tags_user_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags_user_map.* > FROM tags_user_map; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetTagUserByTagIdAndByuserId ( > v_tag_id UUID, > v_user_id UUID > ) >RETURNS SETOF tags_user_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags_user_map.* > FROM tags_user_map > WHERE tag_id = v_tag_id > AND user_id = v_user_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetTagsByUserId (v_user_ids VARCHAR(4000)) >RETURNS SETOF tags_user_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT tags_user_map_view.* > FROM tags_user_map_view > WHERE user_id IN ( > SELECT * > FROM fnSplitterUuid(v_user_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetUserTagsByTagIds (v_tag_ids VARCHAR(4000)) >RETURNS SETOF tags_user_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT tags_user_map_view.* > FROM tags_user_map_view > WHERE tag_id IN ( > SELECT * > FROM fnSplitterUuid(v_tag_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Inserttags_vds_map ( > v_tag_id UUID, > v_vds_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO tags_vds_map ( > tag_id, > vds_id > ) > VALUES ( > v_tag_id, > v_vds_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletetags_vds_map ( > v_tag_id UUID, > v_vds_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM tags_vds_map > WHERE tag_id = v_tag_id > AND vds_id = v_vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromtags_vds_map () >RETURNS SETOF tags_vds_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags_vds_map.* > FROM tags_vds_map; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetTagVdsBytagIdAndByVdsId ( > v_tag_id UUID, > v_vds_id UUID > ) >RETURNS SETOF tags_vds_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags_vds_map.* > FROM tags_vds_map > WHERE tag_id = v_tag_id > AND vds_id = v_vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetTagsByVdsId (v_vds_ids VARCHAR(4000)) >RETURNS SETOF tags_vds_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT tags_vds_map_view.* > FROM tags_vds_map_view > WHERE vds_id IN ( > SELECT * > FROM fnSplitterUuid(v_vds_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Inserttags_vm_map ( > v_tag_id UUID, > v_vm_id UUID, > v_DefaultDisplayType INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO tags_vm_map ( > tag_id, > vm_id, > DefaultDisplayType > ) > VALUES ( > v_tag_id, > v_vm_id, > v_DefaultDisplayType > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletetags_vm_map ( > v_tag_id UUID, > v_vm_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM tags_vm_map > WHERE tag_id = v_tag_id > AND vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromtags_vm_map () >RETURNS SETOF tags_vm_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags_vm_map.* > FROM tags_vm_map; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetTagVmByTagIdAndByvmId ( > v_tag_id UUID, > v_vm_id UUID > ) >RETURNS SETOF tags_vm_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags_vm_map.* > FROM tags_vm_map > WHERE tag_id = v_tag_id > AND vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetTagsByVmId (v_vm_ids VARCHAR(4000)) >RETURNS SETOF tags_vm_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT tags_vm_map_view.* > FROM tags_vm_map_view > WHERE vm_id IN ( > SELECT * > FROM fnSplitterUuid(v_vm_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmTagsByTagId (v_tag_ids VARCHAR(4000)) >RETURNS SETOF tags_vm_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT tags_vm_map_view.* > FROM tags_vm_map_view > WHERE tag_id IN ( > SELECT * > FROM fnSplitterUuid(v_tag_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmTagsDefaultDisplayType ( > v_tag_id UUID, > v_vm_id UUID, > v_DefaultDisplayType INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE tags_vm_map > SET DefaultDisplayType = v_DefaultDisplayType > WHERE tags_vm_map.tag_id = v_tag_id > AND tags_vm_map.vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetnVmTagsByVmId (v_vm_id UUID) >RETURNS SETOF tags_vm_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM tags_vm_map > WHERE tags_vm_map.vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetnVmTagsByVmIdAndDefaultTag (v_vm_id UUID) >RETURNS SETOF tags_vm_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags_vm_map.* > FROM tags_vm_map > INNER JOIN tags > ON tags.tag_id = tags_vm_map.tag_id > WHERE tags_vm_map.vm_id = v_vm_id > AND tags.type = 1; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveAllVmTagsByVmId (v_vm_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM tags_vm_map > WHERE vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,653+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/tags_vm_pool_map_sp.sql... >2019-02-26 17:06:41,656+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/tags_vm_pool_map_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION Inserttags_vm_pool_map ( > v_tag_id UUID, > v_vm_pool_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO tags_vm_pool_map ( > tag_id, > vm_pool_id > ) > VALUES ( > v_tag_id, > v_vm_pool_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Updatetags_vm_pool_map ( > v_tag_id INT, > v_vm_pool_id INT > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletetags_vm_pool_map ( > v_tag_id UUID, > v_vm_pool_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM tags_vm_pool_map > WHERE tag_id = v_tag_id > AND vm_pool_id = v_vm_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromtags_vm_pool_map () >RETURNS SETOF tags_vm_pool_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags_vm_pool_map.* > FROM tags_vm_pool_map; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Gettags_vm_pool_mapBytag_idAndByvm_pool_id ( > v_tag_id UUID, > v_vm_pool_id UUID > ) >RETURNS SETOF tags_vm_pool_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT tags_vm_pool_map.* > FROM tags_vm_pool_map > WHERE tag_id = v_tag_id > AND vm_pool_id = v_vm_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetTagsByVmpoolId (v_vm_pool_ids VARCHAR(4000)) >RETURNS SETOF tags_vm_pool_map_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT tags_vm_pool_map_view.* > FROM tags_vm_pool_map_view > WHERE vm_pool_id IN ( > SELECT * > FROM fnSplitterUuid(v_vm_pool_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,678+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/unregistered_disks_sp.sql... >2019-02-26 17:06:41,680+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/unregistered_disks_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertUnregisteredDisk ( > v_disk_id UUID, > v_image_id UUID, > v_disk_alias VARCHAR(255), > v_disk_description VARCHAR(255), > v_storage_domain_id UUID, > v_creation_date TIMESTAMP WITH TIME ZONE, > v_last_modified TIMESTAMP WITH TIME ZONE, > v_volume_type INTEGER, > v_volume_format INTEGER, > v_actual_size bigint, > v_size bigint > ) >RETURNS VOID >AS $PROCEDURE$ >BEGIN > INSERT INTO unregistered_disks ( > disk_id, > image_id, > disk_alias, > disk_description, > storage_domain_id, > creation_date, > last_modified, > volume_type, > volume_format, > actual_size, > size > ) > VALUES ( > v_disk_id, > v_image_id, > v_disk_alias, > v_disk_description, > v_storage_domain_id, > v_creation_date, > v_last_modified, > v_volume_type, > v_volume_format, > v_actual_size, > v_size > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertUnregisteredDisksToVms ( > v_disk_id UUID, > v_entity_id UUID, > v_entity_name VARCHAR(255), > v_storage_domain_id UUID > ) >RETURNS VOID >AS $PROCEDURE$ >BEGIN > INSERT INTO unregistered_disks_to_vms ( > disk_id, > entity_id, > entity_name, > storage_domain_id > ) > VALUES ( > v_disk_id, > v_entity_id, > v_entity_name, > v_storage_domain_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveDiskFromUnregistered ( > v_disk_id UUID, > v_storage_domain_id UUID > ) >RETURNS VOID >AS $PROCEDURE$ >BEGIN > DELETE > FROM unregistered_disks > WHERE (disk_id = v_disk_id > OR v_disk_id IS NULL) > AND ( > storage_domain_id = v_storage_domain_id > OR v_storage_domain_id IS NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveDiskFromUnregisteredRelatedToVM ( > v_vm_id UUID, > v_storage_domain_id UUID > ) >RETURNS VOID >AS $PROCEDURE$ >BEGIN > DELETE > FROM unregistered_disks > WHERE disk_id IN (SELECT disk_id > FROM unregistered_disks_to_vms > WHERE entity_id = v_vm_id) > AND ( > storage_domain_id = v_storage_domain_id > OR v_storage_domain_id IS NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDiskByDiskIdAndStorageDomainId ( > v_disk_id UUID, > v_storage_domain_id UUID > ) >RETURNS SETOF unregistered_disks STABLE >AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM unregistered_disks > WHERE (disk_id = v_disk_id > OR v_disk_id IS NULL) > AND ( > storage_domain_id = v_storage_domain_id > OR v_storage_domain_id IS NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetEntitiesByDiskId ( > v_disk_id UUID) >RETURNS SETOF unregistered_disks_to_vms STABLE >AS $PROCEDURE$ >BEGIN > RETURN QUERY > SELECT * > FROM unregistered_disks_to_vms > WHERE disk_id = v_disk_id > OR v_disk_id IS NULL; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,703+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/unregistered_OVF_data_sp.sql... >2019-02-26 17:06:41,706+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/unregistered_OVF_data_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertOVFDataForEntities ( > v_entity_guid UUID, > v_entity_name VARCHAR(255), > v_entity_type VARCHAR(32), > v_architecture INT, > v_lowest_comp_version VARCHAR(40), > v_storage_domain_id UUID, > v_ovf_data TEXT, > v_ovf_extra_data TEXT, > v_status INTEGER > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO unregistered_ovf_of_entities ( > entity_guid, > entity_name, > entity_type, > architecture, > lowest_comp_version, > storage_domain_id, > ovf_extra_data, > ovf_data, > status > ) > VALUES ( > v_entity_guid, > v_entity_name, > v_entity_type, > v_architecture, > v_lowest_comp_version, > v_storage_domain_id, > v_ovf_extra_data, > v_ovf_data, > v_status > ); > > UPDATE unregistered_ovf_of_entities u > SET ovf_data = vog.ovf_data > FROM vm_ovf_generations vog > WHERE vog.vm_guid = u.entity_guid > AND u.entity_guid = v_entity_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveEntityFromUnregistered ( > v_entity_guid UUID, > v_storage_domain_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM unregistered_ovf_of_entities > WHERE entity_guid = v_entity_guid > AND ( > storage_domain_id = v_storage_domain_id > OR v_storage_domain_id IS NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllOVFEntitiesForStorageDomainByEntityType ( > v_storage_domain_id UUID, > v_entity_type VARCHAR(20) > ) >RETURNS SETOF unregistered_ovf_of_entities STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM unregistered_ovf_of_entities > WHERE storage_domain_id = v_storage_domain_id > AND ( > entity_type = v_entity_type > OR v_entity_type IS NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetOVFDataByEntityIdAndStorageDomain ( > v_entity_guid UUID, > v_storage_domain_id UUID > ) >RETURNS SETOF unregistered_ovf_of_entities STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM unregistered_ovf_of_entities > WHERE entity_guid = v_entity_guid > AND ( > storage_domain_id = v_storage_domain_id > OR v_storage_domain_id IS NULL > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,727+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/user_profiles_sp.sql... >2019-02-26 17:06:41,729+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/user_profiles_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertUserProfile ( > v_profile_id UUID, > v_user_id UUID, > v_ssh_public_key_id UUID, > v_ssh_public_key TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO user_profiles ( > profile_id, > user_id, > ssh_public_key_id, > ssh_public_key > ) > VALUES ( > v_profile_id, > v_user_id, > v_ssh_public_key_id, > v_ssh_public_key > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateUserProfile ( > v_profile_id UUID, > v_user_id UUID, > v_ssh_public_key_id UUID, > v_ssh_public_key TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE user_profiles > SET profile_id = v_profile_id, > user_id = v_user_id, > ssh_public_key_id = v_ssh_public_key_id, > ssh_public_key = v_ssh_public_key > WHERE profile_id = v_profile_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteUserProfile (v_profile_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM user_profiles > WHERE profile_id = v_profile_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromUserProfiles () >RETURNS SETOF user_profiles_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT user_profiles_view.* > FROM user_profiles_view; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetUserProfileByUserId (v_user_id UUID) >RETURNS SETOF user_profiles_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM user_profiles_view > WHERE user_id = v_user_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetUserProfileByProfileId (v_profile_id UUID) >RETURNS SETOF user_profiles_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM user_profiles_view > WHERE profile_id = v_profile_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,751+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/user_sp.sql... >2019-02-26 17:06:41,754+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/user_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertUser ( > v_department VARCHAR(255), > v_domain VARCHAR(255), > v_email VARCHAR(255), > v_name VARCHAR(255), > v_note VARCHAR(255), > v_surname VARCHAR(255), > v_user_id UUID, > v_username VARCHAR(255), > v_external_id TEXT, > v_namespace VARCHAR(2048) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO users ( > department, > domain, > email, > name, > note, > surname, > user_id, > username, > external_id, > namespace > ) > VALUES ( > v_department, > v_domain, > v_email, > v_name, > v_note, > v_surname, > v_user_id, > v_username, > v_external_id, > v_namespace > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateUserImpl ( > v_department VARCHAR(255), > v_domain VARCHAR(255), > v_email VARCHAR(255), > v_name VARCHAR(255), > v_note VARCHAR(255), > v_surname VARCHAR(255), > v_user_id UUID, > v_username VARCHAR(255), > v_external_id TEXT, > v_namespace VARCHAR(2048) > ) >RETURNS INT > > AS $PROCEDURE$ >DECLARE updated_rows INT; > >BEGIN > UPDATE users > SET department = v_department, > domain = v_domain, > email = v_email, > name = v_name, > note = v_note, > surname = v_surname, > username = v_username, > external_id = v_external_id, > namespace = v_namespace, > _update_date = CURRENT_TIMESTAMP > WHERE external_id = v_external_id > AND domain = v_domain; > > GET DIAGNOSTICS updated_rows = ROW_COUNT; > > RETURN updated_rows; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateUser ( > v_department VARCHAR(255), > v_domain VARCHAR(255), > v_email VARCHAR(255), > v_name VARCHAR(255), > v_note VARCHAR(255), > v_surname VARCHAR(255), > v_user_id UUID, > v_username VARCHAR(255), > v_last_admin_check_status BOOLEAN, > v_external_id TEXT, > v_namespace VARCHAR(2048) > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > PERFORM UpdateUserImpl( > v_department, > v_domain, > v_email, > v_name, > v_note, > v_surname, > v_user_id, > v_username, > v_external_id, > v_namespace); > > UPDATE users > SET last_admin_check_status = v_last_admin_check_status > WHERE domain = v_domain > AND external_id = v_external_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertOrUpdateUser ( > v_department VARCHAR(255), > v_domain VARCHAR(255), > v_email VARCHAR(255), > v_name VARCHAR(255), > v_note VARCHAR(255), > v_surname VARCHAR(255), > v_user_id UUID, > v_username VARCHAR(255), > v_external_id TEXT, > v_namespace VARCHAR(2048) > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE updated_rows INT; > >BEGIN > SELECT UpdateUserImpl( > v_department, > v_domain, > v_email, > v_name, > v_note, > v_surname, > v_user_id, > v_username, > v_external_id, > v_namespace) > INTO updated_rows; > > IF (updated_rows = 0) THEN > PERFORM InsertUser( > v_department, > v_domain, > v_email, > v_name, > v_note, > v_surname, > v_user_id, > v_username, > v_external_id, > v_namespace); > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION DeleteUser (v_user_id UUID) > RETURNS VOID AS $PROCEDURE$ > > DECLARE v_val UUID; > > BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT user_id > INTO v_val > FROM users > WHERE user_id = v_user_id > FOR > > UPDATE; > > DELETE > FROM tags_user_map > WHERE user_id = v_user_id; > > DELETE > FROM users > WHERE user_id = v_user_id; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION GetAllFromUsers ( > v_user_id UUID, > v_is_filtered BOOLEAN > ) > RETURNS SETOF users STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT users.* > FROM users > WHERE ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM users u, > user_db_users_permissions_view p > WHERE u.user_id = v_user_id > AND u.user_id = p.ad_element_id > ) > ); > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION GetUserByUserId ( > v_user_id UUID, > v_is_filtered BOOLEAN > ) > RETURNS SETOF users STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT users.* > FROM users > WHERE user_id = v_user_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM users u, > user_db_users_permissions_view p > WHERE u.user_id = v_user_id > AND u.user_id = p.ad_element_id > ) > ); > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION GetUserByExternalId ( > v_domain VARCHAR(255), > v_external_id TEXT > ) > RETURNS SETOF users STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT users.* > FROM users > WHERE domain = v_domain > AND external_id = v_external_id; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION GetUserByUserNameAndDomain ( > v_username VARCHAR(255), > v_domain VARCHAR(255) > ) > RETURNS SETOF users STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT users.* > FROM users > WHERE username = v_username > AND domain = v_domain; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION GetUsersByVmGuid (v_vm_guid UUID) > RETURNS SETOF users STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT users.* > FROM users > INNER JOIN permissions > ON users.user_id = permissions.ad_element_id > WHERE permissions.object_type_id = 2 > AND permissions.object_id = v_vm_guid; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetUsersByTemplateGuid (v_template_guid UUID) > RETURNS SETOF users STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT users.* > FROM users > INNER JOIN permissions > ON users.user_id = permissions.ad_element_id > WHERE permissions.object_type_id = 4 > AND permissions.object_id = v_template_guid; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION UpdateLastAdminCheckStatus (v_userIds VARCHAR(4000)) > RETURNS VOID AS $PROCEDURE$ > > DECLARE v_id UUID; > > v_tempId VARCHAR(4000); > > myCursor CURSOR > FOR > > SELECT id > FROM fnSplitter(v_userIds); > > v_result INT; > > BEGIN > -- get users and its groups > -- get their permission based on ad_element_id. > -- if one permissions role's type is ADMIN(1) THEN set the user last_admin_check_status to 1 > OPEN myCursor; > > FETCH myCursor > INTO v_tempId; > > WHILE FOUND LOOP v_id := CAST(v_tempId AS UUID); > SELECT count(*) > INTO v_result > FROM users > WHERE user_id IN ( > SELECT ad_element_id AS user_id > FROM permissions, > roles > WHERE permissions.role_id = roles.id > AND ad_element_id IN ( > ( > SELECT ad_groups.id > FROM ad_groups, > engine_sessions > WHERE engine_sessions.user_id = v_id > AND ad_groups.id IN ( > SELECT * > FROM fnsplitteruuid(engine_sessions.group_ids) > ) > > UNION > > SELECT v_id > ) > ) > AND ( > roles.role_type = 1 > OR permissions.role_id = '00000000-0000-0000-0000-000000000001' > ) > ); > > UPDATE users > SET last_admin_check_status = CASE > WHEN v_result = 0 > THEN FALSE > ELSE TRUE > END > WHERE user_id = v_id; > > FETCH myCursor > INTO v_tempId; > END LOOP; > > > CLOSE myCursor; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetSessionUserAndGroupsById ( > v_id UUID, > v_engine_session_seq_id INT > ) >RETURNS SETOF idUuidType STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT ad_groups.ID > FROM ad_groups, > engine_sessions > WHERE engine_sessions.id = v_engine_session_seq_id > AND ad_groups.id IN ( > SELECT * > FROM fnsplitteruuid(engine_sessions.group_ids) > ) > > UNION > > SELECT v_id > > UNION > > -- user is also member of 'Everyone' > SELECT 'EEE00000-0000-0000-0000-123456789EEE'; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetUsersByTemplateGuid (v_template_guid UUID) >RETURNS SETOF users STABLE AS $PROCEDURE$ > >BEGIN > RETURN QUERY > > SELECT users.* > FROM users > INNER JOIN permissions > ON users.user_id = permissions.ad_element_id > WHERE permissions.object_type_id = 4 > AND permissions.object_id = v_template_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,783+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vdc_option_sp.sql... >2019-02-26 17:06:41,785+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vdc_option_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVdcOption ( > v_option_name VARCHAR(50), > v_option_value VARCHAR(50), > v_version VARCHAR(40), > INOUT v_option_id INT > ) AS $PROCEDURE$ >BEGIN > INSERT INTO vdc_options ( > OPTION_name, > option_value, > version > ) > VALUES ( > v_option_name, > v_option_value, > v_version > ); > > v_option_id := CURRVAL('vdc_options_seq'); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVdcOption ( > v_option_name VARCHAR(50), > v_option_value VARCHAR(50), > v_option_id INT, > v_version VARCHAR(40) > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE vdc_options > SET OPTION_name = v_option_name, > option_value = v_option_value, > version = v_version > WHERE option_id = v_option_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVdcOption (v_option_id INT) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vdc_options > WHERE option_id = v_option_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVdcOption () >RETURNS SETOF vdc_options STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vdc_options.* > FROM vdc_options; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdcOptionById (v_option_id INT) >RETURNS SETOF vdc_options STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vdc_options.* > FROM vdc_options > WHERE option_id = v_option_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdcOptionByName ( > v_option_name VARCHAR(50), > v_version VARCHAR(40) > ) >RETURNS SETOF vdc_options STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vdc_options.* > FROM vdc_options > WHERE OPTION_name = v_option_name > AND version = v_version; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,807+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vds_kdump_status_sp.sql... >2019-02-26 17:06:41,810+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vds_kdump_status_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpsertKdumpStatus ( > v_vds_id UUID, > v_status VARCHAR(20), > v_address VARCHAR(255) > ) >RETURNS INT AS $PROCEDURE$ >BEGIN > UPDATE vds_kdump_status > SET status = v_status, > address = v_address > WHERE vds_id = v_vds_id; > > IF NOT found THEN > INSERT INTO vds_kdump_status ( > vds_id, > status, > address > ) > VALUES ( > v_vds_id, > v_status, > v_address > ); > END IF; > > RETURN 1; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpsertKdumpStatusForIp ( > v_ip VARCHAR(20), > v_status VARCHAR(20), > v_address VARCHAR(255) > ) >RETURNS INT AS $PROCEDURE$ >DECLARE v_vds_id UUID; > >updated_rows INT; > >BEGIN > updated_rows := 0; > > SELECT vds_id > INTO v_vds_id > FROM vds_interface > WHERE addr = v_ip; > > IF v_vds_id IS NOT NULL THEN > SELECT UpsertKdumpStatus(v_vds_id, v_status, v_address) > INTO updated_rows; > END IF; > > RETURN updated_rows; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION RemoveFinishedKdumpStatusForVds (v_vds_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vds_kdump_status > WHERE vds_id = v_vds_id > AND status = 'finished'; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetKdumpStatusForVds (v_vds_id UUID) >RETURNS SETOF vds_kdump_status STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vds_kdump_status > WHERE vds_id = v_vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllUnfinishedVdsKdumpStatus () >RETURNS SETOF vds_kdump_status STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vds_kdump_status > WHERE status <> 'finished'; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,831+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vds_spm_id_map_sp.sql... >2019-02-26 17:06:41,834+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vds_spm_id_map_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION Insertvds_spm_id_map ( > v_storage_pool_id UUID, > v_vds_id UUID, > v_vds_spm_id INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vds_spm_id_map ( > storage_pool_id, > vds_id, > vds_spm_id > ) > VALUES ( > v_storage_pool_id, > v_vds_id, > v_vds_spm_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Deletevds_spm_id_map (v_vds_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vds_spm_id_map > WHERE vds_id = v_vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteByPoolvds_spm_id_map ( > v_vds_id UUID, > v_storage_pool_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vds_spm_id_map > WHERE vds_id = v_vds_id > AND storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromvds_spm_id_map () >RETURNS SETOF vds_spm_id_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_spm_id_map.* > FROM vds_spm_id_map; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getvds_spm_id_mapBystorage_pool_idAndByvds_spm_id ( > v_storage_pool_id UUID, > v_vds_spm_id INT > ) >RETURNS SETOF vds_spm_id_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_spm_id_map.* > FROM vds_spm_id_map > WHERE storage_pool_id = v_storage_pool_id > AND vds_spm_id = v_vds_spm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getvds_spm_id_mapBystorage_pool_id (v_storage_pool_id UUID) >RETURNS SETOF vds_spm_id_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_spm_id_map.* > FROM vds_spm_id_map > WHERE storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION Getvds_spm_id_mapByvds_id (v_vds_id UUID) >RETURNS SETOF vds_spm_id_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_spm_id_map.* > FROM vds_spm_id_map > WHERE vds_id = v_vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,856+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vds_sp.sql... >2019-02-26 17:06:41,859+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vds_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVdsStatistics ( > v_cpu_idle DECIMAL(18, 0), > v_cpu_load DECIMAL(18, 0), > v_cpu_sys DECIMAL(18, 0), > v_cpu_user DECIMAL(18, 0), > v_usage_cpu_percent INT, > v_usage_mem_percent INT, > v_usage_network_percent INT, > v_vds_id UUID, > v_mem_available BIGINT, > v_mem_free BIGINT, > v_mem_shared BIGINT, > v_swap_free BIGINT, > v_swap_total BIGINT, > v_ksm_cpu_percent INT, > v_ksm_pages BIGINT, > v_ksm_state BOOLEAN, > v_anonymous_hugepages INT, > v_boot_time BIGINT, > v_ha_score INT, > v_ha_configured BOOLEAN, > v_ha_active BOOLEAN, > v_ha_global_maintenance BOOLEAN, > v_ha_local_maintenance BOOLEAN, > v_cpu_over_commit_time_stamp TIMESTAMP WITH TIME ZONE, > v_hugepages TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > INSERT INTO vds_statistics ( > cpu_idle, > cpu_load, > cpu_sys, > cpu_user, > usage_cpu_percent, > usage_mem_percent, > usage_network_percent, > vds_id, > mem_available, > mem_free, > mem_shared, > swap_free, > swap_total, > ksm_cpu_percent, > ksm_pages, > ksm_state, > anonymous_hugepages, > boot_time, > ha_score, > ha_configured, > ha_active, > ha_global_maintenance, > ha_local_maintenance, > cpu_over_commit_time_stamp, > hugepages > ) > VALUES ( > v_cpu_idle, > v_cpu_load, > v_cpu_sys, > v_cpu_user, > v_usage_cpu_percent, > v_usage_mem_percent, > v_usage_network_percent, > v_vds_id, > v_mem_available, > v_mem_free, > v_mem_shared, > v_swap_free, > v_swap_total, > v_ksm_cpu_percent, > v_ksm_pages, > v_ksm_state, > v_anonymous_hugepages, > v_boot_time, > v_ha_score, > v_ha_configured, > v_ha_active, > v_ha_global_maintenance, > v_ha_local_maintenance, > v_cpu_over_commit_time_stamp, > v_hugepages > ); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVdsStatistics ( > v_cpu_idle DECIMAL(18, 0), > v_cpu_load DECIMAL(18, 0), > v_cpu_sys DECIMAL(18, 0), > v_cpu_user DECIMAL(18, 0), > v_usage_cpu_percent INT, > v_usage_mem_percent INT, > v_usage_network_percent INT, > v_vds_id UUID, > v_mem_available BIGINT, > v_mem_free BIGINT, > v_mem_shared BIGINT, > v_swap_free BIGINT, > v_swap_total BIGINT, > v_ksm_cpu_percent INT, > v_ksm_pages BIGINT, > v_ksm_state BOOLEAN, > v_anonymous_hugepages INT, > v_boot_time BIGINT, > v_ha_score INT, > v_ha_configured BOOLEAN, > v_ha_active BOOLEAN, > v_ha_global_maintenance BOOLEAN, > v_ha_local_maintenance BOOLEAN, > v_cpu_over_commit_time_stamp TIMESTAMP WITH TIME ZONE, > v_hugepages TEXT > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > BEGIN > UPDATE vds_statistics > SET cpu_idle = v_cpu_idle, > cpu_load = v_cpu_load, > cpu_sys = v_cpu_sys, > cpu_user = v_cpu_user, > usage_cpu_percent = v_usage_cpu_percent, > usage_mem_percent = v_usage_mem_percent, > usage_network_percent = v_usage_network_percent, > mem_available = v_mem_available, > mem_free = v_mem_free, > mem_shared = v_mem_shared, > swap_free = v_swap_free, > swap_total = v_swap_total, > ksm_cpu_percent = v_ksm_cpu_percent, > ksm_pages = v_ksm_pages, > ksm_state = v_ksm_state, > anonymous_hugepages = v_anonymous_hugepages, > boot_time = v_boot_time, > ha_score = v_ha_score, > ha_configured = v_ha_configured, > ha_active = v_ha_active, > ha_global_maintenance = v_ha_global_maintenance, > ha_local_maintenance = v_ha_local_maintenance, > _update_date = LOCALTIMESTAMP, > cpu_over_commit_time_stamp = v_cpu_over_commit_time_stamp, > hugepages = v_hugepages > WHERE vds_id = v_vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVdsStatistics (v_vds_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > DELETE > FROM vds_statistics > WHERE vds_id = v_vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVdsStatistics () >RETURNS SETOF vds_statistics STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT vds_statistics.* > FROM vds_statistics; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsStatisticsByVdsId (v_vds_id UUID) >RETURNS SETOF vds_statistics STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT vds_statistics.* > FROM vds_statistics > WHERE vds_id = v_vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVdsDynamic ( > v_cpu_cores INT, > v_cpu_threads INT, > v_cpu_model VARCHAR(255), > v_cpu_speed_mh DECIMAL(18, 0), > v_if_total_speed VARCHAR(40), > v_kvm_enabled BOOLEAN, > v_mem_commited INT, > v_physical_mem_mb INT, > v_status INT, > v_vds_id UUID, > v_vm_active INT, > v_vm_count INT, > v_vms_cores_count INT, > v_vm_migrating INT, > v_incoming_migrations INT, > v_outgoing_migrations INT, > v_reserved_mem INT, > v_guest_overhead INT, > v_rpm_version VARCHAR(255), > v_software_version VARCHAR(40), > v_version_name VARCHAR(40), > v_build_name VARCHAR(40), > v_previous_status INT, > v_cpu_flags VARCHAR(4000), > v_pending_vcpus_count INT, > v_pending_vmem_size INT, > v_cpu_sockets INT, > v_net_config_dirty BOOLEAN, > v_supported_cluster_levels VARCHAR(40), > v_supported_engines VARCHAR(40), > v_host_os VARCHAR(4000), > v_kvm_version VARCHAR(4000), > v_libvirt_version VARCHAR(4000), > v_spice_version VARCHAR(4000), > v_gluster_version VARCHAR(4000), > v_librbd1_version VARCHAR(4000), > v_glusterfs_cli_version VARCHAR(4000), > v_openvswitch_version VARCHAR(40000), > v_kernel_version VARCHAR(4000), > v_iscsi_initiator_name VARCHAR(4000), > v_transparent_hugepages_state INT, > v_hooks TEXT, > v_hw_manufacturer VARCHAR(255), > v_hw_product_name VARCHAR(255), > v_hw_version VARCHAR(255), > v_hw_serial_number VARCHAR(255), > v_hw_uuid VARCHAR(255), > v_hw_family VARCHAR(255), > v_hbas TEXT, > v_supported_emulated_machines TEXT, > v_controlled_by_pm_policy BOOLEAN, > v_kdump_status SMALLINT, > v_selinux_enforce_mode INT, > v_auto_numa_balancing SMALLINT, > v_is_numa_supported BOOLEAN, > v_supported_rng_sources VARCHAR(255), > v_online_cpus TEXT, > v_is_update_available BOOLEAN, > v_is_hostdev_enabled BOOLEAN, > v_kernel_args TEXT, > v_hosted_engine_configured BOOLEAN, > v_in_fence_flow BOOLEAN, > v_kernel_features JSONB, > v_vnc_encryption_enabled BOOLEAN, > v_connector_info JSONB > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > INSERT INTO vds_dynamic ( > cpu_cores, > cpu_threads, > cpu_model, > cpu_speed_mh, > if_total_speed, > kvm_enabled, > mem_commited, > physical_mem_mb, > status, > vds_id, > vm_active, > vm_count, > vm_migrating, > incoming_migrations, > outgoing_migrations, > reserved_mem, > guest_overhead, > rpm_version, > software_version, > version_name, > build_name, > previous_status, > cpu_flags, > vms_cores_count, > pending_vcpus_count, > pending_vmem_size, > cpu_sockets, > net_config_dirty, > supported_cluster_levels, > supported_engines, > host_os, > kvm_version, > libvirt_version, > spice_version, > gluster_version, > librbd1_version, > glusterfs_cli_version, > openvswitch_version, > kernel_version, > iscsi_initiator_name, > transparent_hugepages_state, > hooks, > hw_manufacturer, > hw_product_name, > hw_version, > hw_serial_number, > hw_uuid, > hw_family, > hbas, > supported_emulated_machines, > controlled_by_pm_policy, > kdump_status, > selinux_enforce_mode, > auto_numa_balancing, > is_numa_supported, > supported_rng_sources, > online_cpus, > is_update_available, > is_hostdev_enabled, > kernel_args, > hosted_engine_configured, > in_fence_flow, > kernel_features, > vnc_encryption_enabled, > connector_info > ) > VALUES ( > v_cpu_cores, > v_cpu_threads, > v_cpu_model, > v_cpu_speed_mh, > v_if_total_speed, > v_kvm_enabled, > v_mem_commited, > v_physical_mem_mb, > v_status, > v_vds_id, > v_vm_active, > v_vm_count, > v_vm_migrating, > v_incoming_migrations, > v_outgoing_migrations, > v_reserved_mem, > v_guest_overhead, > v_rpm_version, > v_software_version, > v_version_name, > v_build_name, > v_previous_status, > v_cpu_flags, > v_vms_cores_count, > v_pending_vcpus_count, > v_pending_vmem_size, > v_cpu_sockets, > v_net_config_dirty, > v_supported_cluster_levels, > v_supported_engines, > v_host_os, > v_kvm_version, > v_libvirt_version, > v_spice_version, > v_gluster_version, > v_librbd1_version, > v_glusterfs_cli_version, > v_openvswitch_version, > v_kernel_version, > v_iscsi_initiator_name, > v_transparent_hugepages_state, > v_hooks, > v_hw_manufacturer, > v_hw_product_name, > v_hw_version, > v_hw_serial_number, > v_hw_uuid, > v_hw_family, > v_hbas, > v_supported_emulated_machines, > v_controlled_by_pm_policy, > v_kdump_status, > v_selinux_enforce_mode, > v_auto_numa_balancing, > v_is_numa_supported, > v_supported_rng_sources, > v_online_cpus, > v_is_update_available, > v_is_hostdev_enabled, > v_kernel_args, > v_hosted_engine_configured, > v_in_fence_flow, > v_kernel_features, > v_vnc_encryption_enabled, > v_connector_info > ); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVdsDynamicPowerManagementPolicyFlag ( > v_vds_id UUID, > v_controlled_by_pm_policy BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > UPDATE vds_dynamic > SET controlled_by_pm_policy = v_controlled_by_pm_policy > WHERE vds_id = v_vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVdsDynamic ( > v_cpu_cores INT, > v_cpu_threads INT, > v_cpu_model VARCHAR(255), > v_cpu_speed_mh DECIMAL(18, 0), > v_if_total_speed VARCHAR(40), > v_kvm_enabled BOOLEAN, > v_mem_commited INT, > v_physical_mem_mb INT, > v_status INT, > v_vds_id UUID, > v_vm_active INT, > v_vm_count INT, > v_vms_cores_count INT, > v_vm_migrating INT, > v_incoming_migrations INT, > v_outgoing_migrations INT, > v_reserved_mem INT, > v_guest_overhead INT, > v_rpm_version VARCHAR(255), > v_software_version VARCHAR(40), > v_version_name VARCHAR(40), > v_build_name VARCHAR(40), > v_previous_status INT, > v_cpu_flags VARCHAR(4000), > v_pending_vcpus_count INT, > v_pending_vmem_size INT, > v_cpu_sockets INT, > v_net_config_dirty BOOLEAN, > v_supported_cluster_levels VARCHAR(40), > v_supported_engines VARCHAR(40), > v_host_os VARCHAR(4000), > v_kvm_version VARCHAR(4000), > v_libvirt_version VARCHAR(4000), > v_spice_version VARCHAR(4000), > v_gluster_version VARCHAR(4000), > v_librbd1_version VARCHAR(4000), > v_glusterfs_cli_version VARCHAR(4000), > v_openvswitch_version VARCHAR(40000), > v_kernel_version VARCHAR(4000), > v_iscsi_initiator_name VARCHAR(4000), > v_transparent_hugepages_state INT, > v_hooks TEXT, > v_non_operational_reason INT, > v_hw_manufacturer VARCHAR(255), > v_hw_product_name VARCHAR(255), > v_hw_version VARCHAR(255), > v_hw_serial_number VARCHAR(255), > v_hw_uuid VARCHAR(255), > v_hw_family VARCHAR(255), > v_hbas TEXT, > v_supported_emulated_machines TEXT, > v_kdump_status SMALLINT, > v_selinux_enforce_mode INT, > v_auto_numa_balancing SMALLINT, > v_is_numa_supported BOOLEAN, > v_supported_rng_sources VARCHAR(255), > v_online_cpus TEXT, > v_maintenance_reason TEXT, > v_is_update_available BOOLEAN, > v_is_hostdev_enabled BOOLEAN, > v_kernel_args TEXT, > v_pretty_name VARCHAR(255), > v_hosted_engine_configured BOOLEAN, > v_in_fence_flow BOOLEAN, > v_kernel_features JSONB, > v_vnc_encryption_enabled BOOLEAN, > v_connector_info JSONB > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > BEGIN > UPDATE vds_dynamic > SET cpu_cores = v_cpu_cores, > cpu_threads = v_cpu_threads, > cpu_model = v_cpu_model, > cpu_speed_mh = v_cpu_speed_mh, > if_total_speed = v_if_total_speed, > kvm_enabled = v_kvm_enabled, > mem_commited = v_mem_commited, > physical_mem_mb = v_physical_mem_mb, > status = v_status, > vm_active = v_vm_active, > vm_count = v_vm_count, > vm_migrating = v_vm_migrating, > incoming_migrations = v_incoming_migrations, > outgoing_migrations = v_outgoing_migrations, > reserved_mem = v_reserved_mem, > guest_overhead = v_guest_overhead, > rpm_version = v_rpm_version, > software_version = v_software_version, > version_name = v_version_name, > build_name = v_build_name, > previous_status = v_previous_status, > cpu_flags = v_cpu_flags, > vms_cores_count = v_vms_cores_count, > pending_vcpus_count = v_pending_vcpus_count, > pending_vmem_size = v_pending_vmem_size, > cpu_sockets = v_cpu_sockets, > net_config_dirty = v_net_config_dirty, > supported_cluster_levels = v_supported_cluster_levels, > supported_engines = v_supported_engines, > host_os = v_host_os, > kvm_version = v_kvm_version, > libvirt_version = v_libvirt_version, > spice_version = v_spice_version, > gluster_version = v_gluster_version, > librbd1_version = v_librbd1_version, > glusterfs_cli_version = v_glusterfs_cli_version, > openvswitch_version = v_openvswitch_version, > kernel_version = v_kernel_version, > iscsi_initiator_name = v_iscsi_initiator_name, > transparent_hugepages_state = v_transparent_hugepages_state, > hooks = v_hooks, > _update_date = LOCALTIMESTAMP, > non_operational_reason = v_non_operational_reason, > hw_manufacturer = v_hw_manufacturer, > hw_product_name = v_hw_product_name, > hw_version = v_hw_version, > hw_serial_number = v_hw_serial_number, > hw_uuid = v_hw_uuid, > hw_family = v_hw_family, > hbas = v_hbas, > supported_emulated_machines = v_supported_emulated_machines, > kdump_status = v_kdump_status, > selinux_enforce_mode = v_selinux_enforce_mode, > auto_numa_balancing = v_auto_numa_balancing, > is_numa_supported = v_is_numa_supported, > supported_rng_sources = v_supported_rng_sources, > online_cpus = v_online_cpus, > maintenance_reason = v_maintenance_reason, > is_update_available = v_is_update_available, > is_hostdev_enabled = v_is_hostdev_enabled, > kernel_args = v_kernel_args, > pretty_name = v_pretty_name, > hosted_engine_configured = v_hosted_engine_configured, > in_fence_flow = v_in_fence_flow, > kernel_features = v_kernel_features, > vnc_encryption_enabled = v_vnc_encryption_enabled, > connector_info = v_connector_info > WHERE vds_id = v_vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVdsDynamic (v_vds_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > DELETE > FROM vds_dynamic > WHERE vds_id = v_vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVdsDynamic () >RETURNS SETOF vds_dynamic STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT vds_dynamic.* > FROM vds_dynamic; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsDynamicByVdsId (v_vds_id UUID) >RETURNS SETOF vds_dynamic STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT vds_dynamic.* > FROM vds_dynamic > WHERE vds_id = v_vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVdsStatic ( > v_free_text_comment TEXT, > v_vds_id UUID, > v_host_name VARCHAR(255), > v_vds_unique_id VARCHAR(128), > v_port INT, > v_cluster_id UUID, > v_vds_name VARCHAR(255), > v_server_SSL_enabled BOOLEAN, > v_vds_type INT, > v_pm_enabled BOOLEAN, > v_pm_proxy_preferences VARCHAR(255), > v_pm_detect_kdump BOOLEAN, > v_vds_spm_priority INT, > v_sshKeyFingerprint VARCHAR(128), > v_console_address VARCHAR(255), > v_ssh_port INT, > v_ssh_username VARCHAR(255), > v_disable_auto_pm BOOLEAN, > v_host_provider_id UUID, > v_openstack_network_provider_id UUID, > v_kernel_cmdline TEXT, > v_last_stored_kernel_cmdline TEXT, > v_vgpu_placement INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > IF v_vds_unique_id IS NULL > OR NOT EXISTS ( > SELECT vds_name > FROM vds_static > WHERE vds_unique_id = v_vds_unique_id > ) THEN > BEGIN > INSERT INTO vds_static ( > vds_id, > host_name, > free_text_comment, > vds_unique_id, > port, > cluster_id, > vds_name, > server_SSL_enabled, > vds_type, > pm_enabled, > pm_proxy_preferences, > pm_detect_kdump, > vds_spm_priority, > sshKeyFingerprint, > console_address, > ssh_port, > ssh_username, > disable_auto_pm, > host_provider_id, > openstack_network_provider_id, > kernel_cmdline, > last_stored_kernel_cmdline, > vgpu_placement > ) > VALUES ( > v_vds_id, > v_host_name, > v_free_text_comment, > v_vds_unique_id, > v_port, > v_cluster_id, > v_vds_name, > v_server_SSL_enabled, > v_vds_type, > v_pm_enabled, > v_pm_proxy_preferences, > v_pm_detect_kdump, > v_vds_spm_priority, > v_sshKeyFingerprint, > v_console_address, > v_ssh_port, > v_ssh_username, > v_disable_auto_pm, > v_host_provider_id, > v_openstack_network_provider_id, > v_kernel_cmdline, > v_last_stored_kernel_cmdline, > v_vgpu_placement > ); > END; >END IF; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVdsStaticLastStoredKernelCmdline ( > v_vds_id UUID, > v_last_stored_kernel_cmdline TEXT > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > BEGIN > UPDATE vds_static > SET last_stored_kernel_cmdline = v_last_stored_kernel_cmdline > WHERE vds_id = v_vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVdsReinstallRequired ( > v_vds_id UUID, > v_reinstall_required BOOLEAN > ) >RETURNS VOID > AS $PROCEDURE$ >BEGIN > BEGIN > UPDATE vds_static > SET reinstall_required = v_reinstall_required > WHERE vds_id = v_vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVdsStatic ( > v_host_name VARCHAR(255), > v_free_text_comment TEXT, > v_vds_unique_id VARCHAR(128), > v_port INT, > v_cluster_id UUID, > v_vds_id UUID, > v_vds_name VARCHAR(255), > v_server_SSL_enabled BOOLEAN, > v_vds_type INT, > v_pm_enabled BOOLEAN, > v_pm_proxy_preferences VARCHAR(255), > v_pm_detect_kdump BOOLEAN, > v_otp_validity BIGINT, > v_vds_spm_priority INT, > v_sshKeyFingerprint VARCHAR(128), > v_console_address VARCHAR(255), > v_ssh_port INT, > v_ssh_username VARCHAR(255), > v_disable_auto_pm BOOLEAN, > v_host_provider_id UUID, > v_openstack_network_provider_id UUID, > v_kernel_cmdline TEXT, > v_reinstall_required BOOLEAN, > v_vgpu_placement INTEGER >) > RETURNS VOID > >AS $PROCEDURE$ >BEGIN > BEGIN > UPDATE vds_static > SET host_name = v_host_name, > free_text_comment = v_free_text_comment, > vds_unique_id = v_vds_unique_id, > port = v_port, > cluster_id = v_cluster_id, > vds_name = v_vds_name, > server_SSL_enabled = v_server_SSL_enabled, > vds_type = v_vds_type, > _update_date = LOCALTIMESTAMP, > pm_enabled = v_pm_enabled, > pm_proxy_preferences = v_pm_proxy_preferences, > pm_detect_kdump = v_pm_detect_kdump, > otp_validity = v_otp_validity, > vds_spm_priority = v_vds_spm_priority, > sshKeyFingerprint = v_sshKeyFingerprint, > host_provider_id = v_host_provider_id, > openstack_network_provider_id = v_openstack_network_provider_id, > console_address = v_console_address, > ssh_port = v_ssh_port, > ssh_username = v_ssh_username, > disable_auto_pm = v_disable_auto_pm, > kernel_cmdline = v_kernel_cmdline, > reinstall_required = v_reinstall_required, > vgpu_placement = v_vgpu_placement > WHERE vds_id = v_vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVdsStatic (v_vds_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > DELETE > FROM tags_vds_map > WHERE vds_id = v_vds_id; > > -- Delete all Vds Alerts from the database > PERFORM DeleteAuditLogAlertsByVdsID(v_vds_id); > > DELETE > FROM vds_static > WHERE vds_id = v_vds_id; > > -- delete VDS permissions -- > PERFORM DeletePermissionsByEntityId(v_vds_id); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVdsStatic () >RETURNS SETOF vds_static STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_static.* > FROM vds_static; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsStaticByIp (v_ip VARCHAR(40)) >RETURNS SETOF vds_static STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT vds_static.* > FROM vds_static vds_static, > fence_agents fence_agents > WHERE fence_agents.ip = v_ip > AND fence_agents.vds_id = vds_static.vds_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsStaticByHostName (v_host_name VARCHAR(255)) >RETURNS SETOF vds_static STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_static.* > FROM vds_static > WHERE host_name = v_host_name; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsStaticByVdsId (v_vds_id UUID) >RETURNS SETOF vds_static STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_static.* > FROM vds_static > WHERE vds_id = v_vds_id; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsStaticByVdsIds (v_vds_ids UUID[]) >RETURNS SETOF vds_static STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_static.* > FROM vds_static > WHERE vds_id = ANY(v_vds_ids); > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsStaticByVdsName (v_host_name VARCHAR(255)) >RETURNS SETOF vds_static STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_static.* > FROM vds_static > WHERE vds_name = v_host_name; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsByUniqueID (v_vds_unique_id VARCHAR(128)) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT DISTINCT vds.* > FROM vds > WHERE vds_unique_id = v_vds_unique_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsStaticByClusterId (v_cluster_id UUID) >RETURNS SETOF vds_static STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT vds_static.* > FROM vds_static vds_static > WHERE cluster_id = v_cluster_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetUpAndPrioritizedVds (v_storage_pool_id UUID) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT vds.* > FROM vds vds, > cluster cluster > WHERE (vds.status = 3) > AND (vds.storage_pool_id = v_storage_pool_id) > AND ( > vds_spm_priority IS NULL > OR vds_spm_priority > - 1 > ) > AND vds.cluster_id = cluster.cluster_id > AND cluster.virt_service = true > ORDER BY vds_spm_priority DESC, RANDOM(); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVds ( > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT DISTINCT vds.* > FROM vds > WHERE ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vds_permissions_view > WHERE user_id = v_user_id > AND entity_id = vds_id > ) > ); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsByVdsId ( > v_vds_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >DECLARE v_columns TEXT []; > >BEGIN > BEGIN > IF (v_is_filtered) THEN > RETURN QUERY > > SELECT DISTINCT (rec).* > FROM fn_db_mask_object('vds') AS q(rec vds) > WHERE (rec).vds_id = v_vds_id > AND EXISTS ( > SELECT 1 > FROM user_vds_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vds_id > ); > ELSE > > RETURN QUERY > > SELECT DISTINCT vds.* > FROM vds > WHERE vds_id = v_vds_id; > END IF; > > END; > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsWithoutMigratingVmsByClusterId (v_cluster_id UUID) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > -- this sp returns all vds in given cluster that have no pending vms and no vms in migration states > BEGIN > RETURN QUERY > > SELECT DISTINCT vds.* > FROM vds > WHERE cluster_id = v_cluster_id > AND pending_vcpus_count = 0 > AND vds.status = 3 > AND vds_id NOT IN ( > SELECT DISTINCT run_on_vds > FROM vm_dynamic > WHERE status IN ( > 5, > 6, > 11, > 12 > ) > ); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVds (v_vds_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > DELETE > FROM tags_vds_map > WHERE vds_id = v_vds_id; > > -- Delete all Vds Alerts from the database > PERFORM DeleteAuditLogAlertsByVdsID(v_vds_id); > > DELETE > FROM vds_statistics > WHERE vds_id = v_vds_id; > > DELETE > FROM vds_dynamic > WHERE vds_id = v_vds_id; > > DELETE > FROM vds_static > WHERE vds_id = v_vds_id; > > PERFORM DeletePermissionsByEntityId(v_vds_id); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsByType (v_vds_type INT) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT DISTINCT vds.* > FROM vds > WHERE vds_type = v_vds_type; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsByName (v_vds_name VARCHAR(255)) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT DISTINCT vds.* > FROM vds > WHERE vds_name = v_vds_name; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsByHostName (v_host_name VARCHAR(255)) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT DISTINCT vds.* > FROM vds > WHERE host_name = v_host_name; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsByClusterId ( > v_cluster_id UUID, > v_user_id UUID, > v_is_filtered boolean > ) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > -- this sp returns all vds for a given cluster > BEGIN > IF (v_is_filtered) THEN > RETURN QUERY > > SELECT DISTINCT (rec).* > FROM fn_db_mask_object('vds') AS q(rec vds) > WHERE (rec).cluster_id = v_cluster_id > AND EXISTS ( > SELECT 1 > FROM user_vds_permissions_view > WHERE user_id = v_user_id > AND entity_id = (rec).vds_id > );ELSE > > RETURN QUERY > > SELECT DISTINCT vds.* > FROM vds > WHERE cluster_id = v_cluster_id; > END IF; > > END; > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsByStoragePoolId ( > v_storage_pool_id UUID, > v_user_id UUID, > v_is_filtered boolean > ) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT DISTINCT vds.* > FROM vds > WHERE storage_pool_id = v_storage_pool_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vds_permissions_view > WHERE user_id = v_user_id > AND entity_id = vds_id > ) > ); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getVdsForClusterWithStatus ( > v_cluster_id UUID, > v_status INT > ) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT vds.* > FROM vds > WHERE (status = v_status) > AND (cluster_id = v_cluster_id) > ORDER BY vds.vds_id ASC; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getVdsForClusterWithPeerStatus ( > v_cluster_id UUID, > v_status INT, > v_peer_status VARCHAR(50) > ) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT vds.* > FROM vds > INNER JOIN gluster_server > ON vds_id = server_id > WHERE (status = v_status) > AND (peer_status = v_peer_status) > AND (cluster_id = v_cluster_id) > ORDER BY vds.vds_id ASC; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getVdsByStoragePoolIdWithStatuses( > v_storage_pool_id UUID, > v_statuses VARCHAR(150)) >RETURNS SETOF vds STABLE > AS $procedure$ >BEGIN > BEGIN > RETURN QUERY > SELECT vds.* > FROM vds > INNER JOIN cluster cluster > ON vds.cluster_id = cluster.cluster_id > WHERE (v_statuses IS NULL > OR vds.status IN ( > SELECT * > FROM fnSplitterInteger(v_statuses))) > AND (vds.storage_pool_id = v_storage_pool_id) > AND cluster.virt_service = true; > END; > RETURN; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getHostsForStorageOperation ( > v_storage_pool_id UUID, > v_local_fs_only BOOLEAN > ) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT vds.* > FROM vds > LEFT JOIN cluster vg > ON vds.cluster_id = vg.cluster_id > LEFT JOIN storage_pool sp > ON vds.storage_pool_id = sp.id > WHERE ( > v_storage_pool_id IS NULL > OR vds.storage_pool_id = v_storage_pool_id > ) > AND (vg.virt_service = true) > AND ( > NOT v_local_fs_only > OR sp.is_local = true > ) > AND ( > v_storage_pool_id IS NOT NULL > OR vds.status = 3 > );-- if DC is unspecified return only hosts with status = UP > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVdsDynamicStatus ( > v_vds_guid UUID, > v_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vds_dynamic > SET status = v_status > WHERE vds_id = v_vds_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVdsDynamicStatusAndReasons ( > v_vds_guid UUID, > v_status INT, > v_non_operational_reason INT, > v_maintenance_reason TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vds_dynamic > SET status = v_status, > non_operational_reason = v_non_operational_reason, > maintenance_reason = v_maintenance_reason > WHERE vds_id = v_vds_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateHostExternalStatus ( > v_vds_guid UUID, > v_external_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vds_dynamic > SET external_status = v_external_status > WHERE vds_id = v_vds_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVdsDynamicNetConfigDirty ( > v_vds_guid UUID, > v_net_config_dirty BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vds_dynamic > SET net_config_dirty = v_net_config_dirty > WHERE vds_id = v_vds_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVdsDynamicIsUpdateAvailable ( > v_vds_guid UUID, > v_is_update_available BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vds_dynamic > SET is_update_available = v_is_update_available > WHERE vds_id = v_vds_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsByNetworkId (v_network_id UUID) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vds > WHERE EXISTS ( > SELECT 1 > FROM vds_interface > INNER JOIN network > ON network.name = vds_interface.network_name > INNER JOIN network_cluster > ON network.id = network_cluster.network_id > WHERE network_id = v_network_id > AND vds.cluster_id = network_cluster.cluster_id > AND vds_interface.vds_id = vds.vds_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVdsWithoutNetwork (v_network_id UUID) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds.* > FROM vds > INNER JOIN network_cluster > ON vds.cluster_id = network_cluster.cluster_id > WHERE network_cluster.network_id = v_network_id > AND NOT EXISTS ( > SELECT 1 > FROM vds_interface > INNER JOIN network > ON network.name = vds_interface.network_name > INNER JOIN network_cluster > ON network.id = network_cluster.network_id > WHERE network_cluster.network_id = v_network_id > AND vds.cluster_id = network_cluster.cluster_id > AND vds_interface.vds_id = vds.vds_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateCpuFlags ( > v_vds_id UUID, > v_cpu_flags VARCHAR(4000) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vds_dynamic > SET cpu_flags = v_cpu_flags > WHERE vds_id = v_vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetIdsOfHostsWithStatus (v_status INT) >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vds_id > FROM vds_dynamic > WHERE status = v_status; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getFirstUpRhelForClusterId (v_cluster_id UUID) >RETURNS SETOF vds STABLE AS $PROCEDURE$ >BEGIN > BEGIN > -- both centos and RHEL return RHEL as host_os > RETURN QUERY > > SELECT * > FROM vds > WHERE ( > host_os LIKE 'RHEL%' > OR host_os LIKE 'oVirt Node%' > OR host_os LIKE 'RHEV Hypervisor%' > ) > AND status = 3 > AND cluster_id = v_cluster_id LIMIT 1; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetNamesOfHostsDedicatedToVm (v_vm_guid UUID) >RETURNS SETOF VARCHAR STABLE AS $PROCEDURE$ >BEGIN > BEGIN > RETURN QUERY > > SELECT vds_name > FROM vm_host_pinning_view > WHERE vm_id = v_vm_guid; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION CheckIfExistsHostThatMissesNetworkInCluster( > v_cluster_id UUID, > v_network_name VARCHAR(50), > v_host_status INT > ) >RETURNS BOOLEAN STABLE AS $PROCEDURE$ >BEGIN > RETURN EXISTS ( > SELECT 1 > FROM vds_static > JOIN vds_dynamic ON vds_static.vds_id = vds_dynamic.vds_id > WHERE vds_static.cluster_id = v_cluster_id > AND vds_dynamic.status = v_host_status > AND NOT EXISTS(SELECT 1 > FROM vds_interface > WHERE vds_static.vds_id = vds_interface.vds_id > AND vds_interface.network_name = v_network_name) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION CheckIfExistsHostWithStatusInCluster( > v_cluster_id UUID, > v_host_status INT > ) >RETURNS BOOLEAN STABLE AS $PROCEDURE$ >BEGIN > RETURN EXISTS ( > SELECT 1 > FROM vds_static > JOIN vds_dynamic ON vds_static.vds_id = vds_dynamic.vds_id > WHERE vds_static.cluster_id = v_cluster_id > AND vds_dynamic.status = v_host_status > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,914+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vm_backups_sp.sql... >2019-02-26 17:06:41,916+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vm_backups_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmBackupByVmBackupId (v_backup_id UUID) >RETURNS SETOF vm_backups STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_backups > WHERE backup_id = v_backup_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmBackup ( > v_backup_id UUID, > v_from_checkpoint_id UUID, > v_to_checkpoint_id UUID, > v_vm_id UUID, > v_phase TEXT, > v__create_date TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_backups ( > backup_id, > from_checkpoint_id, > to_checkpoint_id, > vm_id, > phase, > _create_date > ) > VALUES ( > v_backup_id, > v_from_checkpoint_id, > v_to_checkpoint_id, > v_vm_id, > v_phase, > v__create_date > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmBackup ( > v_backup_id UUID, > v_from_checkpoint_id UUID, > v_to_checkpoint_id UUID, > v_vm_id UUID, > v_phase TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_backups > SET backup_id = v_backup_id, > from_checkpoint_id = v_from_checkpoint_id, > to_checkpoint_id = v_to_checkpoint_id, > vm_id = v_vm_id, > phase = v_phase > WHERE backup_id = v_backup_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmBackup (v_backup_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_backups > WHERE backup_id = v_backup_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmBackups () >RETURNS SETOF vm_backups STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_backups; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmBackupsByVmId (v_vm_id UUID) >RETURNS SETOF vm_backups STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_backups > WHERE vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmBackupDiskMap ( > v_backup_id UUID, > v_disk_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > INSERT INTO vm_backup_disk_map ( > backup_id, > disk_id > ) > VALUES ( > v_backup_id, > v_disk_id > ); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmBackupDiskMap ( > v_backup_id UUID, > v_disk_id UUID, > v_backup_url TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_backup_disk_map > SET backup_id = v_backup_id, > disk_id = v_disk_id, > backup_url = v_backup_url > WHERE backup_id = v_backup_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllVmBackupDiskMapByVmBackupId (v_backup_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > DELETE > FROM vm_backup_disk_map > WHERE backup_id = v_backup_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDisksByVmBackupId (v_backup_id UUID) >RETURNS SETOF images_storage_domain_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT images_storage_domain_view.* > FROM images_storage_domain_view > JOIN vm_backup_disk_map on vm_backup_disk_map.disk_id = images_storage_domain_view.image_group_id > WHERE images_storage_domain_view.active AND vm_backup_disk_map.backup_id = v_backup_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,941+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vm_checkpoints_sp.sql... >2019-02-26 17:06:41,944+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vm_checkpoints_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmCheckpointByVmCheckpointId (v_checkpoint_id UUID) >RETURNS SETOF vm_backups STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_checkpoints > WHERE checkpoint_id = v_checkpoint_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmCheckpoint ( > v_checkpoint_id UUID, > v_vm_id UUID, > v_parent_id UUID, > v__create_date TIMESTAMP WITH TIME ZONE > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_checkpoints ( > checkpoint_id, > vm_id, > parent_id, > _create_date > ) > VALUES ( > v_checkpoint_id, > v_vm_id, > v_parent_id, > v__create_date > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmCheckpoint (v_checkpoint_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_checkpoints > WHERE checkpoint_id = v_checkpoint_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmCheckpoints () >RETURNS SETOF vm_checkpoints STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_checkpoints; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmCheckpointsByVmId (v_vm_id UUID) >RETURNS SETOF vm_checkpoints STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY WITH RECURSIVE checkpoint_list AS ( > SELECT * > FROM vm_checkpoints > WHERE vm_id = v_vm_id AND parent_id is NULL > UNION ALL > SELECT vm_checkpoints.* > FROM vm_checkpoints > JOIN checkpoint_list ON > checkpoint_list.checkpoint_id = vm_checkpoints.parent_id AND > checkpoint_list.vm_id = vm_checkpoints.vm_id > ) > SELECT * > FROM checkpoint_list; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmCheckpointDiskMap ( > v_checkpoint_id UUID, > v_disk_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > INSERT INTO vm_checkpoint_disk_map ( > checkpoint_id, > disk_id > ) > VALUES ( > v_checkpoint_id, > v_disk_id > ); > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllVmCheckpointDiskMapByVmCheckpointId (v_backup_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > BEGIN > DELETE > FROM vm_checkpoint_disk_map > WHERE checkpoint_id = v_checkpoint_id; > END; > > RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetDisksByVmCheckpointId (v_checkpoint_id UUID) >RETURNS SETOF images_storage_domain_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT images_storage_domain_view.* > FROM images_storage_domain_view > JOIN vm_checkpoint_disk_map on vm_checkpoint_disk_map.disk_id = images_storage_domain_view.image_group_id > WHERE images_storage_domain_view.active AND vm_checkpoint_disk_map.checkpoint_id = v_checkpoint_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:41,967+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vm_device_sp.sql... >2019-02-26 17:06:41,970+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vm_device_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmDevice ( > v_device_id UUID, > v_vm_id UUID, > v_device VARCHAR(30), > v_type VARCHAR(30), > v_address VARCHAR(255), > v_spec_params TEXT, > v_is_managed boolean, > v_is_plugged boolean, > v_is_readonly boolean, > v_alias VARCHAR(255), > v_custom_properties TEXT, > v_snapshot_id uuid, > v_logical_name VARCHAR(255), > v_host_device VARCHAR(255) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_device ( > device_id, > vm_id, > device, > type, > address, > spec_params, > is_managed, > is_plugged, > is_readonly, > alias, > custom_properties, > snapshot_id, > logical_name, > host_device > ) > VALUES ( > v_device_id, > v_vm_id, > v_device, > v_type, > v_address, > v_spec_params, > v_is_managed, > v_is_plugged, > v_is_readonly, > v_alias, > v_custom_properties, > v_snapshot_id, > v_logical_name, > v_host_device > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmDevice ( > v_device_id UUID, > v_vm_id UUID, > v_device VARCHAR(30), > v_type VARCHAR(30), > v_address VARCHAR(255), > v_spec_params TEXT, > v_is_managed boolean, > v_is_plugged boolean, > v_is_readonly boolean, > v_alias VARCHAR(255), > v_custom_properties TEXT, > v_snapshot_id uuid, > v_logical_name VARCHAR(255), > v_host_device VARCHAR(255) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_device > SET device = v_device, > type = v_type, > address = v_address, > spec_params = v_spec_params, > is_managed = v_is_managed, > is_plugged = v_is_plugged, > is_readonly = v_is_readonly, > alias = v_alias, > custom_properties = v_custom_properties, > snapshot_id = v_snapshot_id, > logical_name = v_logical_name, > host_device = v_host_device, > _update_date = current_timestamp > WHERE device_id = v_device_id > AND vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmDeviceRuntimeInfo ( > v_device_id UUID, > v_vm_id UUID, > v_address VARCHAR(255), > v_alias VARCHAR(255) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_device > SET address = v_address, > alias = v_alias, > _update_date = current_timestamp > WHERE device_id = v_device_id > AND vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmDeviceForHotPlugDisk ( > v_device_id UUID, > v_vm_id UUID, > v_is_plugged boolean, > v_alias VARCHAR(255) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_device > SET is_plugged = v_is_plugged, > alias = (CASE WHEN length(v_alias) != 0 > THEN v_alias > ELSE alias > END), > _update_date = current_timestamp > WHERE device_id = v_device_id > AND vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmDevice ( > v_device_id UUID, > v_vm_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_device > WHERE device_id = v_device_id > AND ( > v_vm_id IS NULL > OR vm_id = v_vm_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmDevicesByVmIdAndType ( > v_vm_id UUID, > v_type VARCHAR(30) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_device > WHERE vm_id = v_vm_id > AND type = v_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmDevice () >RETURNS SETOF vm_device_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_device_view; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmDeviceByDeviceId ( > v_device_id UUID, > v_vm_id UUID > ) >RETURNS SETOF vm_device_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_device_view > WHERE device_id = v_device_id > AND ( > v_vm_id IS NULL > OR vm_id = v_vm_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmDeviceByVmId ( > v_vm_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF vm_device_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_device_view > WHERE vm_id = v_vm_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vm_id > ) > ) > ORDER BY device_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmDeviceByVmIdAndType ( > v_vm_id UUID, > v_type VARCHAR(30) > ) >RETURNS SETOF vm_device_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_device_view > WHERE vm_id = v_vm_id > AND type = v_type > ORDER BY NULLIF(alias, '') NULLS LAST; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmDeviceByVmIdTypeAndDevice ( > v_vm_id UUID, > v_type VARCHAR(30), > v_device VARCHAR(30), > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF vm_device_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_device_view > WHERE vm_id = v_vm_id > AND type = v_type > AND device = v_device > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vm_id > UNION > SELECT 1 > FROM user_vm_template_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vm_id > ) > ) > ORDER BY NULLIF(alias, '') NULLS LAST; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmDeviceByTypeAndDevice ( > v_vm_ids UUID[], > v_type VARCHAR(30), > v_device VARCHAR(30), > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF vm_device_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_device_view > WHERE vm_id = ANY(v_vm_ids) > AND type = v_type > AND device = v_device > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id > AND entity_id = vm_id > ) > ) > ORDER BY NULLIF(alias, '') NULLS LAST; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmUnmanagedDevicesByVmId (v_vm_id UUID) >RETURNS SETOF vm_device_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_device_view.* > FROM vm_device_view > WHERE vm_id = v_vm_id > AND NOT is_managed; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION isMemBalloonEnabled (v_vm_id UUID) >RETURNS boolean STABLE AS $BODY$ > >DECLARE result boolean := false; > >BEGIN > IF EXISTS ( > SELECT 1 > FROM vm_device > WHERE vm_id = v_vm_id > AND type = 'balloon' > AND device = 'memballoon' > ) THEN result := true; > END IF; > RETURN result; >END;$BODY$ >LANGUAGE 'plpgsql'; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION clearVmDeviceAddress (v_device_id UUID) >RETURNS VOID AS $BODY$ > >BEGIN > UPDATE vm_device > SET address = '' > WHERE device_id = v_device_id; >END;$BODY$ >LANGUAGE 'plpgsql'; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION clearAllDeviceAddressesByVmId (v_vm_id UUID) >RETURNS VOID AS $BODY$ > >BEGIN > UPDATE vm_device > SET address = '' > WHERE vm_id = v_vm_id; >END;$BODY$ >LANGUAGE 'plpgsql'; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION removeAllUnmanagedDevicesByVmId (v_vm_id UUID) >RETURNS VOID AS $BODY$ > >BEGIN > DELETE FROM vm_device > WHERE vm_id = v_vm_id > AND NOT is_managed; >END;$BODY$ >LANGUAGE 'plpgsql'; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION ExistsVmDeviceByVmIdAndType ( > v_vm_id UUID, > v_type VARCHAR(30) > ) >RETURNS BOOLEAN STABLE AS $PROCEDURE$ >BEGIN > RETURN EXISTS ( > SELECT 1 > FROM vm_device > WHERE vm_id = v_vm_id > AND type = v_type > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmDeviceByType (v_type VARCHAR(30)) >RETURNS SETOF vm_device_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_device_view > WHERE type = v_type; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:42,001+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vm_icons_sp.sql... >2019-02-26 17:06:42,004+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vm_icons_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmIconByVmIconId (v_id UUID) >RETURNS SETOF vm_icons STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_icons > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmIcons () >RETURNS SETOF vm_icons STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_icons; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmIconsFiltered ( > v_user_id UUID, > v_is_filtered boolean > ) >RETURNS SETOF vm_icons STABLE AS $PROCEDURE$ >BEGIN > IF v_is_filtered THEN > RETURN QUERY > > -- icons associated with owned vms and templates > SELECT DISTINCT vm_icons.* > FROM ( > SELECT * > FROM user_vm_template_permissions_view > > UNION > > SELECT * > FROM user_vm_permissions_view > ) AS permissions, > vm_static, > vm_icons > WHERE permissions.entity_id = vm_static.vm_guid > AND vm_static.entity_type IN ( > 'TEMPLATE', > 'VM' > ) > AND ( > vm_icons.id = vm_static.small_icon_id > OR vm_icons.id = vm_static.large_icon_id > ) > AND permissions.user_id = v_user_id > > UNION > > -- predefined icons > SELECT vm_icons.* > FROM vm_icons, > vm_icon_defaults > WHERE vm_icon_defaults.small_icon_id = vm_icons.id > OR vm_icon_defaults.large_icon_id = vm_icons.id;ELSE > > RETURN QUERY > > SELECT * > FROM vm_icons; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmIcon ( > v_id UUID, > v_data_url TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_icons ( > id, > data_url > ) > VALUES ( > v_id, > v_data_url > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmIcon ( > v_id UUID, > v_data_url TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_icons > SET id = v_id, > data_url = v_data_url > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmIcon (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_icons > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmIconByVmIconDataUrl (v_data_url TEXT) >RETURNS SETOF vm_icons STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_icons > WHERE data_url = v_data_url; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmIconIfUnused (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_icons > WHERE id = v_id > AND NOT EXISTS ( > SELECT 1 > FROM vm_icon_defaults > WHERE vm_icon_defaults.small_icon_id = vm_icons.id > OR vm_icon_defaults.large_icon_id = vm_icons.id > ) > AND NOT EXISTS ( > SELECT 1 > FROM vm_static > WHERE vm_static.small_icon_id = vm_icons.id > OR vm_static.large_icon_id = vm_icons.id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllUnusedVmIcons () >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_icons > WHERE NOT EXISTS ( > SELECT 1 > FROM vm_icon_defaults > WHERE vm_icon_defaults.small_icon_id = vm_icons.id > OR vm_icon_defaults.large_icon_id = vm_icons.id > ) > AND NOT EXISTS ( > SELECT 1 > FROM vm_static > WHERE vm_static.small_icon_id = vm_icons.id > OR vm_static.large_icon_id = vm_icons.id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION IsVmIconExist (v_id UUID) >RETURNS BOOLEAN STABLE AS $PROCEDURE$ >BEGIN > RETURN ( > SELECT EXISTS ( > SELECT 1 > FROM vm_icons > WHERE id = v_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmIconDefaultByVmIconDefaultId (v_id UUID) >RETURNS SETOF vm_icon_defaults STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_icon_defaults > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmIconDefaults () >RETURNS SETOF vm_icon_defaults STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_icon_defaults; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmIconDefault ( > v_id UUID, > v_os_id INT, > v_small_icon_id UUID, > v_large_icon_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_icon_defaults ( > id, > os_id, > small_icon_id, > large_icon_id > ) > VALUES ( > v_id, > v_os_id, > v_small_icon_id, > v_large_icon_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmIconDefault ( > v_id UUID, > v_os_id INT, > v_small_icon_id UUID, > v_large_icon_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_icon_defaults > SET id = v_id, > os_id = v_os_id, > small_icon_id = v_small_icon_id, > large_icon_id = v_large_icon_id > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmIconDefault (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_icon_defaults > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmIconDefaultByVmIconDefaultLargeIconId (v_large_icon_id UUID) >RETURNS SETOF vm_icon_defaults STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_icon_defaults > WHERE large_icon_id = v_large_icon_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmIconDefaultByVmIconDefaultOsId (v_os_id INT) >RETURNS SETOF vm_icon_defaults STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_icon_defaults > WHERE os_id = v_os_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteAllFromVmIconDefaults () >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_icon_defaults; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:42,033+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vm_interface_filter_parameters_sp.sql... >2019-02-26 17:06:42,036+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vm_interface_filter_parameters_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmInterfaceFilterParameterByVmInterfaceFilterParameterId (v_id UUID) >RETURNS SETOF vm_interface_filter_parameters STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_interface_filter_parameters.* > FROM vm_interface_filter_parameters > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmInterfaceFilterParameters () >RETURNS SETOF vm_interface_filter_parameters STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_interface_filter_parameters.* > FROM vm_interface_filter_parameters; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmInterfaceFilterParametersByVmInterfaceId (v_vm_interface_id UUID) >RETURNS SETOF vm_interface_filter_parameters STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_interface_filter_parameters.* > FROM vm_interface_filter_parameters > WHERE vm_interface_id = v_vm_interface_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmInterfaceFilterParameter ( > v_id UUID, > v_name VARCHAR(255), > v_value VARCHAR(255), > v_vm_interface_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_interface_filter_parameters ( > id, > name, > value, > vm_interface_id > ) > VALUES ( > v_id, > v_name, > v_value, > v_vm_interface_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmInterfaceFilterParameter ( > v_id UUID, > v_name VARCHAR(255), > v_value VARCHAR(255) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_interface_filter_parameters > SET name = v_name, > value = v_value > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmInterfaceFilterParameter (v_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > DELETE > FROM vm_interface_filter_parameters > WHERE id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:42,057+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vm_jobs_sp.sql... >2019-02-26 17:06:42,060+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vm_jobs_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllVmJobs () >RETURNS SETOF vm_jobs STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_jobs.* > FROM vm_jobs; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmJobs ( > v_vm_job_id UUID, > v_vm_id UUID, > v_job_state INT, > v_job_type INT, > v_block_job_type INT, > v_bandwidth INT, > v_cursor_cur BIGINT, > v_cursor_end BIGINT, > v_image_group_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_jobs > SET vm_job_id = v_vm_job_id, > vm_id = v_vm_id, > job_state = v_job_state, > job_type = v_job_type, > block_job_type = v_block_job_type, > bandwidth = v_bandwidth, > cursor_cur = v_cursor_cur, > cursor_end = v_cursor_end, > image_group_id = v_image_group_id > WHERE vm_job_id = v_vm_job_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmJobs (v_vm_job_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_jobs > WHERE vm_job_id = v_vm_job_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmJobs ( > v_vm_job_id UUID, > v_vm_id UUID, > v_job_state INT, > v_job_type INT, > v_block_job_type INT, > v_bandwidth INT, > v_cursor_cur BIGINT, > v_cursor_end BIGINT, > v_image_group_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_jobs ( > vm_job_id, > vm_id, > job_state, > job_type, > block_job_type, > bandwidth, > cursor_cur, > cursor_end, > image_group_id > ) > VALUES ( > v_vm_job_id, > v_vm_id, > v_job_state, > v_job_type, > v_block_job_type, > v_bandwidth, > v_cursor_cur, > v_cursor_end, > v_image_group_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:42,081+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vm_pool_maps_sp.sql... >2019-02-26 17:06:42,083+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vm_pool_maps_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVm_pool_map ( > v_vm_guid UUID, > v_vm_pool_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_pool_map ( > vm_guid, > vm_pool_id > ) > VALUES ( > v_vm_guid, > v_vm_pool_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVm_pool_map ( > v_vm_guid UUID, > v_vm_pool_id UUID > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE vm_pool_map > SET vm_pool_id = v_vm_pool_id > WHERE vm_guid = v_vm_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVm_pool_map (v_vm_guid UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val VARCHAR(50); > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT vm_guid > INTO v_val > FROM vm_pool_map > WHERE vm_guid = v_vm_guid > FOR UPDATE; > > DELETE > FROM vm_pool_map > WHERE vm_guid = v_vm_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVm_pool_map () >RETURNS SETOF vm_pool_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_pool_map.* > FROM vm_pool_map; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVm_pool_mapByvm_pool_id (v_vm_pool_id UUID) >RETURNS SETOF vm_pool_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_pool_map.* > FROM vm_pool_map > INNER JOIN vm_static > ON vm_pool_map.vm_guid = vm_static.vm_guid > WHERE vm_pool_id = v_vm_pool_id > ORDER BY vm_static.vm_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION getVmMapsInVmPoolByVmPoolIdAndStatus ( > v_vm_pool_id UUID, > v_status INT > ) >RETURNS SETOF vm_pool_map STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_pool_id, > vm_pool_map.vm_guid > FROM vm_pool_map, > vm_dynamic > WHERE vm_pool_map.vm_guid = vm_dynamic.vm_guid > AND vm_pool_id = v_vm_pool_id > AND vm_dynamic.status = v_status; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:42,106+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vm_pools_sp.sql... >2019-02-26 17:06:42,108+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vm_pools_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVm_pools ( > v_vm_pool_description VARCHAR(4000), > v_vm_pool_comment TEXT, > v_vm_pool_id UUID, > v_vm_pool_name VARCHAR(255), > v_vm_pool_type INT, > v_stateful BOOLEAN, > v_parameters VARCHAR(200), > v_prestarted_vms INT, > v_cluster_id UUID, > v_max_assigned_vms_per_user SMALLINT, > v_spice_proxy VARCHAR(255), > v_is_auto_storage_select BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_pools ( > vm_pool_id, > vm_pool_description, > vm_pool_comment, > vm_pool_name, > vm_pool_type, > stateful, > parameters, > prestarted_vms, > cluster_id, > max_assigned_vms_per_user, > spice_proxy, > is_auto_storage_select > ) > VALUES ( > v_vm_pool_id, > v_vm_pool_description, > v_vm_pool_comment, > v_vm_pool_name, > v_vm_pool_type, > v_stateful, > v_parameters, > v_prestarted_vms, > v_cluster_id, > v_max_assigned_vms_per_user, > v_spice_proxy, > v_is_auto_storage_select > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVm_pools ( > v_vm_pool_description VARCHAR(4000), > v_vm_pool_comment TEXT, > v_vm_pool_id UUID, > v_vm_pool_name VARCHAR(255), > v_vm_pool_type INT, > v_stateful BOOLEAN, > v_parameters VARCHAR(200), > v_prestarted_vms INT, > v_cluster_id UUID, > v_max_assigned_vms_per_user SMALLINT, > v_spice_proxy VARCHAR(255), > v_is_auto_storage_select BOOLEAN > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE vm_pools > SET vm_pool_description = v_vm_pool_description, > vm_pool_comment = v_vm_pool_comment, > vm_pool_name = v_vm_pool_name, > vm_pool_type = v_vm_pool_type, > stateful = v_stateful, > parameters = v_parameters, > prestarted_vms = v_prestarted_vms, > cluster_id = v_cluster_id, > max_assigned_vms_per_user = v_max_assigned_vms_per_user, > spice_proxy = v_spice_proxy, > is_auto_storage_select = v_is_auto_storage_select > WHERE vm_pool_id = v_vm_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVm_pools (v_vm_pool_id UUID) >RETURNS VOID AS $PROCEDURE$ >DECLARE v_val UUID; > >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT vm_pool_id > INTO v_val > FROM vm_pools > WHERE vm_pool_id = v_vm_pool_id > FOR > > UPDATE; > > DELETE > FROM vm_pools > WHERE vm_pool_id = v_vm_pool_id; > > -- delete VmPool permissions -- > PERFORM DeletePermissionsByEntityId(v_vm_pool_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION SetVmPoolBeingDestroyed ( > v_vm_pool_id UUID, > v_is_being_destroyed BOOLEAN > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_pools > SET is_being_destroyed = v_is_being_destroyed > WHERE vm_pool_id = v_vm_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS GetAllFromVm_pools_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE type GetAllFromVm_pools_rs AS ( > vm_pool_id UUID, > assigned_vm_count INT, > vm_running_count INT, > vm_pool_description VARCHAR(4000), > vm_pool_comment TEXT, > vm_pool_name VARCHAR(255), > vm_pool_type INT, > stateful BOOLEAN, > parameters VARCHAR(200), > prestarted_vms INT, > cluster_id UUID, > cluster_name VARCHAR(40), > max_assigned_vms_per_user SMALLINT, > spice_proxy VARCHAR(255), > is_being_destroyed BOOLEAN, > is_auto_storage_select BOOLEAN > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVm_pools () >RETURNS SETOF GetAllFromVm_pools_rs AS $PROCEDURE$ >BEGIN > -- BEGIN TRAN > BEGIN > CREATE TEMPORARY TABLE tt_VM_POOL_GROUP ( > vm_pool_id UUID, > assigned_vm_count INT > ) > WITH OIDS; > > exception when others then > > TRUNCATE TABLE tt_VM_POOL_GROUP; > END; > > INSERT INTO tt_VM_POOL_GROUP ( > vm_pool_id, > assigned_vm_count > ) > SELECT vm_pools_view.vm_pool_id, > count(vm_pool_map.vm_pool_id) > FROM vm_pools_view > LEFT JOIN vm_pool_map > ON vm_pools_view.vm_pool_id = vm_pool_map.vm_pool_id > GROUP BY vm_pools_view.vm_pool_id, > vm_pool_map.vm_pool_id; > > BEGIN > CREATE TEMPORARY TABLE tt_VM_POOL_RUNNING ( > vm_pool_id UUID, > vm_running_count INT > ) > WITH OIDS; > > exception when others then > > TRUNCATE TABLE tt_VM_POOL_RUNNING; > END; > > INSERT INTO tt_VM_POOL_RUNNING ( > vm_pool_id, > vm_running_count > ) > SELECT vm_pools_view.vm_pool_id, > count(vm_pools_view.vm_pool_id) > FROM vm_pools_view > LEFT JOIN vm_pool_map > ON vm_pools_view.vm_pool_id = vm_pool_map.vm_pool_id > LEFT JOIN vm_dynamic > ON vm_pool_map.vm_guid = vm_dynamic.vm_guid > WHERE vm_dynamic.status > 0 > GROUP BY vm_pools_view.vm_pool_id; > > BEGIN > CREATE TEMPORARY TABLE tt_VM_POOL_PRERESULT ( > vm_pool_id UUID, > assigned_vm_count INT, > vm_running_count INT > ) > WITH OIDS; > > exception when others then > > TRUNCATE TABLE tt_VM_POOL_PRERESULT; > END; > > INSERT INTO tt_VM_POOL_PRERESULT ( > vm_pool_id, > assigned_vm_count, > vm_running_count > ) > SELECT pg.vm_pool_id, > pg.assigned_vm_count, > pr.vm_running_count > FROM tt_VM_POOL_GROUP pg > LEFT JOIN tt_VM_POOL_RUNNING pr > ON pg.vm_pool_id = pr.vm_pool_id; > > UPDATE tt_VM_POOL_PRERESULT > SET vm_running_count = 0 > WHERE vm_running_count IS NULL; > > BEGIN > CREATE TEMPORARY TABLE tt_VM_POOL_RESULT ( > vm_pool_id UUID, > assigned_vm_count INT, > vm_running_count INT, > vm_pool_description VARCHAR(4000), > vm_pool_comment TEXT, > vm_pool_name VARCHAR(255), > vm_pool_type INT, > stateful BOOLEAN, > parameters VARCHAR(200), > prestarted_vms INT, > cluster_id UUID, > cluster_name VARCHAR(40), > max_assigned_vms_per_user SMALLINT, > spice_proxy VARCHAR(255), > is_being_destroyed BOOLEAN, > is_auto_storage_select BOOLEAN > ) > WITH OIDS; > > exception when others then > > TRUNCATE TABLE tt_VM_POOL_RESULT; > END; > > INSERT INTO tt_VM_POOL_RESULT ( > vm_pool_id, > assigned_vm_count, > vm_running_count, > vm_pool_description, > vm_pool_comment, > vm_pool_name, > vm_pool_type, > stateful, > parameters, > prestarted_vms, > cluster_id, > cluster_name, > max_assigned_vms_per_user, > spice_proxy, > is_being_destroyed, > is_auto_storage_select > ) > SELECT ppr.vm_pool_id, > ppr.assigned_vm_count, > ppr.vm_running_count, > p.vm_pool_description, > p.vm_pool_comment, > p.vm_pool_name, > p.vm_pool_type, > p.stateful, > p.parameters, > p.prestarted_vms, > p.cluster_id, > p.cluster_name, > p.max_assigned_vms_per_user, > p.spice_proxy, > p.is_being_destroyed, > p.is_auto_storage_select > FROM tt_VM_POOL_PRERESULT ppr > INNER JOIN vm_pools_view p > ON ppr.vm_pool_id = p.vm_pool_id; > > RETURN QUERY > > SELECT * > FROM tt_VM_POOL_RESULT; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVm_poolsByvm_pool_id ( > v_vm_pool_id UUID, > v_user_id UUID, > v_is_filtered BOOLEAN > ) >RETURNS SETOF vm_pools_full_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_pools_full_view.* > FROM vm_pools_full_view > WHERE vm_pool_id = v_vm_pool_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_pool_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vm_pool_id > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVm_poolsByvm_pool_name (v_vm_pool_name VARCHAR(255)) >RETURNS SETOF vm_pools_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_pools_view.* > FROM vm_pools_view > WHERE vm_pool_name = v_vm_pool_name; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllVm_poolsByUser_id (v_user_id UUID) >RETURNS SETOF vm_pools_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT vm_pools_view.* > FROM users_and_groups_to_vm_pool_map_view > INNER JOIN vm_pools_view > ON users_and_groups_to_vm_pool_map_view.vm_pool_id = vm_pools_view.vm_pool_id > WHERE (users_and_groups_to_vm_pool_map_view.user_id = v_user_id); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmPoolsFilteredAndSorted (v_user_id UUID, v_offset int, v_limit int) >RETURNS SETOF vm_pools_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT pools.* > FROM vm_pools_view pools > INNER JOIN user_vm_pool_permissions_view > ON user_id = v_user_id > AND entity_id = pools.vm_pool_id > ORDER BY pools.vm_pool_name ASC > LIMIT v_limit OFFSET v_offset; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVm_poolsByAdGroup_names (v_ad_group_names VARCHAR(4000)) >RETURNS SETOF vm_pools_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT vm_pools_view.* > FROM ad_groups > INNER JOIN users_and_groups_to_vm_pool_map_view > ON ad_groups.id = users_and_groups_to_vm_pool_map_view.user_id > INNER JOIN vm_pools_view > ON users_and_groups_to_vm_pool_map_view.vm_pool_id = vm_pools_view.vm_pool_id > WHERE ( > ad_groups.name IN ( > SELECT Id > FROM fnSplitter(v_ad_group_names) > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmDataFromPoolByPoolId ( > v_pool_id uuid, > v_user_id uuid, > v_is_filtered boolean > ) >RETURNS SETOF vms STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vms.* > FROM vms > WHERE vm_pool_id = v_pool_id > AND ( > NOT v_is_filtered > OR EXISTS ( > SELECT 1 > FROM user_vm_pool_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_pool_id > ) > ) > -- Limiting results to 1 since we only need a single VM from the pool to retrieve the pool data > LIMIT 1; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllVm_poolsByUser_id_with_groups_and_UserRoles (v_user_id UUID) >RETURNS SETOF vm_pools_view STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT DISTINCT pools.* > FROM vm_pools_view pools > INNER JOIN user_vm_pool_permissions_view > ON user_id = v_user_id > AND entity_id = pools.vm_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION BoundVmPoolPrestartedVms (v_vm_pool_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_pools > SET prestarted_vms = LEAST ( > prestarted_vms, ( > SELECT COUNT (*) > FROM vm_pool_map > WHERE vm_pool_id = v_vm_pool_id > ) > ) > WHERE vm_pool_id = v_vm_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:42,139+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vms_sp.sql... >2019-02-26 17:06:42,142+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vms_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateOvfGenerations ( > v_vms_ids VARCHAR(5000), > v_vms_db_generations VARCHAR(5000), > v_ovf_data TEXT, > v_ovf_data_seperator VARCHAR(10) > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE curs_vmids CURSOR >FOR >SELECT * >FROM fnSplitterUuid(v_vms_ids); > >curs_newovfgen CURSOR >FOR > >SELECT * >FROM fnSplitter(v_vms_db_generations); > >curs_newovfdata CURSOR >FOR > >SELECT * >FROM fnSplitterWithSeperator(v_ovf_data, v_ovf_data_seperator); > >id UUID; > >new_ovf_gen BIGINT; > >new_ovf_config TEXT; > >BEGIN > OPEN curs_vmids; > > OPEN curs_newovfgen; > > OPEN curs_newovfdata; > > LOOP > > FETCH curs_vmids > INTO id; > > FETCH curs_newovfgen > INTO new_ovf_gen; > > FETCH curs_newovfdata > INTO new_ovf_config; > > IF NOT FOUND THEN EXIT; > END IF; > UPDATE vm_ovf_generations > SET ovf_generation = new_ovf_gen, > ovf_data = new_ovf_config > WHERE vm_guid = id; > END LOOP; > >CLOSE curs_vmids; > >CLOSE curs_newovfgen; > >CLOSE curs_newovfdata;END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION LoadOvfDataForIds (v_ids VARCHAR(5000)) >RETURNS SETOF vm_ovf_generations STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT * > FROM vm_ovf_generations ovf > WHERE ovf.vm_guid IN ( > SELECT * > FROM fnSplitterUuid(v_ids) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetIdsForOvfDeletion (v_storage_pool_id UUID) >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT ovf.vm_guid AS vm_guid > FROM vm_ovf_generations ovf > WHERE ovf.storage_pool_id = v_storage_pool_id > AND ovf.vm_guid NOT IN ( > SELECT vm_guid > FROM vm_static > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetOvfGeneration (v_vm_id UUID) >RETURNS SETOF BIGINT STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm.ovf_generation > FROM vm_ovf_generations vm > WHERE vm.vm_guid = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmTemplatesIdsForOvfUpdate (v_storage_pool_id UUID) >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT templates.vmt_guid AS vm_guid > FROM vm_templates_based_view templates, > vm_ovf_generations generations > WHERE generations.vm_guid = templates.vmt_guid > AND templates.db_generation > generations.ovf_generation > AND templates.storage_pool_id = v_storage_pool_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmsIdsForOvfUpdate (v_storage_pool_id UUID) >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm.vm_guid AS vm_guid > FROM vms vm, > vm_ovf_generations ovf_gen > WHERE vm.vm_guid = ovf_gen.vm_guid > AND vm.db_generation > ovf_gen.ovf_generation > AND vm.storage_pool_id = v_storage_pool_id > -- filter out external VMs if needed. > AND vm.origin != 4; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteOvfGenerations (v_vms_ids VARCHAR(5000)) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_ovf_generations > WHERE vm_guid IN ( > SELECT * > FROM fnSplitterUuid(v_vms_ids) > ) > -- needed here to ensure that vm with the same id hasn't been added by import vm/template command > AND vm_guid NOT IN ( > SELECT vm_guid > FROM vm_static > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmStatistics ( > v_cpu_sys DECIMAL(18, 0), > v_cpu_user DECIMAL(18, 0), > v_elapsed_time DECIMAL(18, 0), > v_usage_cpu_percent INT, > v_usage_mem_percent INT, > v_usage_network_percent INT, > v_disks_usage TEXT, > v_vm_guid UUID, > v_guest_mem_buffered BIGINT, > v_guest_mem_cached BIGINT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_statistics ( > cpu_sys, > cpu_user, > elapsed_time, > usage_cpu_percent, > usage_mem_percent, > usage_network_percent, > disks_usage, > vm_guid, > guest_mem_buffered, > guest_mem_cached > ) > VALUES ( > v_cpu_sys, > v_cpu_user, > v_elapsed_time, > v_usage_cpu_percent, > v_usage_mem_percent, > v_usage_network_percent, > v_disks_usage, > v_vm_guid, > v_guest_mem_buffered, > v_guest_mem_cached > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmStatistics ( > v_cpu_sys DECIMAL(18, 0), > v_cpu_user DECIMAL(18, 0), > v_elapsed_time DECIMAL(18, 0), > v_usage_cpu_percent INT, > v_usage_mem_percent INT, > v_usage_network_percent INT, > v_disks_usage TEXT, > v_vm_guid UUID, > v_guest_mem_buffered BIGINT, > v_guest_mem_cached BIGINT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_statistics > SET cpu_sys = v_cpu_sys, > cpu_user = v_cpu_user, > elapsed_time = v_elapsed_time, > usage_cpu_percent = v_usage_cpu_percent, > usage_mem_percent = v_usage_mem_percent, > usage_network_percent = v_usage_network_percent, > disks_usage = v_disks_usage, > guest_mem_buffered = v_guest_mem_buffered, > guest_mem_cached = v_guest_mem_cached, > _update_date = LOCALTIMESTAMP > WHERE vm_guid = v_vm_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmStatistics (v_vm_guid UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_statistics > WHERE vm_guid = v_vm_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmStatistics () >RETURNS SETOF vm_statistics STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_statistics.* > FROM vm_statistics; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmDynamic () >RETURNS SETOF vm_dynamic STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_dynamic.* > FROM vm_dynamic; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmStatisticsByVmGuid (v_vm_guid UUID) >RETURNS SETOF vm_statistics STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_statistics.* > FROM vm_statistics > WHERE vm_guid = v_vm_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmDynamic ( > v_app_list TEXT, > v_guest_cur_user_name VARCHAR(255), > v_console_cur_user_name VARCHAR(255), > v_runtime_name VARCHAR(255), > v_console_user_id UUID, > v_guest_os VARCHAR(255), > v_migrating_to_vds UUID, > v_run_on_vds UUID, > v_status INT, > v_vm_guid UUID, > v_vm_host VARCHAR(255), > v_vm_ip VARCHAR(255), > v_vm_fqdn VARCHAR(255), > v_last_start_time TIMESTAMP WITH TIME ZONE, > v_boot_time TIMESTAMP WITH TIME ZONE, > v_downtime BIGINT, > v_last_stop_time TIMESTAMP WITH TIME ZONE, > v_acpi_enable BOOLEAN, > v_session INT, > v_boot_sequence INT, > v_utc_diff INT, > v_client_ip VARCHAR(255), > v_guest_requested_memory INT, > v_exit_status INT, > v_pause_status INT, > v_exit_message VARCHAR(4000), > v_guest_agent_nics_hash INT, > v_last_watchdog_event NUMERIC, > v_last_watchdog_action VARCHAR(8), > v_is_run_once BOOLEAN, > v_volatile_run BOOLEAN, > v_cpu_name VARCHAR(255), > v_emulated_machine VARCHAR(255), > v_current_cd VARCHAR(4000), > v_exit_reason INT, > v_guest_cpu_count INT, > v_spice_port INT, > v_spice_tls_port INT, > v_spice_ip VARCHAR(32), > v_vnc_port INT, > v_vnc_ip VARCHAR(32), > v_ovirt_guest_agent_status INT, > v_qemu_guest_agent_status INT, > v_guest_timezone_offset INT, > v_guest_timezone_name VARCHAR(255), > v_guestos_arch INT, > v_guestos_codename VARCHAR(255), > v_guestos_distribution VARCHAR(255), > v_guestos_kernel_version VARCHAR(255), > v_guestos_type VARCHAR(255), > v_guestos_version VARCHAR(255), > v_guest_containers TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_dynamic ( > app_list, > guest_cur_user_name, > console_cur_user_name, > runtime_name, > console_user_id, > guest_os, > migrating_to_vds, > run_on_vds, > status, > vm_guid, > vm_host, > vm_ip, > last_start_time, > boot_time, > downtime, > last_stop_time, > acpi_enable, > session, > boot_sequence, > utc_diff, > client_ip, > guest_requested_memory, > exit_status, > pause_status, > exit_message, > guest_agent_nics_hash, > last_watchdog_event, > last_watchdog_action, > is_run_once, > volatile_run, > vm_fqdn, > cpu_name, > emulated_machine, > current_cd, > exit_reason, > guest_cpu_count, > spice_port, > spice_tls_port, > spice_ip, > vnc_port, > vnc_ip, > ovirt_guest_agent_status, > qemu_guest_agent_status, > guest_timezone_offset, > guest_timezone_name, > guestos_arch, > guestos_codename, > guestos_distribution, > guestos_kernel_version, > guestos_type, > guestos_version, > guest_containers > ) > VALUES ( > v_app_list, > v_guest_cur_user_name, > v_console_cur_user_name, > v_runtime_name, > v_console_user_id, > v_guest_os, > v_migrating_to_vds, > v_run_on_vds, > v_status, > v_vm_guid, > v_vm_host, > v_vm_ip, > v_last_start_time, > v_boot_time, > v_downtime, > v_last_stop_time, > v_acpi_enable, > v_session, > v_boot_sequence, > v_utc_diff, > v_client_ip, > v_guest_requested_memory, > v_exit_status, > v_pause_status, > v_exit_message, > v_guest_agent_nics_hash, > v_last_watchdog_event, > v_last_watchdog_action, > v_is_run_once, > v_volatile_run, > v_vm_fqdn, > v_cpu_name, > v_emulated_machine, > v_current_cd, > v_exit_reason, > v_guest_cpu_count, > v_spice_port, > v_spice_tls_port, > v_spice_ip, > v_vnc_port, > v_vnc_ip, > v_ovirt_guest_agent_status, > v_qemu_guest_agent_status, > v_guest_timezone_offset, > v_guest_timezone_name, > v_guestos_arch, > v_guestos_codename, > v_guestos_distribution, > v_guestos_kernel_version, > v_guestos_type, > v_guestos_version, > v_guest_containers > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmDynamic ( > v_app_list TEXT, > v_guest_cur_user_name VARCHAR(255), > v_console_cur_user_name VARCHAR(255), > v_runtime_name VARCHAR(255), > v_console_user_id UUID, > v_guest_os VARCHAR(255), > v_migrating_to_vds UUID, > v_run_on_vds UUID, > v_status INT, > v_vm_guid UUID, > v_vm_host VARCHAR(255), > v_vm_ip VARCHAR(255), > v_vm_fqdn VARCHAR(255), > v_last_start_time TIMESTAMP WITH TIME ZONE, > v_boot_time TIMESTAMP WITH TIME ZONE, > v_downtime BIGINT, > v_last_stop_time TIMESTAMP WITH TIME ZONE, > v_acpi_enable BOOLEAN, > v_session INT, > v_boot_sequence INT, > v_utc_diff INT, > v_client_ip VARCHAR(255), > v_guest_requested_memory INT, > v_exit_status INT, > v_pause_status INT, > v_exit_message VARCHAR(4000), > v_guest_agent_nics_hash INT, > v_last_watchdog_event NUMERIC, > v_last_watchdog_action VARCHAR(8), > v_is_run_once BOOLEAN, > v_volatile_run BOOLEAN, > v_cpu_name VARCHAR(255), > v_emulated_machine VARCHAR(255), > v_current_cd VARCHAR(4000), > v_reason VARCHAR(4000), > v_exit_reason INT, > v_guest_cpu_count INT, > v_spice_port INT, > v_spice_tls_port INT, > v_spice_ip VARCHAR(32), > v_vnc_port INT, > v_vnc_ip VARCHAR(32), > v_ovirt_guest_agent_status INT, > v_qemu_guest_agent_status INT, > v_guest_timezone_offset INT, > v_guest_timezone_name VARCHAR(255), > v_guestos_arch INT, > v_guestos_codename VARCHAR(255), > v_guestos_distribution VARCHAR(255), > v_guestos_kernel_version VARCHAR(255), > v_guestos_type VARCHAR(255), > v_guestos_version VARCHAR(255), > v_guest_containers TEXT > ) >RETURNS VOID > > AS $PROCEDURE$ >BEGIN > UPDATE vm_dynamic > SET app_list = v_app_list, > guest_cur_user_name = v_guest_cur_user_name, > console_cur_user_name = v_console_cur_user_name, > runtime_name = v_runtime_name, > console_user_id = v_console_user_id, > guest_os = v_guest_os, > migrating_to_vds = v_migrating_to_vds, > run_on_vds = v_run_on_vds, > status = v_status, > vm_host = v_vm_host, > vm_ip = v_vm_ip, > vm_fqdn = v_vm_fqdn, > last_start_time = v_last_start_time, > boot_time = v_boot_time, > downtime = v_downtime, > last_stop_time = v_last_stop_time, > acpi_enable = v_acpi_enable, > session = v_session, > boot_sequence = v_boot_sequence, > utc_diff = v_utc_diff, > client_ip = v_client_ip, > guest_requested_memory = v_guest_requested_memory, > exit_status = v_exit_status, > pause_status = v_pause_status, > exit_message = v_exit_message, > guest_agent_nics_hash = v_guest_agent_nics_hash, > last_watchdog_event = v_last_watchdog_event, > last_watchdog_action = v_last_watchdog_action, > is_run_once = v_is_run_once, > volatile_run = v_volatile_run, > cpu_name = v_cpu_name, > emulated_machine = v_emulated_machine, > current_cd = v_current_cd, > reason = v_reason, > exit_reason = v_exit_reason, > guest_cpu_count = v_guest_cpu_count, > spice_port = v_spice_port, > spice_tls_port = v_spice_tls_port, > spice_ip = v_spice_ip, > vnc_port = v_vnc_port, > vnc_ip = v_vnc_ip, > ovirt_guest_agent_status = v_ovirt_guest_agent_status, > qemu_guest_agent_status = v_qemu_guest_agent_status, > guest_timezone_offset = v_guest_timezone_offset, > guest_timezone_name = v_guest_timezone_name, > guestos_arch = v_guestos_arch, > guestos_codename = v_guestos_codename, > guestos_distribution = v_guestos_distribution, > guestos_kernel_version = v_guestos_kernel_version, > guestos_type = v_guestos_type, > guestos_version = v_guestos_version, > guest_containers = v_guest_containers > WHERE vm_guid = v_vm_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateConsoleUserWithOptimisticLocking ( > v_vm_guid UUID, > v_console_user_id UUID, > v_guest_cur_user_name VARCHAR(255), > v_console_cur_user_name VARCHAR(255), > OUT v_updated BOOLEAN > ) AS $PROCEDURE$ >BEGIN > UPDATE vm_dynamic > SET console_user_id = v_console_user_id, > guest_cur_user_name = v_guest_cur_user_name, > console_cur_user_name = v_console_cur_user_name > WHERE vm_guid = v_vm_guid > AND ( > console_user_id = v_console_user_id > OR console_user_id IS NULL > ); > > v_updated := FOUND; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmDynamicStatus ( > v_vm_guid UUID, > v_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_dynamic > SET status = v_status > WHERE vm_guid = v_vm_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION ClearMigratingToVds (v_vm_guid UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_dynamic > SET migrating_to_vds = NULL > WHERE vm_guid = v_vm_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmDynamic (v_vm_guid UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_dynamic > WHERE vm_guid = v_vm_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllFromVmDynamic () >RETURNS SETOF vm_dynamic STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_dynamic.* > FROM vm_dynamic; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmDynamicByVmGuid (v_vm_guid UUID) >RETURNS SETOF vm_dynamic STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vm_dynamic.* > FROM vm_dynamic > WHERE vm_guid = v_vm_guid; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS GetAllHashesFromVmDynamic_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE GetAllHashesFromVmDynamic_rs AS (vm_guid UUID, hash VARCHAR); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllHashesFromVmDynamic () >RETURNS SETOF GetAllHashesFromVmDynamic_rs STABLE >AS $procedure$ >BEGIN > RETURN QUERY > > SELECT vm_guid, hash > FROM vm_dynamic; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION SetHashByVmGuid (v_vm_guid UUID, v_hash VARCHAR(30)) >RETURNS VOID >AS $procedure$ >BEGIN > UPDATE vm_dynamic > SET hash = v_hash > WHERE vm_guid = v_vm_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmStatic ( > v_description VARCHAR(4000), > v_free_text_comment TEXT, > v_mem_size_mb INT, > v_max_memory_size_mb INT, > v_num_of_io_threads INT, > v_os INT, > v_cluster_id UUID, > v_vm_guid UUID, > v_vm_name VARCHAR(255), > v_vmt_guid UUID, > v_creation_date TIMESTAMP WITH TIME ZONE, > v_num_of_monitors INT, > v_single_qxl_pci BOOLEAN, > v_allow_console_reconnect BOOLEAN, > v_is_initialized BOOLEAN, > v_num_of_sockets INT, > v_cpu_per_socket INT, > v_threads_per_cpu INT, > v_usb_policy INT, > v_time_zone VARCHAR(40), > v_auto_startup BOOLEAN, > v_is_stateless BOOLEAN, > v_is_smartcard_enabled BOOLEAN, > v_is_delete_protected BOOLEAN, > v_sso_method VARCHAR(32), > v_dedicated_vm_for_vds TEXT, > v_vm_type INT, > v_nice_level INT, > v_cpu_shares INT, > v_default_boot_sequence INT, > v_default_display_type INT, > v_priority INT, > v_iso_path VARCHAR(4000), > v_origin INT, > v_initrd_url VARCHAR(4000), > v_kernel_url VARCHAR(4000), > v_kernel_params VARCHAR(4000), > v_migration_support INT, > v_predefined_properties VARCHAR(4000), > v_userdefined_properties VARCHAR(4000), > v_min_allocated_mem INT, > v_quota_id UUID, > v_cpu_pinning VARCHAR(4000), > v_host_cpu_flags BOOLEAN, > v_tunnel_migration BOOLEAN, > v_vnc_keyboard_layout VARCHAR(16), > v_is_run_and_pause BOOLEAN, > v_created_by_user_id UUID, > v_instance_type_id UUID, > v_image_type_id UUID, > v_original_template_id UUID, > v_original_template_name VARCHAR(255), > v_migration_downtime INT, > v_template_version_number INT, > v_serial_number_policy SMALLINT, > v_custom_serial_number VARCHAR(255), > v_is_boot_menu_enabled BOOLEAN, > v_numatune_mode VARCHAR(20), > v_is_spice_file_transfer_enabled BOOLEAN, > v_is_spice_copy_paste_enabled BOOLEAN, > v_cpu_profile_id UUID, > v_is_auto_converge BOOLEAN, > v_is_migrate_compressed BOOLEAN, > v_custom_emulated_machine VARCHAR(40), > v_bios_type INTEGER, > v_custom_cpu_name VARCHAR(40), > v_small_icon_id UUID, > v_large_icon_id UUID, > v_console_disconnect_action VARCHAR(64), > v_resume_behavior VARCHAR(64), > v_custom_compatibility_version VARCHAR(40), > v_migration_policy_id UUID, > v_lease_sd_id UUID, > v_multi_queues_enabled BOOLEAN) > RETURNS VOID > AS $procedure$ >DECLARE > v_val UUID; >BEGIN >-- lock template for child count update >select vm_guid into v_val FROM vm_static WHERE vm_guid = v_vmt_guid for update; > >INSERT INTO vm_static(description, > free_text_comment, > mem_size_mb, > max_memory_size_mb, > num_of_io_threads, > os, > cluster_id, > vm_guid, > vm_name, > vmt_guid, > creation_date, > num_of_monitors, > single_qxl_pci, > allow_console_reconnect, > is_initialized, > num_of_sockets, > cpu_per_socket, > threads_per_cpu, > usb_policy, > time_zone, > auto_startup, > is_stateless, > dedicated_vm_for_vds, > default_boot_sequence, > vm_type, > nice_level, > cpu_shares, > default_display_type, > priority, > iso_path, > origin, > initrd_url, > kernel_url, > kernel_params, > migration_support, > predefined_properties, > userdefined_properties, > min_allocated_mem, > entity_type, > quota_id, > cpu_pinning, > is_smartcard_enabled, > is_delete_protected, > sso_method, > host_cpu_flags, > tunnel_migration, > vnc_keyboard_layout, > is_run_and_pause, > created_by_user_id, > instance_type_id, > image_type_id, > original_template_id, > original_template_name, > migration_downtime, > template_version_number, > serial_number_policy, > custom_serial_number, > is_boot_menu_enabled, > numatune_mode, > is_spice_file_transfer_enabled, > is_spice_copy_paste_enabled, > cpu_profile_id, > is_auto_converge, > is_migrate_compressed, > custom_emulated_machine, > bios_type, > custom_cpu_name, > small_icon_id, > large_icon_id, > console_disconnect_action, > resume_behavior, > custom_compatibility_version, > migration_policy_id, > lease_sd_id, > multi_queues_enabled) > VALUES(v_description, > v_free_text_comment, > v_mem_size_mb, > v_max_memory_size_mb, > v_num_of_io_threads, > v_os, > v_cluster_id, > v_vm_guid, > v_vm_name, > v_vmt_guid, > v_creation_date, > v_num_of_monitors, > v_single_qxl_pci, > v_allow_console_reconnect, > v_is_initialized, > v_num_of_sockets, > v_cpu_per_socket, > v_threads_per_cpu, > v_usb_policy, > v_time_zone, > v_auto_startup, > v_is_stateless, > v_dedicated_vm_for_vds, > v_default_boot_sequence, > v_vm_type, > v_nice_level, > v_cpu_shares, > v_default_display_type, > v_priority, > v_iso_path, > v_origin, > v_initrd_url, > v_kernel_url, > v_kernel_params, > v_migration_support, > v_predefined_properties, > v_userdefined_properties, > v_min_allocated_mem, > 'VM', > v_quota_id, > v_cpu_pinning, > v_is_smartcard_enabled, > v_is_delete_protected, > v_sso_method, > v_host_cpu_flags, > v_tunnel_migration, > v_vnc_keyboard_layout, > v_is_run_and_pause, > v_created_by_user_id, > v_instance_type_id, > v_image_type_id, > v_original_template_id, > v_original_template_name, > v_migration_downtime, > v_template_version_number, > v_serial_number_policy, > v_custom_serial_number, > v_is_boot_menu_enabled, > v_numatune_mode, > v_is_spice_file_transfer_enabled, > v_is_spice_copy_paste_enabled, > v_cpu_profile_id, > v_is_auto_converge, > v_is_migrate_compressed, > v_custom_emulated_machine, > v_bios_type, > v_custom_cpu_name, > v_small_icon_id, > v_large_icon_id, > v_console_disconnect_action, > v_resume_behavior, > v_custom_compatibility_version, > v_migration_policy_id, > v_lease_sd_id, > v_multi_queues_enabled); > > -- perform deletion from vm_ovf_generations to ensure that no record exists when performing insert to avoid PK violation. > DELETE > FROM vm_ovf_generations gen > WHERE gen.vm_guid = v_vm_guid > AND v_origin != 4; > INSERT INTO vm_ovf_generations(vm_guid, storage_pool_id) > SELECT > v_vm_guid, > storage_pool_id > FROM cluster vg > WHERE vg.cluster_id = v_cluster_id > AND v_origin != 4; > > -- add connections to dedicated hosts > PERFORM InsertDedicatedHostsToVm( > v_vm_guid, > v_dedicated_vm_for_vds); > > -- set child_count for the template > UPDATE vm_static > SET child_count = child_count+1 > WHERE vm_guid = v_vmt_guid; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION IncrementDbGeneration(v_vm_guid UUID) >RETURNS VOID > AS $procedure$ >BEGIN > UPDATE vm_static > SET db_generation = db_generation + 1 > WHERE vm_guid = v_vm_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION IncrementDbGenerationForVms(v_vm_guids UUID[]) >RETURNS VOID >AS $procedure$ >BEGIN > UPDATE vm_static > SET db_generation = db_generation + 1 > WHERE vm_guid = ANY(v_vm_guids); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetDbGeneration(v_vm_guid UUID) >RETURNS SETOF BIGINT STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT db_generation > FROM vm_static > WHERE vm_guid = v_vm_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION IncrementDbGenerationForAllInStoragePool(v_storage_pool_id UUID) >RETURNS VOID > AS $procedure$ >DECLARE > curs CURSOR FOR SELECT vms.vm_guid FROM vm_static vms > WHERE vms.cluster_id IN (SELECT vgs.cluster_id FROM cluster vgs > WHERE vgs.storage_pool_id=v_storage_pool_id) > ORDER BY vm_guid; > id UUID; >BEGIN > OPEN curs; > LOOP > FETCH curs INTO id; > IF NOT FOUND THEN > EXIT; > END IF; > UPDATE vm_static SET db_generation = db_generation + 1 WHERE vm_guid = id; > END LOOP; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsAndTemplatesIdsWithoutAttachedImageDisks(v_storage_pool_id UUID, v_shareable BOOLEAN) >RETURNS SETOF UUID STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vs.vm_guid > FROM vm_static vs > WHERE vs.vm_guid NOT IN (SELECT DISTINCT vd.vm_id > FROM vm_device vd > INNER JOIN base_disks i > ON i.disk_id = vd.device_id > AND vd.snapshot_id IS NULL > WHERE i.disk_storage_type in (0, 2) -- Filter VMs with Images (0) or Cinder (2) disks. > AND i.shareable = v_shareable) > AND vs.cluster_id IN (SELECT vg.cluster_id > FROM cluster vg, storage_pool sp > WHERE vg.storage_pool_id = v_storage_pool_id); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION UpdateVmStatic(v_description VARCHAR(4000) , > v_free_text_comment text, > v_mem_size_mb INTEGER, > v_max_memory_size_mb INTEGER, > v_num_of_io_threads INTEGER, > v_os INTEGER, > v_cluster_id UUID, > v_vm_guid UUID, > v_vm_name VARCHAR(255), > v_vmt_guid UUID, > v_creation_date TIMESTAMP WITH TIME ZONE, > v_num_of_monitors INTEGER, > v_single_qxl_pci BOOLEAN, > v_allow_console_reconnect BOOLEAN, > v_is_initialized BOOLEAN, > v_num_of_sockets INTEGER, > v_cpu_per_socket INTEGER, > v_threads_per_cpu INTEGER, > v_usb_policy INTEGER, > v_time_zone VARCHAR(40) , > v_auto_startup BOOLEAN, > v_is_stateless BOOLEAN, > v_is_smartcard_enabled BOOLEAN, > v_is_delete_protected BOOLEAN, > v_sso_method VARCHAR(32), > v_dedicated_vm_for_vds text , > v_vm_type INTEGER , > v_nice_level INTEGER, > v_cpu_shares INTEGER, > v_default_boot_sequence INTEGER, > v_default_display_type INTEGER, > v_priority INTEGER, > v_iso_path VARCHAR(4000) , > v_origin INTEGER , > v_initrd_url VARCHAR(4000) , > v_kernel_url VARCHAR(4000) , > v_kernel_params VARCHAR(4000) , > v_migration_support INTEGER , >v_predefined_properties VARCHAR(4000), >v_userdefined_properties VARCHAR(4000), >v_min_allocated_mem INTEGER, >v_quota_id UUID, >v_cpu_pinning VARCHAR(4000), >v_host_cpu_flags BOOLEAN, >v_tunnel_migration BOOLEAN, >v_vnc_keyboard_layout VARCHAR(16), >v_is_run_and_pause BOOLEAN, >v_created_by_user_id UUID, >v_instance_type_id UUID, >v_image_type_id UUID, >v_original_template_id UUID, >v_original_template_name VARCHAR(255), >v_migration_downtime INTEGER, >v_template_version_number INTEGER, >v_serial_number_policy SMALLINT, >v_custom_serial_number VARCHAR(255), >v_is_boot_menu_enabled BOOLEAN, >v_numatune_mode VARCHAR(20), >v_is_spice_file_transfer_enabled BOOLEAN, >v_is_spice_copy_paste_enabled BOOLEAN, >v_cpu_profile_id UUID, >v_is_auto_converge BOOLEAN, >v_is_migrate_compressed BOOLEAN, >v_custom_emulated_machine VARCHAR(40), >v_bios_type INTEGER, >v_custom_cpu_name VARCHAR(40), >v_small_icon_id UUID, >v_large_icon_id UUID, >v_provider_id UUID, >v_console_disconnect_action VARCHAR(64), >v_resume_behavior VARCHAR(64), >v_custom_compatibility_version VARCHAR(40), >v_migration_policy_id UUID, >v_lease_sd_id UUID, >v_multi_queues_enabled BOOLEAN) >RETURNS VOID > > AS $procedure$ >BEGIN > UPDATE vm_static > SET > description = v_description, > free_text_comment = v_free_text_comment , > mem_size_mb = v_mem_size_mb, > max_memory_size_mb = v_max_memory_size_mb, > num_of_io_threads = v_num_of_io_threads, > os = v_os, > cluster_id = v_cluster_id, > vm_name = v_vm_name, > vmt_guid = v_vmt_guid, > creation_date = v_creation_date, > num_of_monitors = v_num_of_monitors, > single_qxl_pci = v_single_qxl_pci, > allow_console_reconnect = v_allow_console_reconnect, > is_initialized = v_is_initialized, > num_of_sockets = v_num_of_sockets, > cpu_per_socket = v_cpu_per_socket, > threads_per_cpu = v_threads_per_cpu, > usb_policy = v_usb_policy, > time_zone = v_time_zone, > auto_startup = v_auto_startup, > is_stateless = v_is_stateless, > dedicated_vm_for_vds = v_dedicated_vm_for_vds, > vm_type = v_vm_type, > nice_level = v_nice_level, > cpu_shares = v_cpu_shares, > _update_date = LOCALTIMESTAMP, > default_boot_sequence = v_default_boot_sequence, > default_display_type = v_default_display_type, > priority = v_priority, > iso_path = v_iso_path,origin = v_origin, > initrd_url = v_initrd_url, > kernel_url = v_kernel_url, > kernel_params = v_kernel_params, > migration_support = v_migration_support, > predefined_properties = v_predefined_properties, > userdefined_properties = v_userdefined_properties, > min_allocated_mem = v_min_allocated_mem, > quota_id = v_quota_id, > cpu_pinning = v_cpu_pinning, > is_smartcard_enabled = v_is_smartcard_enabled, > is_delete_protected = v_is_delete_protected, > sso_method = v_sso_method, > host_cpu_flags = v_host_cpu_flags, > tunnel_migration = v_tunnel_migration, > vnc_keyboard_layout = v_vnc_keyboard_layout, > is_run_and_pause = v_is_run_and_pause, > created_by_user_id = v_created_by_user_id, > instance_type_id = v_instance_type_id, > image_type_id = v_image_type_id, > original_template_id = v_original_template_id, > original_template_name = v_original_template_name, > migration_downtime = v_migration_downtime, > template_version_number = v_template_version_number, > serial_number_policy = v_serial_number_policy, > custom_serial_number = v_custom_serial_number, > is_boot_menu_enabled = v_is_boot_menu_enabled, > numatune_mode = v_numatune_mode, > is_spice_file_transfer_enabled = v_is_spice_file_transfer_enabled, > is_spice_copy_paste_enabled = v_is_spice_copy_paste_enabled, > cpu_profile_id = v_cpu_profile_id, > is_auto_converge = v_is_auto_converge, > is_migrate_compressed = v_is_migrate_compressed, > custom_emulated_machine = v_custom_emulated_machine, > bios_type = v_bios_type, > custom_cpu_name = v_custom_cpu_name, > small_icon_id = v_small_icon_id, > large_icon_id = v_large_icon_id, > provider_id = v_provider_id, > console_disconnect_action = v_console_disconnect_action, > resume_behavior = v_resume_behavior, > custom_compatibility_version=v_custom_compatibility_version, > migration_policy_id = v_migration_policy_id, > lease_sd_id = v_lease_sd_id, > multi_queues_enabled = v_multi_queues_enabled > WHERE vm_guid = v_vm_guid > AND entity_type = 'VM'; > > -- Update connections to dedicated hosts > PERFORM UpdateDedicatedHostsToVm( > v_vm_guid, > v_dedicated_vm_for_vds); > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION DeleteVmStatic(v_vm_guid UUID, v_remove_permissions boolean) >RETURNS VOID > AS $procedure$ > DECLARE > v_val UUID; > v_vmt_guid UUID; >BEGIN > -- store vmt_guid for setting the child_count > SELECT vm_static.vmt_guid INTO v_vmt_guid FROM vm_static WHERE vm_guid = v_vm_guid; > > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > select vm_guid INTO v_val FROM vm_static WHERE vm_guid = v_vm_guid FOR UPDATE; > DELETE FROM vm_static > WHERE vm_guid = v_vm_guid > AND entity_type = 'VM'; > > -- delete VM permissions -- > if v_remove_permissions then > PERFORM DeletePermissionsByEntityId(v_vm_guid); > end if; > > -- set the child_count for the template > UPDATE vm_static > SET child_count = child_count - 1 WHERE vm_guid = v_vmt_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllFromVmStatic() RETURNS SETOF vm_static STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT vm_static.* > FROM vm_static > WHERE entity_type = 'VM'; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmStaticWithoutIcon() RETURNS SETOF vm_static STABLE >AS $procedure$ >BEGIN >RETURN QUERY SELECT vm_static.* > FROM vm_static > WHERE entity_type = 'VM' > AND (small_icon_id IS NULL OR large_icon_id IS NULL); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION UpdateOriginalTemplateName( >v_original_template_id UUID, >v_original_template_name VARCHAR(255)) >RETURNS VOID > AS $procedure$ >BEGIN > UPDATE vm_static > SET original_template_name = v_original_template_name > WHERE original_template_id = v_original_template_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION UpdateVmLeaseInfo( >v_vm_guid UUID, >v_lease_info VARCHAR(1000)) >RETURNS VOID > AS $procedure$ >BEGIN > UPDATE vm_dynamic > SET lease_info = v_lease_info > WHERE vm_guid = v_vm_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION UpdateVmLeaseStorageDomainId( >v_vm_guid UUID, >v_sd_id UUID) >RETURNS VOID > AS $procedure$ >BEGIN > UPDATE vm_static > SET lease_sd_id = v_sd_id > WHERE vm_guid = v_vm_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmStaticByVmGuid(v_vm_guid UUID) RETURNS SETOF vm_static STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT vm_static.* > FROM vm_static > WHERE vm_guid = v_vm_guid > AND entity_type = 'VM'; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmStaticByVmGuids(v_vm_guids UUID[]) RETURNS SETOF vm_static STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT vm_static.* > FROM vm_static > WHERE vm_guid = ANY(v_vm_guids) > AND entity_type = 'VM'; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS GetNamesOfVmStaticDedicatedToVds_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE GetNamesOfVmStaticDedicatedToVds_rs AS (vm_name CHARACTER VARYING); >************************** > >CREATE TYPE >********* QUERY ********** >Create or replace FUNCTION GetNamesOfVmStaticDedicatedToVds(v_vds_id UUID) RETURNS SETOF GetNamesOfVmStaticDedicatedToVds_rs STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT vm_name > FROM vm_static > WHERE dedicated_vm_for_vds LIKE '%'||v_vds_id::text||'%' > AND migration_support = 2 > AND entity_type = 'VM'; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllFromVmStaticByStoragePoolId(v_sp_id uuid) RETURNS SETOF vm_static STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT vm_static.* > FROM vm_static INNER JOIN > cluster ON vm_static.cluster_id = cluster.cluster_id LEFT OUTER JOIN > storage_pool ON vm_static.cluster_id = cluster.cluster_id > AND cluster.storage_pool_id = storage_pool.id > WHERE v_sp_id = storage_pool.id > AND entity_type = 'VM'; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmStaticByName(v_vm_name VARCHAR(255)) RETURNS SETOF vm_static STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT vm_static.* > FROM vm_static > WHERE vm_name = v_vm_name > AND entity_type = 'VM'; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmStaticByCluster(v_cluster_id UUID) RETURNS SETOF vm_static STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT vm_static.* > FROM vm_static > WHERE cluster_id = v_cluster_id > AND entity_type = 'VM'; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllFromVms(v_user_id UUID, v_is_filtered boolean) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >IF v_is_filtered THEN > RETURN QUERY SELECT vms.* > FROM vms INNER JOIN user_vm_permissions_view ON vms.vm_guid = user_vm_permissions_view.entity_id > WHERE user_id = v_user_id > ORDER BY vm_guid; >ELSE > RETURN QUERY SELECT DISTINCT vms.* > FROM vms > ORDER BY vm_guid; >END IF; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllFromVmsFilteredAndSorted(v_user_id UUID, v_offset int, v_limit int) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM ( > -- VMs that are not part of a pool that the user has direct or inherited permissions on > SELECT vms.* > FROM vms INNER JOIN user_vm_permissions_view ON vms.vm_guid = user_vm_permissions_view.entity_id > WHERE vm_pool_id IS NULL > AND user_id = v_user_id > UNION > -- VMs that are part of a pool that the user has direct permissions on > SELECT vms.* > FROM vms INNER JOIN permissions ON vms.vm_guid = permissions.object_id > WHERE vm_pool_id IS NOT NULL > AND ad_element_id = v_user_id > ) result > ORDER BY vm_name ASC > LIMIT v_limit OFFSET v_offset; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllFromVmsForUserAndActionGroup(v_user_id UUID, v_action_group_id INTEGER) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT DISTINCT vms.* > FROM vms, vm_permissions_view, permissions_view, engine_session_user_flat_groups > WHERE vms.vm_guid = vm_permissions_view.entity_id > > AND vm_permissions_view.user_id = v_user_id > AND engine_session_user_flat_groups.user_id = vm_permissions_view.user_id > -- check the user has permission on any parent for this vm id and Object type 2 (vm) > AND permissions_view.object_id IN (SELECT id FROM fn_get_entity_parents(vms.vm_guid, 2)) > AND permissions_view.ad_element_id = engine_session_user_flat_groups.granted_id > AND permissions_view.role_id IN (SELECT role_id FROM roles_groups WHERE action_group_id = v_action_group_id) > ORDER BY vm_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByIds(v_vms_ids UUID[]) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT vm.* > FROM vms vm > WHERE vm.vm_guid = ANY(v_vms_ids); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmByVmGuid(v_vm_guid UUID, v_user_id UUID, v_is_filtered boolean) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT DISTINCT vms.* > FROM vms > WHERE vm_guid = v_vm_guid > AND (NOT v_is_filtered OR EXISTS (SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id AND entity_id = v_vm_guid)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetHostedEngineVm() RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT DISTINCT vms.* > FROM vms > WHERE origin = 5 OR origin = 6; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmByVmNameForDataCenter(v_data_center_id UUID, v_vm_name VARCHAR(255), v_user_id UUID, v_is_filtered boolean) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT DISTINCT vms.* > FROM vms > WHERE vm_name = v_vm_name > AND (v_data_center_id is null OR storage_pool_id = v_data_center_id) > AND (NOT v_is_filtered OR EXISTS (SELECT 1 > FROM user_vm_permissions_view > WHERE user_id = v_user_id AND entity_id = vms.vm_guid)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByVmtGuid(v_vmt_guid UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT DISTINCT vms.* > FROM vms > WHERE vmt_guid = v_vmt_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByUserId(v_user_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ > >DECLARE v_vm_ids UUID[]; >BEGIN >SELECT array_agg(object_id) INTO v_vm_ids >FROM permissions > WHERE ad_element_id = v_user_id; > >RETURN QUERY >SELECT vms.* >FROM vms > WHERE vm_guid = ANY(v_vm_ids); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByInstanceTypeId(v_instance_type_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >RETURN QUERY select vms.* from vms > WHERE instance_type_id = v_instance_type_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByUserIdWithGroupsAndUserRoles(v_user_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT DISTINCT vms.* > from vms > inner join permissions_view as perms on vms.vm_guid = perms.object_id > WHERE (perms.ad_element_id = v_user_id > OR perms.ad_element_id IN( > SELECT id > FROM getUserAndGroupsById(v_user_id))) > AND perms.role_type = 2; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsRunningOnVds(v_vds_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT DISTINCT vms.* > FROM vms > WHERE run_on_vds = v_vds_id; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmsRunningOnMultipleVds(v_vds_ids UUID[]) >RETURNS SETOF vms STABLE AS $procedure$ >BEGIN > RETURN QUERY > > SELECT DISTINCT vms.* > FROM vms > WHERE run_on_vds = ANY(v_vds_ids); > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsRunningByVds(v_vds_id UUID) RETURNS SETOF vms_monitoring_view STABLE > AS $procedure$ >BEGIN >RETURN QUERY >SELECT DISTINCT vms_monitoring_view.* > FROM vms_monitoring_view > WHERE run_on_vds = v_vds_id; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmsMigratingToVds(v_vds_id UUID) >RETURNS SETOF vm_dynamic STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT DISTINCT vm_dynamic.* > FROM vm_dynamic > WHERE migrating_to_vds = v_vds_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsRunningOnOrMigratingToVds(v_vds_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > -- use migrating_to_vds column when the VM is in status Migrating From > RETURN QUERY SELECT DISTINCT V.* FROM VMS V > WHERE V.run_on_vds=v_vds_id > OR (V.status = 5 > AND V.migrating_to_vds=v_vds_id) > ORDER BY V.vm_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllForStoragePool(v_storage_pool_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT * > FROM vms > WHERE storage_pool_id = v_storage_pool_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION UpdateOvirtGuestAgentStatus( > v_vm_guid UUID, > v_ovirt_guest_agent_status INTEGER) >RETURNS VOID > AS $procedure$ >BEGIN > UPDATE vm_dynamic > SET > ovirt_guest_agent_status = v_ovirt_guest_agent_status > WHERE vm_guid = v_vm_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION UpdateQemuGuestAgentStatus( > v_vm_guid UUID, > v_qemu_guest_agent_status INTEGER) >RETURNS VOID > AS $procedure$ >BEGIN > UPDATE vm_dynamic > SET > qemu_guest_agent_status = v_qemu_guest_agent_status > WHERE vm_guid = v_vm_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsDynamicRunningOnVds(v_vds_id UUID) RETURNS SETOF vm_dynamic STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vm_dynamic.* > FROM vm_dynamic > WHERE run_on_vds = v_vds_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION IsAnyVmRunOnVds(v_vds_id UUID) >RETURNS SETOF booleanResultType STABLE > AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT EXISTS ( > SELECT vm_guid > FROM vm_dynamic > WHERE run_on_vds = v_vds_id > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION DeleteVm(v_vm_guid UUID) >RETURNS VOID > AS $procedure$ > DECLARE > v_vmt_guid UUID; >BEGIN > select vm_static.vmt_guid INTO v_vmt_guid FROM vm_static WHERE vm_guid = v_vm_guid; > UPDATE vm_static > SET child_count =(SELECT COUNT(*) FROM vm_static WHERE vmt_guid = v_vmt_guid) -1 > WHERE vm_guid = v_vmt_guid; > DELETE FROM tags_vm_map > WHERE vm_id = v_vm_guid; > DELETE > FROM snapshots > WHERE vm_id = v_vm_guid; > DELETE FROM vm_statistics WHERE vm_guid = v_vm_guid; > DELETE FROM vm_dynamic WHERE vm_guid = v_vm_guid; > DELETE FROM vm_static WHERE vm_guid = v_vm_guid; > PERFORM DeletePermissionsByEntityId(v_vm_guid); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByAdGroupNames(v_ad_group_names VARCHAR(250)) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN >RETURN QUERY select distinct vms.* from vms > inner join permissions on vms.vm_guid = permissions.object_id > inner join ad_groups on ad_groups.id = permissions.ad_element_id > WHERE (ad_groups.name in(select Id from fnSplitter(v_ad_group_names))); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByDiskId(v_disk_guid UUID) RETURNS SETOF vms_with_plug_info STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT DISTINCT vms_with_plug_info.* > FROM vms_with_plug_info > WHERE device_id = v_disk_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllVMsWithDisksOnOtherStorageDomain(v_storage_domain_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT DISTINCT vms.* > FROM vms > INNER JOIN (SELECT vm_static.vm_guid > FROM vm_static > INNER JOIN vm_device vd ON vd.vm_id = vm_static.vm_guid > INNER JOIN images i ON i.image_group_id = vd.device_id > INNER JOIN (SELECT image_id > FROM image_storage_domain_map > WHERE image_storage_domain_map.storage_domain_id = v_storage_domain_id) isd_map > ON i.image_guid = isd_map.image_id WHERE entity_type = 'VM') vms_with_disks_on_storage_domain ON vms.vm_guid = vms_with_disks_on_storage_domain.vm_guid > INNER JOIN vm_device vd ON vd.vm_id = vms.vm_guid > INNER JOIN images i ON i.image_group_id = vd.device_id > INNER JOIN image_storage_domain_map on i.image_guid = image_storage_domain_map.image_id > WHERE image_storage_domain_map.storage_domain_id != v_storage_domain_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetActiveVmsByStorageDomainId(v_storage_domain_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT DISTINCT vms.* > FROM vms > INNER JOIN vm_device vd ON vd.vm_id = vms.vm_guid > INNER JOIN images i ON i.image_group_id = vd.device_id > inner join image_storage_domain_map on i.image_guid = image_storage_domain_map.image_id > WHERE status <> 0 > AND is_plugged = TRUE > AND image_storage_domain_map.storage_domain_id = v_storage_domain_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByStorageDomainId(v_storage_domain_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT DISTINCT vms.* > FROM vms > INNER JOIN vm_device vd ON vd.vm_id = vms.vm_guid > INNER JOIN images ON images.image_group_id = vd.device_id > AND images.active = TRUE > INNER JOIN image_storage_domain_map on images.image_guid = image_storage_domain_map.image_id > WHERE image_storage_domain_map.storage_domain_id = v_storage_domain_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION getAllVmsRelatedToQuotaId(v_quota_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vms.* > FROM vms > WHERE quota_id = v_quota_id > UNION > SELECT DISTINCT vms.* > FROM vms > INNER JOIN vm_device vd ON vd.vm_id = vms.vm_guid > INNER JOIN images ON images.image_group_id = vd.device_id > AND images.active = TRUE > INNER JOIN image_storage_domain_map ON image_storage_domain_map.image_id = images.image_guid > WHERE image_storage_domain_map.quota_id = v_quota_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION UpdateIsInitialized(v_vm_guid UUID, > v_is_initialized BOOLEAN) >RETURNS VOID > > AS $procedure$ >BEGIN > UPDATE vm_static > SET is_initialized = v_is_initialized > WHERE vm_guid = v_vm_guid > AND entity_type = 'VM'; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >DROP TYPE IF EXISTS GetOrderedVmGuidsForRunMultipleActions_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE GetOrderedVmGuidsForRunMultipleActions_rs AS (vm_guid UUID); >************************** > >CREATE TYPE >********* QUERY ********** >Create or replace FUNCTION GetOrderedVmGuidsForRunMultipleActions(v_vm_guids VARCHAR(4000)) RETURNS SETOF GetOrderedVmGuidsForRunMultipleActions_rs STABLE > AS $procedure$ > DECLARE > v_ordered_guids GetOrderedVmGuidsForRunMultipleActions_rs; >BEGIN > FOR v_ordered_guids IN > EXECUTE 'SELECT vm_guid from vm_static where vm_guid in( ' || v_vm_guids || ' ) AND entity_type = ''VM'' order by auto_startup desc,priority desc, migration_support desc' > LOOP > RETURN NEXT v_ordered_guids; > END LOOP; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByNetworkId(v_network_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM vms > WHERE EXISTS ( > SELECT 1 > FROM vm_interface > INNER JOIN vnic_profiles > ON vnic_profiles.id = vm_interface.vnic_profile_id > WHERE vnic_profiles.network_id = v_network_id > AND vm_interface.vm_guid = vms.vm_guid); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByVnicProfileId(v_vnic_profile_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM vms > WHERE EXISTS ( > SELECT 1 > FROM vm_interface > WHERE vm_interface.vnic_profile_id = v_vnic_profile_id > AND vm_interface.vm_guid = vms.vm_guid); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByClusterId(v_cluster_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vms.* > FROM vms > WHERE cluster_id = v_cluster_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsByVmPoolId(v_vm_pool_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vms.* > FROM vms > WHERE vm_pool_id = v_vm_pool_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetFailedAutoStartVms() RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vms.* > FROM vms > WHERE auto_startup = TRUE > AND status = 0 > AND exit_status = 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetRunningVmsByClusterId(v_cluster_id UUID) RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT DISTINCT vms.* > FROM vms > WHERE run_on_vds IS NOT NULL > AND cluster_id = v_cluster_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmInitByVmId(v_vm_id UUID) RETURNS SETOF vm_init STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT vm_init.* > FROM vm_init > WHERE vm_id = v_vm_id; > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmInitByids(v_vm_init_ids TEXT) RETURNS SETOF vm_init STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT * > FROM vm_init > WHERE vm_init.vm_id IN ( > SELECT * > FROM fnSplitterUuid(v_vm_init_ids)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION UpdateVmInit( > v_vm_id UUID, > v_host_name TEXT, > v_domain TEXT, > v_authorized_keys TEXT, > v_regenerate_keys BOOLEAN, > v_time_zone VARCHAR(40), > v_dns_servers TEXT, > v_dns_search_domains TEXT, > v_networks TEXT, > v_password TEXT, > v_winkey VARCHAR(30), > v_custom_script TEXT, > v_input_locale VARCHAR(256), > v_ui_language VARCHAR(256), > v_system_locale VARCHAR(256), > v_user_locale VARCHAR(256), > v_user_name VARCHAR(256), > v_active_directory_ou VARCHAR(256), > v_org_name VARCHAR(256), > v_cloud_init_network_protocol VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_init > SET host_name = v_host_name, > domain = v_domain, > authorized_keys = v_authorized_keys, > regenerate_keys = v_regenerate_keys, > time_zone = v_time_zone, > dns_servers = v_dns_servers, > dns_search_domains = v_dns_search_domains, > networks = v_networks, > password = v_password, > winkey = v_winkey, > custom_script = v_custom_script, > input_locale = v_input_locale, > ui_language = v_ui_language, > system_locale = v_system_locale, > user_locale = v_user_locale, > user_name = v_user_name, > active_directory_ou = v_active_directory_ou, > org_name = v_org_name, > cloud_init_network_protocol = v_cloud_init_network_protocol > WHERE vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION DeleteVmInit (v_vm_id UUID) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_init > WHERE vm_id = v_vm_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertVmInit ( > v_vm_id UUID, > v_host_name TEXT, > v_domain TEXT, > v_authorized_keys TEXT, > v_regenerate_keys BOOLEAN, > v_time_zone VARCHAR(40), > v_dns_servers TEXT, > v_dns_search_domains TEXT, > v_networks TEXT, > v_password TEXT, > v_winkey VARCHAR(30), > v_custom_script TEXT, > v_input_locale VARCHAR(256), > v_ui_language VARCHAR(256), > v_system_locale VARCHAR(256), > v_user_locale VARCHAR(256), > v_user_name VARCHAR(256), > v_active_directory_ou VARCHAR(256), > v_org_name VARCHAR(256), > v_cloud_init_network_protocol VARCHAR(32) > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_init ( > vm_id, > host_name, > domain, > authorized_keys, > regenerate_keys, > time_zone, > dns_servers, > dns_search_domains, > networks, > password, > winkey, > custom_script, > input_locale, > ui_language, > system_locale, > user_locale, > user_name, > active_directory_ou, > org_name, > cloud_init_network_protocol > ) > VALUES ( > v_vm_id, > v_host_name, > v_domain, > v_authorized_keys, > v_regenerate_keys, > v_time_zone, > v_dns_servers, > v_dns_search_domains, > v_networks, > v_password, > v_winkey, > v_custom_script, > v_input_locale, > v_ui_language, > v_system_locale, > v_user_locale, > v_user_name, > v_active_directory_ou, > v_org_name, > v_cloud_init_network_protocol > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmIdsForVersionUpdate (v_base_template_id UUID) >RETURNS SETOF UUID STABLE AS $PROCEDURE$ >BEGIN > RETURN QUERY > > SELECT vs.vm_guid > FROM vm_static vs natural > INNER JOIN vm_dynamic > WHERE ( > vmt_guid = v_base_template_id > OR vmt_guid IN ( > SELECT vm_guid > FROM vm_static > WHERE vmt_guid = v_base_template_id > ) > ) > AND template_version_number IS NULL > AND entity_type = 'VM' > AND status = 0 > AND ( > is_stateless = TRUE > OR ( > EXISTS ( > SELECT * > FROM vm_pool_map > WHERE vm_guid = vs.vm_guid > ) > AND NOT EXISTS ( > SELECT * > FROM snapshots > WHERE vm_id = vs.vm_guid > AND snapshot_type = 'STATELESS' > ) > ) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmCpuProfileIdForClusterId ( > v_cluster_id UUID, > v_cpu_profile_id UUID > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_static > SET cpu_profile_id = v_cpu_profile_id > WHERE cluster_id = v_cluster_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION InsertDedicatedHostsToVm ( > v_vm_guid UUID, > v_dedicated_vm_for_vds TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > INSERT INTO vm_host_pinning_map ( > vm_id, > vds_id > ) > SELECT v_vm_guid, > vds_id > FROM fnSplitterUuid(v_dedicated_vm_for_vds) AS vds_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateDedicatedHostsToVm ( > v_vm_guid UUID, > v_dedicated_vm_for_vds TEXT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > DELETE > FROM vm_host_pinning_map > WHERE vm_id = v_vm_guid; > > PERFORM InsertDedicatedHostsToVm(v_vm_guid, v_dedicated_vm_for_vds); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmsByCpuProfileIds(v_cpu_profile_ids UUID[]) >RETURNS SETOF vms STABLE >AS $procedure$ >BEGIN > RETURN QUERY SELECT vms.* > FROM vms > WHERE cpu_profile_id = ANY(v_cpu_profile_ids); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllVmsRelatedToDiskProfiles(v_disk_profile_ids UUID[]) >RETURNS SETOF vms STABLE >AS $procedure$ >BEGIN > RETURN QUERY SELECT vms.* > FROM vms > INNER JOIN vm_device vd ON vd.vm_id = vms.vm_guid > INNER JOIN images ON images.image_group_id = vd.device_id > AND images.active = TRUE > INNER JOIN image_storage_domain_map ON image_storage_domain_map.image_id = images.image_guid > WHERE image_storage_domain_map.disk_profile_id = ANY(v_disk_profile_ids); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmsByOrigin(v_origins INT[]) >RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT vms.* > FROM vms > WHERE origin = ANY(v_origins); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION SetToUnknown ( > v_vm_ids UUID[], > v_status INT > ) >RETURNS VOID AS $PROCEDURE$ >BEGIN > UPDATE vm_dynamic > SET status = v_status > WHERE vm_guid = ANY(v_vm_ids) > AND run_on_vds IS NOT NULL; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsWithLeaseOnStorageDomain(v_storage_domain_id UUID) >RETURNS SETOF vm_static STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM vm_static > WHERE lease_sd_id = v_storage_domain_id > AND entity_type = 'VM'; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetActiveVmsWithLeaseOnStorageDomain(v_storage_domain_id UUID) >RETURNS SETOF vm_static STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vs.* > FROM vm_static vs > JOIN vm_dynamic vd ON vd.vm_guid = vs.vm_guid > WHERE lease_sd_id = v_storage_domain_id > AND vd.status <> 0; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetActiveVmNamesWithIsoOnStorageDomain(v_storage_domain_id UUID) >RETURNS SETOF varchar(255) STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vm.vm_name > FROM images_storage_domain_view image, vms vm > WHERE image.storage_id = v_storage_domain_id > AND vm.status not in (0, 14, 15) -- Down, ImageIllegal, ImageLocked > AND image.image_group_id::VARCHAR = vm.iso_path; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetActiveVmNamesWithIsoAttached(v_iso_disk_id UUID) >RETURNS SETOF varchar(255) STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vs.vm_name > FROM vm_static vs > JOIN vm_dynamic vd ON vd.vm_guid = vs.vm_guid > WHERE vs.iso_path = v_iso_disk_id::VARCHAR > AND vd.status NOT IN (0, 14, 15); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmNamesWithSpecificIsoAttached(v_iso_disk_id UUID) >RETURNS SETOF varchar(255) STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vm.vm_name > FROM vm_static vm > WHERE vm.iso_path = v_iso_disk_id::VARCHAR; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmIdsWithSpecificIsoAttached(v_iso_disk_id UUID) >RETURNS SETOF UUID STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vd.vm_guid > FROM vm_dynamic vd > WHERE vd.current_cd = v_iso_disk_id::VARCHAR; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmsStaticRunningOnVds(v_vds_id UUID) >RETURNS SETOF vm_static STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vs.* > FROM vm_static vs > JOIN vm_dynamic vd ON vd.vm_guid = vs.vm_guid > WHERE run_on_vds = v_vds_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmsPinnedToHost(v_host_id UUID) >RETURNS SETOF vms STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vms.* > FROM vms > JOIN vm_host_pinning_map pin ON pin.vm_id = vms.vm_guid > WHERE pin.vds_id = v_host_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:42,232+0100 Creating stored procedures from /usr/share/ovirt-engine/dbscripts/vm_templates_sp.sql... >2019-02-26 17:06:42,235+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/vm_templates_sp.sql >********* QUERY ********** >Create or replace FUNCTION InsertVmTemplate(v_child_count INTEGER, > v_creation_date TIMESTAMP WITH TIME ZONE, > v_description VARCHAR(4000) , > v_free_text_comment text, > v_mem_size_mb INTEGER, > v_max_memory_size_mb INTEGER, > v_num_of_io_threads INTEGER, > v_name VARCHAR(40), > v_num_of_sockets INTEGER, > v_cpu_per_socket INTEGER, > v_threads_per_cpu INTEGER, > v_os INTEGER, > v_vmt_guid UUID, > v_cluster_id UUID, > v_num_of_monitors INTEGER, > v_single_qxl_pci BOOLEAN, > v_allow_console_reconnect BOOLEAN, > v_status INTEGER, > v_usb_policy INTEGER, > v_time_zone VARCHAR(40) , > v_vm_type INTEGER , > v_nice_level INTEGER, > v_cpu_shares INTEGER, > v_default_boot_sequence INTEGER, > v_default_display_type INTEGER, > v_priority INTEGER, > v_auto_startup BOOLEAN, > v_is_stateless BOOLEAN, > v_is_smartcard_enabled BOOLEAN, > v_is_delete_protected BOOLEAN, > v_sso_method VARCHAR(32), > v_is_disabled BOOLEAN, > v_iso_path VARCHAR(4000) , > v_origin INTEGER , > v_initrd_url VARCHAR(4000) , > v_kernel_url VARCHAR(4000) , > v_kernel_params VARCHAR(4000) , > v_quota_id UUID, > v_migration_support integer, > v_dedicated_vm_for_vds text, > v_tunnel_migration BOOLEAN, > v_vnc_keyboard_layout VARCHAR(16), > v_min_allocated_mem INTEGER, > v_is_run_and_pause BOOLEAN, > v_created_by_user_id UUID, > v_template_type VARCHAR(40), > v_migration_downtime INTEGER, > v_base_template_id UUID, > v_template_version_name VARCHAR(40), > v_serial_number_policy SMALLINT, > v_custom_serial_number VARCHAR(255), > v_is_boot_menu_enabled BOOLEAN, > v_is_spice_file_transfer_enabled BOOLEAN, > v_is_spice_copy_paste_enabled BOOLEAN, > v_cpu_profile_id UUID, > v_numatune_mode VARCHAR(20), > v_is_auto_converge BOOLEAN, > v_is_migrate_compressed BOOLEAN, > v_predefined_properties VARCHAR(4000), > v_userdefined_properties VARCHAR(4000), > v_custom_emulated_machine VARCHAR(40), > v_bios_type INTEGER, > v_custom_cpu_name VARCHAR(40), > v_small_icon_id UUID, > v_large_icon_id UUID, > v_console_disconnect_action VARCHAR(64), > v_resume_behavior VARCHAR(64), > v_custom_compatibility_version VARCHAR(40), > v_migration_policy_id UUID, > v_lease_sd_id UUID, > v_multi_queues_enabled BOOLEAN) >RETURNS VOID > AS $procedure$ >DECLARE >v_template_version_number INTEGER; >BEGIN > -- get current max version and use next > SELECT max(template_version_number) + 1 into v_template_version_number > from vm_static > where vmt_guid = v_base_template_id > and entity_type = 'TEMPLATE'; > > -- if no versions exist it might return null, so this is a new base template > if v_template_version_number is null then > v_template_version_number = 1; > end if; > > INSERT > INTO vm_static( > child_count, > creation_date, > description, > free_text_comment, > mem_size_mb, > max_memory_size_mb, > num_of_io_threads, > vm_name, > num_of_sockets, > cpu_per_socket, > threads_per_cpu, > os, > vm_guid, > cluster_id, > num_of_monitors, > single_qxl_pci, > allow_console_reconnect, > template_status, > usb_policy, > time_zone, > vm_type, > nice_level, > cpu_shares, > default_boot_sequence, > default_display_type, > priority, > auto_startup, > is_stateless, > iso_path, > origin, > initrd_url, > kernel_url, > kernel_params, > entity_type, > quota_id, > migration_support, > is_disabled, > dedicated_vm_for_vds, > is_smartcard_enabled, > is_delete_protected, > sso_method, > tunnel_migration, > vnc_keyboard_layout, > min_allocated_mem, > is_run_and_pause, > created_by_user_id, > migration_downtime, > template_version_number, > vmt_guid, > template_version_name, > serial_number_policy, > custom_serial_number, > is_boot_menu_enabled, > is_spice_file_transfer_enabled, > is_spice_copy_paste_enabled, > cpu_profile_id, > numatune_mode, > is_auto_converge, > is_migrate_compressed, > predefined_properties, > userdefined_properties, > custom_emulated_machine, > bios_type, > custom_cpu_name, > small_icon_id, > large_icon_id, > console_disconnect_action, > resume_behavior, > custom_compatibility_version, > migration_policy_id, > lease_sd_id, > multi_queues_enabled) > VALUES( > v_child_count, > v_creation_date, > v_description, > v_free_text_comment, > v_mem_size_mb, > v_max_memory_size_mb, > v_num_of_io_threads, > v_name, > v_num_of_sockets, > v_cpu_per_socket, > v_threads_per_cpu, > v_os, > v_vmt_guid, > v_cluster_id, > v_num_of_monitors, > v_single_qxl_pci, > v_allow_console_reconnect, > v_status, > v_usb_policy, > v_time_zone, > v_vm_type, > v_nice_level, > v_cpu_shares, > v_default_boot_sequence, > v_default_display_type, > v_priority, > v_auto_startup, > v_is_stateless, > v_iso_path, > v_origin, > v_initrd_url, > v_kernel_url, > v_kernel_params, > v_template_type, > v_quota_id, > v_migration_support, > v_is_disabled, > v_dedicated_vm_for_vds, > v_is_smartcard_enabled, > v_is_delete_protected, > v_sso_method, > v_tunnel_migration, > v_vnc_keyboard_layout, > v_min_allocated_mem, > v_is_run_and_pause, > v_created_by_user_id, > v_migration_downtime, > v_template_version_number, > v_base_template_id, > v_template_version_name, > v_serial_number_policy, > v_custom_serial_number, > v_is_boot_menu_enabled, > v_is_spice_file_transfer_enabled, > v_is_spice_copy_paste_enabled, > v_cpu_profile_id, > v_numatune_mode, > v_is_auto_converge, > v_is_migrate_compressed, > v_predefined_properties, > v_userdefined_properties, > v_custom_emulated_machine, > v_bios_type, > v_custom_cpu_name, > v_small_icon_id, > v_large_icon_id, > v_console_disconnect_action, > v_resume_behavior, > v_custom_compatibility_version, > v_migration_policy_id, > v_lease_sd_id, > v_multi_queues_enabled); > -- perform deletion from vm_ovf_generations to ensure that no record exists when performing insert to avoid PK violation. > DELETE FROM vm_ovf_generations gen WHERE gen.vm_guid = v_vmt_guid; > INSERT INTO vm_ovf_generations( > vm_guid, > storage_pool_id) > VALUES ( > v_vmt_guid, > (SELECT storage_pool_id > FROM cluster vg > WHERE vg.cluster_id = v_cluster_id)); > > -- add connections to dedicated hosts > PERFORM InsertDedicatedHostsToVm( > v_vmt_guid, > v_dedicated_vm_for_vds); > >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION UpdateVmTemplate(v_child_count INTEGER, > v_creation_date TIMESTAMP WITH TIME ZONE, > v_description VARCHAR(4000) , > v_free_text_comment text, > v_mem_size_mb INTEGER, > v_max_memory_size_mb INTEGER, > v_num_of_io_threads INTEGER, > v_name VARCHAR(40), > v_num_of_sockets INTEGER, > v_cpu_per_socket INTEGER, > v_threads_per_cpu INTEGER, > v_os INTEGER, > v_vmt_guid UUID, > v_cluster_id UUID, > v_num_of_monitors INTEGER, > v_single_qxl_pci BOOLEAN, > v_allow_console_reconnect BOOLEAN, > v_status INTEGER, > v_usb_policy INTEGER, > v_time_zone VARCHAR(40) , > v_vm_type INTEGER , > v_nice_level INTEGER, > v_cpu_shares INTEGER, > v_default_boot_sequence INTEGER, > v_default_display_type INTEGER, > v_priority INTEGER, > v_auto_startup BOOLEAN, > v_is_stateless BOOLEAN, > v_is_smartcard_enabled BOOLEAN, > v_is_delete_protected BOOLEAN, > v_sso_method VARCHAR(32), > v_is_disabled BOOLEAN, > v_iso_path VARCHAR(4000) , > v_origin INTEGER , > v_initrd_url VARCHAR(4000) , > v_kernel_url VARCHAR(4000) , > v_kernel_params VARCHAR(4000), > v_quota_id UUID, > v_migration_support integer, > v_dedicated_vm_for_vds text, > v_tunnel_migration BOOLEAN, > v_vnc_keyboard_layout VARCHAR(16), > v_min_allocated_mem INTEGER, > v_is_run_and_pause BOOLEAN, > v_created_by_user_id UUID, > v_template_type VARCHAR(40), > v_migration_downtime INTEGER, > v_template_version_name VARCHAR(40), > v_serial_number_policy SMALLINT, > v_custom_serial_number VARCHAR(255), > v_is_boot_menu_enabled BOOLEAN, > v_is_spice_file_transfer_enabled BOOLEAN, > v_is_spice_copy_paste_enabled BOOLEAN, > v_cpu_profile_id UUID, > v_numatune_mode VARCHAR(20), > v_is_auto_converge BOOLEAN, > v_is_migrate_compressed BOOLEAN, > v_predefined_properties VARCHAR(4000), > v_userdefined_properties VARCHAR(4000), > v_custom_emulated_machine VARCHAR(40), > v_bios_type INTEGER, > v_custom_cpu_name VARCHAR(40), > v_small_icon_id UUID, > v_large_icon_id UUID, > v_console_disconnect_action VARCHAR(64), > v_resume_behavior VARCHAR(64), > v_custom_compatibility_version VARCHAR(40), > v_migration_policy_id UUID, > v_lease_sd_id UUID, > v_multi_queues_enabled BOOLEAN) >RETURNS VOID > > AS $procedure$ >BEGIN > UPDATE vm_static > SET child_count = v_child_count, > creation_date = v_creation_date, > description = v_description, > free_text_comment = v_free_text_comment, > mem_size_mb = v_mem_size_mb, > max_memory_size_mb = v_max_memory_size_mb, > num_of_io_threads = v_num_of_io_threads, > vm_name = v_name, > num_of_sockets = v_num_of_sockets, > cpu_per_socket = v_cpu_per_socket, > threads_per_cpu = v_threads_per_cpu, > os = v_os, > cluster_id = v_cluster_id, > num_of_monitors = v_num_of_monitors, > single_qxl_pci = v_single_qxl_pci, > allow_console_reconnect = v_allow_console_reconnect, > template_status = v_status, > usb_policy = v_usb_policy, > time_zone = v_time_zone, > vm_type = v_vm_type, > nice_level = v_nice_level, > cpu_shares = v_cpu_shares, > default_boot_sequence = v_default_boot_sequence, > default_display_type = v_default_display_type, > priority = v_priority, > auto_startup = v_auto_startup, > is_stateless = v_is_stateless, > iso_path = v_iso_path, > origin = v_origin, > initrd_url = v_initrd_url, > kernel_url = v_kernel_url, > kernel_params = v_kernel_params, > _update_date = CURRENT_TIMESTAMP, > quota_id = v_quota_id, > migration_support = v_migration_support, > dedicated_vm_for_vds = v_dedicated_vm_for_vds, > is_smartcard_enabled = v_is_smartcard_enabled, > is_delete_protected = v_is_delete_protected, > sso_method = v_sso_method, > is_disabled = v_is_disabled, > tunnel_migration = v_tunnel_migration, > vnc_keyboard_layout = v_vnc_keyboard_layout, > min_allocated_mem = v_min_allocated_mem, > is_run_and_pause = v_is_run_and_pause, > created_by_user_id = v_created_by_user_id, > migration_downtime = v_migration_downtime, > template_version_name = v_template_version_name, > serial_number_policy = v_serial_number_policy, > custom_serial_number = v_custom_serial_number, > is_boot_menu_enabled = v_is_boot_menu_enabled, > is_spice_file_transfer_enabled = v_is_spice_file_transfer_enabled, > is_spice_copy_paste_enabled = v_is_spice_copy_paste_enabled, > cpu_profile_id = v_cpu_profile_id, > numatune_mode = v_numatune_mode, > is_auto_converge = v_is_auto_converge, > is_migrate_compressed = v_is_migrate_compressed, > predefined_properties = v_predefined_properties, > userdefined_properties = v_userdefined_properties, > custom_emulated_machine = v_custom_emulated_machine, > bios_type = v_bios_type, > custom_cpu_name = v_custom_cpu_name, > small_icon_id = v_small_icon_id, > large_icon_id = v_large_icon_id, > console_disconnect_action = v_console_disconnect_action, > resume_behavior = v_resume_behavior, > custom_compatibility_version = v_custom_compatibility_version, > migration_policy_id = v_migration_policy_id, > lease_sd_id = v_lease_sd_id, > multi_queues_enabled = v_multi_queues_enabled > WHERE vm_guid = v_vmt_guid > AND entity_type = v_template_type; > > -- update template versions to new name > UPDATE vm_static > SET vm_name = v_name > WHERE vm_guid <> v_vmt_guid > AND vmt_guid = v_vmt_guid > AND entity_type = v_template_type; > > -- Update connections to dedicated hosts > PERFORM UpdateDedicatedHostsToVm(v_vmt_guid, v_dedicated_vm_for_vds); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION UpdateVmTemplateStatus( > v_vmt_guid UUID, > v_status INTEGER) >RETURNS VOID > AS $procedure$ >BEGIN > UPDATE vm_static > SET template_status = v_status > WHERE vm_guid = v_vmt_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION UpdateVmTemplateShiftBaseTemplate(v_base_template_id UUID) >RETURNS VOID > AS $procedure$ >BEGIN > UPDATE vm_static > SET vmt_guid = (SELECT vm_guid > FROM vm_static > WHERE entity_type = 'TEMPLATE' > AND vmt_guid = v_base_template_id > ORDER BY template_version_number > OFFSET 1 > LIMIT 1 > ) > WHERE entity_type = 'TEMPLATE' > AND vmt_guid = v_base_template_id > AND vm_guid != vmt_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION DeleteVmTemplates(v_vmt_guid UUID) >RETURNS VOID > AS $procedure$ > DECLARE > v_val UUID; >BEGIN > -- Get (and keep) a shared lock with "right to upgrade to exclusive" > -- in order to force locking parent before children > SELECT vm_guid INTO v_val > FROM vm_static > WHERE vm_guid = v_vmt_guid > FOR UPDATE; > > DELETE FROM vm_static > WHERE vm_guid = v_vmt_guid; > -- delete Template permissions -- > PERFORM DeletePermissionsByEntityId(v_vmt_guid); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllFromVmTemplates(v_user_id UUID, v_is_filtered boolean, v_entity_type VARCHAR(32)) RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT vm_templates.* > FROM vm_templates_based_view vm_templates > WHERE entity_type = v_entity_type > AND (NOT v_is_filtered OR EXISTS (SELECT 1 > FROM user_vm_template_permissions_view > WHERE user_id = v_user_id > AND entity_id = vmt_guid)) > ORDER BY name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmTemplatesWithoutIcon() RETURNS SETOF vm_templates_view STABLE >AS $procedure$ >BEGIN >RETURN QUERY > SELECT vm_template.* > FROM vm_templates_view AS vm_template > WHERE small_icon_id IS NULL OR large_icon_id IS NULL; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetTemplateCount() RETURNS SETOF BIGINT STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT count (vm_templates.*) > FROM vm_templates_based_view vm_templates; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmTemplatesByIds(v_vm_templates_ids VARCHAR(5000)) RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN >RETURN QUERY > SELECT vm_templates.* > FROM vm_templates_based_view vm_templates > WHERE vm_templates.vmt_guid IN (SELECT * FROM fnSplitterUuid(v_vm_templates_ids)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION getAllVmTemplatesRelatedToQuotaId(v_quota_id UUID) RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT vm_templates.* > FROM vm_templates_based_view vm_templates > WHERE quota_id = v_quota_id > UNION > SELECT DISTINCT vm_templates.* > FROM vm_templates_based_view vm_templates > INNER JOIN vm_device vd ON vd.vm_id = vm_templates.vmt_guid > INNER JOIN images ON images.image_group_id = vd.device_id AND images.active = TRUE > INNER JOIN image_storage_domain_map ON image_storage_domain_map.image_id = images.image_guid > WHERE image_storage_domain_map.quota_id = v_quota_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmTemplateByVmtGuid(v_vmt_guid UUID, v_user_id UUID, v_is_filtered boolean) RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT vm_templates.* > FROM vm_templates_based_view vm_templates > WHERE vmt_guid = v_vmt_guid > AND (NOT v_is_filtered OR EXISTS ( > SELECT 1 > FROM user_vm_template_permissions_view > WHERE user_id = v_user_id > AND entity_id = v_vmt_guid)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmTemplateByVmtName(v_storage_pool_id UUID, v_vmt_name VARCHAR(255), v_user_id UUID, v_is_filtered boolean) RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT vm_templates.* > FROM vm_templates_based_view vm_templates > WHERE name = v_vmt_name > AND (v_storage_pool_id is null OR storage_pool_id = v_storage_pool_id OR storage_pool_id is null) > AND (NOT v_is_filtered OR EXISTS ( > SELECT 1 > FROM user_vm_template_permissions_view > WHERE user_id = v_user_id > AND entity_id = vmt_guid)) > ORDER BY vm_templates.template_version_number DESC; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmTemplateByClusterId(v_cluster_id UUID) RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT vm_templates.* > FROM vm_templates_based_view vm_templates > WHERE cluster_id = v_cluster_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmTemplatesByStoragePoolId(v_storage_pool_id UUID) RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT DISTINCT vm_templates.* > FROM vm_templates_based_view vm_templates > WHERE vm_templates.storage_pool_id = v_storage_pool_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmTemplatesByImageId(v_image_guid UUID) RETURNS SETOF vm_templates_based_with_plug_info STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT * > FROM vm_templates_based_with_plug_info t > WHERE t.image_guid = v_image_guid; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmTemplatesByStorageDomainId(v_storage_domain_id UUID, v_user_id UUID, v_is_filtered boolean) RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT DISTINCT vm_templates.* > FROM vm_templates_based_view vm_templates > INNER JOIN vm_device vd ON vd.vm_id = vm_templates.vmt_guid > INNER JOIN images i ON i.image_group_id = vd.device_id AND i.active = TRUE > WHERE i.image_guid in( > SELECT image_id > FROM image_storage_domain_map > WHERE storage_domain_id = v_storage_domain_id) > AND (NOT v_is_filtered OR EXISTS ( > SELECT 1 > FROM user_vm_template_permissions_view > WHERE user_id = v_user_id > AND entity_id = vm_templates.vmt_guid)); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_perms_get_templates_with_permitted_action(v_user_id UUID, v_action_group_id integer) RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT vm_templates_based_view.* > FROM vm_templates_based_view, user_vm_template_permissions_view > WHERE vm_templates_based_view.vmt_guid = user_vm_template_permissions_view.entity_id > AND user_vm_template_permissions_view.user_id = v_user_id > AND (SELECT get_entity_permissions( > v_user_id, > v_action_group_id, > vm_templates_based_view.vmt_guid, > 4) IS NOT NULL); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmTemplatesByNetworkId(v_network_id UUID) RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM vm_templates_based_view > WHERE EXISTS ( > SELECT 1 > FROM vm_interface > INNER JOIN vnic_profiles > ON vnic_profiles.id = vm_interface.vnic_profile_id > WHERE vnic_profiles.network_id = v_network_id > AND vm_interface.vmt_guid = vm_templates_based_view.vmt_guid); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetVmTemplatesByVnicProfileId(v_vnic_profile_id UUID) RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY > SELECT * > FROM vm_templates_based_view > WHERE EXISTS ( > SELECT 1 > FROM vm_interface > WHERE vm_interface.vnic_profile_id = v_vnic_profile_id > AND vm_interface.vmt_guid = vm_templates_based_view.vmt_guid); >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetTemplateVersionsForBaseTemplate(v_base_template_id UUID) RETURNS SETOF vm_templates_based_view STABLE >AS $procedure$ >BEGIN > RETURN QUERY > SELECT * > FROM vm_templates_based_view > WHERE base_template_id = v_base_template_id > AND vmt_guid != v_base_template_id > ORDER BY template_version_number desc; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetTemplateWithLatestVersionInChain(v_template_id UUID) RETURNS SETOF vm_templates_based_view STABLE >AS $procedure$ >BEGIN > RETURN QUERY > SELECT * > FROM vm_templates_based_view > WHERE base_template_id = > (SELECT vmt_guid > FROM vm_static > WHERE vm_guid = v_template_id) > ORDER BY template_version_number DESC > LIMIT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetAllVmTemplatesWithDisksOnOtherStorageDomain(v_storage_domain_id UUID) RETURNS SETOF vm_templates_based_view STABLE >AS $procedure$ >BEGIN >RETURN QUERY SELECT DISTINCT templates.* > FROM vm_templates_based_view templates > INNER JOIN (SELECT vm_static.vm_guid > FROM vm_static > INNER JOIN vm_device vd ON vd.vm_id = vm_static.vm_guid > INNER JOIN images i ON i.image_group_id = vd.device_id > INNER JOIN (SELECT image_id > FROM image_storage_domain_map > WHERE image_storage_domain_map.storage_domain_id = v_storage_domain_id) isd_map > ON i.image_guid = isd_map.image_id WHERE entity_type = 'TEMPLATE') vms_with_disks_on_storage_domain ON templates.vmt_guid = vms_with_disks_on_storage_domain.vm_guid > INNER JOIN vm_device vd ON vd.vm_id = templates.vmt_guid > INNER JOIN images i ON i.image_group_id = vd.device_id > INNER JOIN image_storage_domain_map on i.image_guid = image_storage_domain_map.image_id > WHERE image_storage_domain_map.storage_domain_id != v_storage_domain_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetVmTemplatesByCpuProfileId(v_cpu_profile_id UUID) >RETURNS SETOF vm_templates_based_view STABLE >AS $procedure$ >BEGIN > RETURN QUERY SELECT vm_templates_based_view.* > FROM vm_templates_based_view > WHERE cpu_profile_id = v_cpu_profile_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION GetAllVmTemplatesRelatedToDiskProfile(v_disk_profile_id UUID) >RETURNS SETOF vm_templates_based_view STABLE >AS $procedure$ >BEGIN > RETURN QUERY SELECT vm_templates.* > FROM vm_templates_based_view vm_templates > INNER JOIN vm_device vd ON vd.vm_id = vm_templates.vmt_guid > INNER JOIN images ON images.image_group_id = vd.device_id > AND images.active = TRUE > INNER JOIN image_storage_domain_map ON image_storage_domain_map.image_id = images.image_guid > WHERE image_storage_domain_map.disk_profile_id = v_disk_profile_id; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION GetTemplatesWithLeaseOnStorageDomain(v_storage_domain_id UUID) >RETURNS SETOF vm_templates_based_view STABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT * > FROM vm_templates_based_view > WHERE lease_sd_id = v_storage_domain_id > AND entity_type = 'TEMPLATE'; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:42,273+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/common_sp.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_column ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_column_def TEXT > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > > EXECUTE v_sql; > END; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_drop_column ( > v_table VARCHAR(128), > v_column VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % or Column % does not exist.', > v_table, > v_column; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_change_column_type ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_type VARCHAR(128), > v_new_type VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > AND ( > udt_name ilike v_type > OR data_type ilike v_type > ) > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > END; > > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_rename_column ( > v_table VARCHAR(128), > v_column VARCHAR(128), > v_new_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % or Column % does not exist.', > v_table, > v_column; >END > >IF ;END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_rename_table ( > v_table VARCHAR(128), > v_new_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v_sql TEXT; > >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > ) > ) THEN > BEGIN > v_sql := 'ALTER TABLE ' || v_table || ' RENAME TO ' || v_new_name; > > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'Table % does not exist.', > v_table; >END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_config_value ( > v_option_name VARCHAR(100), > v_option_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_option_value, > v_version, > v_option_value > ); > END; > ELSE > BEGIN > -- We need to set default value to not have it empty after upgrade from previous versions > UPDATE vdc_options SET > default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version > AND default_value IS NULL; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_value_all_versions (v_option_name VARCHAR(100)) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > ) > ) THEN > BEGIN > DELETE > FROM vdc_options > WHERE option_name ilike v_option_name; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_value ( > v_option_name VARCHAR(100), > v_version TEXT > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version IN ( > SELECT ID > FROM fnSplitter(v_version) > ) > ) > ) THEN > BEGIN > DELETE > FROM vdc_options > WHERE option_name ilike v_option_name > AND version IN ( > SELECT ID > FROM fnSplitter(v_version) > ); > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_delete_config_for_version (v_version TEXT) >RETURNS void AS $PROCEDURE$ >BEGIN > DELETE > FROM vdc_options > WHERE version IN ( > SELECT ID > FROM fnSplitter(v_version) > ); >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_config_value ( > v_option_name VARCHAR(100), > v_option_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > UPDATE vdc_options > SET option_value = v_option_value, > default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version; > END; > END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_default_config_value ( > v_option_name VARCHAR(100), > v_default_option_value VARCHAR(4000), > v_option_value VARCHAR(4000), > v_version VARCHAR(40), > v_ignore_default_value_case boolean > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_option_name > AND version = v_version > ) > ) THEN > BEGIN > IF (v_ignore_default_value_case) THEN > UPDATE vdc_options > SET option_value = v_option_value > WHERE option_name ilike v_option_name > AND option_value ilike v_default_option_value > AND version = v_version; > ELSE > UPDATE vdc_options > SET option_value = v_option_value > WHERE option_name ilike v_option_name > AND option_value = v_default_option_value > AND version = v_version; > END IF; > > -- We need to update default value regardless of user changes > UPDATE vdc_options > SET default_value = v_option_value > WHERE option_name ilike v_option_name > AND version = v_version; > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_rename_config_key ( > v_old_option_name VARCHAR(100), > v_new_option_name VARCHAR(100), > v_version VARCHAR(40) > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_current_option_value VARCHAR(4000); > > BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name ilike v_old_option_name > AND version = v_version > ) > ) THEN > v_current_option_value:= option_value > FROM vdc_options > WHERE option_name ilike v_old_option_name > AND version = v_version; > > UPDATE vdc_options > SET option_name = v_new_option_name, > option_value = v_current_option_value > WHERE option_name ilike v_old_option_name > AND version = v_version; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_create_constraint ( > v_table VARCHAR(128), > v_constraint VARCHAR(128), > v_constraint_sql TEXT > ) > RETURNS void AS $PROCEDURE$ > > BEGIN > IF NOT EXISTS ( > SELECT 1 > FROM pg_constraint > WHERE conname ilike v_constraint > ) THEN > EXECUTE 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_drop_constraint ( > v_table VARCHAR(128), > v_constraint VARCHAR(128) > ) > RETURNS void AS $PROCEDURE$ > > BEGIN > IF EXISTS ( > SELECT 1 > FROM pg_constraint > WHERE conname ilike v_constraint > ) THEN > EXECUTE 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > END IF; > > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION CheckDBConnection () > RETURNS SETOF INT IMMUTABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 1; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_functions_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' > FROM pg_proc > INNER JOIN pg_namespace ns > ON (pg_proc.pronamespace = ns.oid) > WHERE > ns.nspname = 'public' > AND ( > probin IS NULL > OR > -- prevent dropping installed extension functions > probin NOT IN (SELECT '$libdir/' || extname from pg_extension) > ) > ORDER BY proname; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_views_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP VIEW if exists ' || table_name || ' CASCADE;' > FROM information_schema.VIEWS > WHERE table_schema = 'public' > AND table_name NOT ILIKE 'pg_%' > ORDER BY table_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_tables_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP TABLE if exists ' || table_name || ' CASCADE;' > FROM information_schema.tables > WHERE table_schema = 'public' > AND table_type = 'BASE TABLE' > ORDER BY table_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_seq_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP SEQUENCE if exists ' || sequence_name || ' CASCADE;' > FROM information_schema.sequences > WHERE sequence_schema = 'public' > ORDER BY sequence_name; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION generate_drop_all_user_types_syntax () > RETURNS SETOF TEXT STABLE AS $PROCEDURE$ > > BEGIN > RETURN QUERY > > SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, > pg_class c, > pg_type t > WHERE n.oid = c.relnamespace > AND t.typrelid = c.oid > AND c.relkind = 'c'::"char" > AND n.nspname = 'public' > ORDER BY c.relname::information_schema.sql_identifier; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_get_column_size ( > v_table VARCHAR(64), > v_column VARCHAR(64) > ) > RETURNS INT STABLE AS $PROCEDURE$ > > DECLARE retvalue INT; > > BEGIN > retvalue := character_maximum_length > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column > AND table_schema = 'public' > AND udt_name IN ( > 'char', > 'varchar' > ); > > RETURN retvalue; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION attach_user_to_role ( > v_user_name VARCHAR(255), > v_domain VARCHAR(255), > v_namespace VARCHAR(255), > v_domain_entry_id TEXT, > v_role_name VARCHAR(255) > ) > RETURNS void AS $BODY$ > > DECLARE selected_user_id uuid; > > input_role_id uuid; > > BEGIN > SELECT roles.id > INTO input_role_id > FROM roles > WHERE roles.name = v_role_name; > > -- The external identifier is the user identifier converted to an array of > -- bytes: > INSERT INTO users ( > user_id, > external_id, > namespace, > name, > domain, > username, > last_admin_check_status > ) > SELECT uuid_generate_v1(), > v_domain_entry_id, > v_namespace, > v_user_name, > v_domain, > v_user_name, > true > WHERE NOT EXISTS ( > SELECT 1 > FROM users > WHERE domain = v_domain > AND external_id = v_domain_entry_id > ); > > SELECT user_id > FROM users > WHERE domain = v_domain > AND external_id = v_domain_entry_id > INTO selected_user_id; > > PERFORM InsertPermission(selected_user_id, uuid_generate_v1(), input_role_id, getGlobalIds('system'), 1); > > END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION attach_group_to_role ( > v_group_name VARCHAR(255), > v_role_name VARCHAR(255) > ) > RETURNS void AS $BODY$ > DECLARE selected_group_id uuid; > input_role_id uuid; > BEGIN > SELECT roles.id > INTO input_role_id > FROM roles > WHERE roles.name = v_role_name; > -- The external identifier is the user identifier converted to an array of > -- bytes: > INSERT INTO ad_groups ( > id, > name, > external_id > ) > SELECT uuid_generate_v1(), > v_group_name, > uuid_generate_v1() > WHERE NOT EXISTS ( > SELECT 1 > FROM ad_groups > WHERE name = v_group_name > ); > SELECT id > FROM ad_groups > WHERE name = v_group_name > INTO selected_group_id; > IF NOT EXISTS ( > SELECT 1 > FROM permissions > WHERE ad_element_id = selected_group_id > AND role_id = input_role_id > ) THEN > PERFORM InsertPermission( > selected_group_id, > uuid_generate_v1(), > input_role_id, > getGlobalIds('system'), > 1); > END IF; > END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_add_action_group_to_role ( > v_role_id UUID, > v_action_group_id INT > ) > RETURNS VOID AS $PROCEDURE$ > > BEGIN > INSERT INTO roles_groups ( > role_id, > action_group_id > ) > SELECT v_role_id, > v_action_group_id > WHERE NOT EXISTS ( > SELECT 1 > FROM roles_groups > WHERE role_id = v_role_id > AND action_group_id = v_action_group_id > ); > > RETURN; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_split_config_value ( > v_option_name VARCHAR, > v_old_option_value VARCHAR, > v_new_option_value VARCHAR, > v_update_from_version VARCHAR > ) > RETURNS void AS $BODY$ > > DECLARE v_old_value VARCHAR(4000); > > v_cur CURSOR > FOR > > SELECT DISTINCT version > FROM vdc_options > WHERE version <> 'general' > ORDER BY version; > > v_version VARCHAR(40); > > v_index INT; > > v_count INT; > > v_total_count INT; > > v_version_count INT; > > BEGIN > v_total_count := count(version) > FROM vdc_options > WHERE option_name = v_option_name; > > v_old_value := option_value > FROM vdc_options > WHERE option_name = v_option_name > AND version = 'general'; > > v_version_count := count(DISTINCT version) > FROM vdc_options > WHERE version <> 'general'; > > IF (v_total_count <= v_version_count) THEN > BEGIN > IF (v_old_value IS NULL) THEN > v_old_value := v_old_option_value; > END IF; > v_count := count(DISTINCT version) > FROM vdc_options > WHERE version <> 'general'; > > v_index := 1; > > OPEN v_cur; > > LOOP > > FETCH v_cur > INTO v_version; > > EXIT when NOT found; > > -- We shouldn't update if already exists > IF ( > NOT EXISTS ( > SELECT 1 > FROM vdc_options > WHERE option_name = v_option_name > AND version = v_version > ) > ) THEN > -- Might not work well for versions such as 3.10, but we currently don't have any > IF (v_version >= v_update_from_version) THEN > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_new_option_value, > v_version, > v_new_option_value > ); > ELSE > INSERT INTO vdc_options ( > option_name, > option_value, > version, > default_value > ) > VALUES ( > v_option_name, > v_old_value, > v_version, > v_old_value > ); > END IF; > > END IF; > v_index := v_index + 1; > END LOOP; > > CLOSE v_cur; > > DELETE > FROM vdc_options > WHERE option_name = v_option_name > AND version = 'general'; > END; >END IF; > >END;$BODY$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_grant_action_group_to_all_roles_filter ( > v_action_group_id INT, > uuid [] > ) >RETURNS void AS $BODY$ > >DECLARE v_role_id_to_filter alias >FOR $2; > >BEGIN > INSERT INTO roles_groups ( > role_id, > action_group_id > ) > SELECT DISTINCT role_id, > v_action_group_id > FROM roles_groups rg > WHERE NOT ARRAY [role_id] <@ v_role_id_to_filter > AND NOT EXISTS ( > SELECT 1 > FROM roles_groups > WHERE role_id = rg.role_id > AND action_group_id = v_action_group_id > ); >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object (v_object regclass) >RETURNS setof record AS $BODY$ > >DECLARE v_sql TEXT; > >v_table record; > >v_table_name TEXT; > >temprec record; > >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > SELECT c.relname, > n.nspname > INTO v_table > FROM pg_class c > INNER JOIN pg_namespace n > ON c.relnamespace = n.oid > WHERE c.oid = v_object; > > -- try to get filtered query syntax from previous execution > IF EXISTS ( > SELECT 1 > FROM object_column_white_list_sql > WHERE object_name = v_table.relname > ) THEN > SELECT sql > INTO v_sql > FROM object_column_white_list_sql > WHERE object_name = v_table.relname; > ELSE > v_table_name := quote_ident(v_table.nspname) || '.' || quote_ident(v_table.relname); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > FOR temprec IN > SELECT a.attname, > t.typname > FROM pg_attribute a > INNER JOIN pg_type t > ON a.atttypid = t.oid > WHERE a.attrelid = v_object > AND a.attnum > 0 > AND NOT a.attisdropped > ORDER BY a.attnum LOOP v_sql := coalesce(v_sql || ', ', 'SELECT '); > > IF EXISTS ( > SELECT 1 > FROM object_column_white_list > WHERE object_name = v_table.relname > AND column_name = temprec.attname > ) THEN v_sql := v_sql || quote_ident(temprec.attname); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident(temprec.typname) || ' as ' || quote_ident(temprec.attname); > END IF; > > END LOOP; > > v_sql := v_sql || ' FROM ' || v_table_name; > > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > > -- save generated query for further use > INSERT INTO object_column_white_list_sql ( > object_name, > sql > ) > VALUES ( > v_table.relname, > v_sql > ); > END IF; > > RETURN QUERY > > EXECUTE v_sql; >END;$BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_column_to_object_white_list ( > v_object_name VARCHAR(128), > v_column_name VARCHAR(128) > ) >RETURNS void AS $PROCEDURE$ >BEGIN > IF ( > NOT EXISTS ( > SELECT 1 > FROM object_column_white_list > WHERE object_name = v_object_name > AND column_name = v_column_name > ) > ) THEN > BEGIN > -- verify that there is such object in db > IF EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name = v_object_name > AND column_name = v_column_name > ) THEN > INSERT INTO object_column_white_list ( > object_name, > column_name > ) > VALUES ( > v_object_name, > v_column_name > ); > END IF; > > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR REPLACE FUNCTION fn_db_is_table_exists (v_table VARCHAR(64)) > RETURNS boolean STABLE AS $PROCEDURE$ > > DECLARE retvalue boolean; > > BEGIN > retvalue := EXISTS ( > SELECT * > FROM information_schema.tables > WHERE table_schema = 'public' > AND table_name ILIKE v_table > ); > > RETURN retvalue; > END;$PROCEDURE$ > LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE > OR replace FUNCTION fn_db_create_index ( > v_index_name VARCHAR(128), > v_table_name VARCHAR(128), > v_column_names TEXT, > v_where_predicate TEXT, > v_unique boolean > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_sql TEXT; > unique_modifier varchar(6); > > BEGIN > unique_modifier = CASE WHEN v_unique THEN 'UNIQUE' > ELSE '' > END; > > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || '; CREATE ' || unique_modifier || ' INDEX ' || v_index_name || ' ON ' || v_table_name || '(' || v_column_names || ')'; > > IF v_where_predicate = '' THEN v_sql := v_sql || ';';ELSE > v_sql := v_sql || ' WHERE ' || v_where_predicate || ';'; > END IF; > > EXECUTE v_sql; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR replace FUNCTION fn_db_drop_index ( > v_index_name VARCHAR(128) > ) > RETURNS void AS $PROCEDURE$ > > DECLARE v_sql TEXT; > > BEGIN > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || ';' ; > EXECUTE v_sql; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_disk (v_id UUID) >RETURNS void AS $PROCEDURE$ >DECLARE OK INT; > >LOCKED INT; > >BEGIN > OK:= 1; > > LOCKED:= 2; > > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED > AND image_group_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_snapshot (v_id UUID) >RETURNS void AS $PROCEDURE$ >DECLARE OK VARCHAR; > >LOCKED VARCHAR; > >BEGIN > OK:= 'OK'; > > LOCKED:= 'LOCKED'; > > UPDATE snapshots > SET status = OK > WHERE status = LOCKED > AND snapshot_id = v_id; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_entity ( > v_object_type VARCHAR(10), > v_name VARCHAR(255), > v_recursive boolean > ) >RETURNS void AS $PROCEDURE$ >DECLARE DOWN INT; > >OK INT; > >LOCKED INT; > >TEMPLATE_OK INT; > >TEMPLATE_LOCKED INT; > >IMAGE_LOCKED INT; > >SNAPSHOT_OK VARCHAR; > >SNAPSHOT_LOCKED VARCHAR; > >v_id UUID; > >BEGIN > DOWN:= 0; > > OK:= 1; > > LOCKED:= 2; > > TEMPLATE_OK:= 0; > > TEMPLATE_LOCKED:= 1; > > IMAGE_LOCKED:= 15; > > SNAPSHOT_OK:= 'OK'; > > SNAPSHOT_LOCKED:= 'LOCKED'; > > v_id := vm_guid > FROM vm_static > WHERE vm_name = v_name > AND entity_type ilike v_object_type; > > -- set VM status to DOWN > IF (v_object_type = 'vm') THEN > UPDATE vm_dynamic > SET status = DOWN > WHERE status = IMAGE_LOCKED > AND vm_guid = v_id; > -- set Template status to OK > ELSE IF (v_object_type = 'template') THEN > UPDATE vm_static > SET template_status = TEMPLATE_OK > WHERE template_status = TEMPLATE_LOCKED > AND vm_guid = v_id; > END IF; > >END IF; > --unlock images and snapshots if recursive flag is set >IF (v_recursive) THEN > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED > AND image_group_id IN ( > SELECT device_id > FROM vm_device > WHERE vm_id = v_id > AND is_plugged > ); > > UPDATE snapshots > SET status = SNAPSHOT_OK > WHERE status ilike SNAPSHOT_LOCKED > AND vm_id = v_id; >END IF; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_unlock_all () >RETURNS void AS $PROCEDURE$ >DECLARE DOWN INT; > >OK INT; > >LOCKED INT; > >TEMPLATE_OK INT; > >TEMPLATE_LOCKED INT; > >IMAGE_LOCKED INT; > >SNAPSHOT_OK VARCHAR; > >SNAPSHOT_LOCKED VARCHAR; > >BEGIN > DOWN:= 0; > > OK:= 1; > > LOCKED:= 2; > > TEMPLATE_OK:= 0; > > TEMPLATE_LOCKED:= 1; > > IMAGE_LOCKED:= 15; > > SNAPSHOT_OK:= 'OK'; > > SNAPSHOT_LOCKED:= 'LOCKED'; > > UPDATE vm_static > SET template_status = TEMPLATE_OK > WHERE template_status = TEMPLATE_LOCKED; > > UPDATE vm_dynamic > SET status = DOWN > WHERE status = IMAGE_LOCKED; > > UPDATE images > SET imagestatus = OK > WHERE imagestatus = LOCKED; > > UPDATE snapshots > SET status = SNAPSHOT_OK > WHERE status ilike SNAPSHOT_LOCKED; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >/* Displays DC id , DC name, SPM Host id , SPM Host name and number of async tasks awaiting. > >1) create a record type with DC name, DC id, SPM host id, SPM host name, count > >2) get all distinct DC ids from async_tasks table > >3) Run a cursor for each result in 2) > > a) get DC name > b) get SPM Host id & name if available > c) get count of tasks > > return current record > >4) return set of generated records >*/ >DROP TYPE IF EXISTS async_tasks_info_rs CASCADE; >************************** > >DROP TYPE >********* QUERY ********** >CREATE TYPE async_tasks_info_rs AS ( > dc_id uuid, > dc_name VARCHAR, > spm_host_id uuid, > spm_host_name VARCHAR, > task_count INT > ); >************************** > >CREATE TYPE >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_get_async_tasks () >RETURNS SETOF async_tasks_info_rs STABLE AS $PROCEDURE$ >DECLARE v_record async_tasks_info_rs; > >-- selects storage_pool_id uuid found in async_tasks >v_tasks_cursor CURSOR >FOR > >SELECT DISTINCT storage_pool_id >FROM async_tasks; > >BEGIN > OPEN v_tasks_cursor; > > FETCH v_tasks_cursor > INTO v_record.dc_id; > > WHILE FOUND > LOOP > -- get dc_name and SPM Host id > v_record.dc_name := name FROM storage_pool WHERE id = v_record.dc_id; > v_record.spm_host_id := spm_vds_id > FROM storage_pool > WHERE id = v_record.dc_id; > > -- get Host name if we have non NULL SPM Host > IF (v_record.spm_host_id IS NOT NULL) THEN > v_record.spm_host_name := vds_name > FROM vds_static > WHERE vds_id = v_record.spm_host_id; > ELSE > v_record.spm_host_name:= ''; > END IF; > -- get tasks count for this DC > v_record.task_count := count(*) > FROM async_tasks > WHERE position(cast(v_record.dc_id AS VARCHAR) IN action_parameters) > 0; > > -- return the record > RETURN NEXT v_record; > > FETCH v_tasks_cursor > INTO v_record.dc_id; > > END LOOP; > >CLOSE v_tasks_cursor; > >-- return full set of generated records >RETURN; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_remove_csv_config_value ( > v_option_name VARCHAR(100), > v_value VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >DECLARE v VARCHAR []; > >e VARCHAR; > >v_result VARCHAR; > >v_sep VARCHAR(1); > >BEGIN > v_result := ''; > > v_sep := ''; > > v := string_to_array(option_value, ',') > FROM vdc_options > WHERE option_name = v_option_name > AND version = v_version; > FOR > > e IN > > SELECT unnest(v) LOOP > > IF (e != v_value) THEN v_result := v_result || v_sep || e; > v_sep := ','; > END IF; > >END >LOOP; > > UPDATE vdc_options > SET option_value = v_result > WHERE option_name = v_option_name > AND version = v_version; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_remove_uuid_from_csv ( > v_csv_text TEXT, > v_uuid uuid > ) >RETURNS TEXT STABLE AS $PROCEDURE$ >DECLARE v uuid []; > >e uuid; > >v_result TEXT; > >v_sep VARCHAR(1); > >BEGIN > v_result := ''; > > v_sep := ''; > > v := string_to_array(v_csv_text, ','); > FOR > > e IN > > SELECT unnest(v) LOOP > > IF (e != v_uuid) THEN v_result := v_result || v_sep || e; > v_sep := ','; > END IF; > > END LOOP; > > IF (v_result = '') THEN v_result := NULL; > END IF; > RETURN v_result; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_add_config_value_for_versions_up_to ( > v_option_name VARCHAR(100), > v_val VARCHAR(4000), > v_version VARCHAR(40) > ) >RETURNS void AS $PROCEDURE$ >DECLARE i INT; > >arr VARCHAR [] := array ['4.1', '4.2', '4.3']; > >BEGIN > FOR i IN array_lower(arr, 1)..array_upper(arr, 1) LOOP PERFORM fn_db_add_config_value(v_option_name, v_val, arr [i]); > EXIT WHEN arr [i] = v_version; > END LOOP; > >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_varchar_to_jsonb(v_text VARCHAR, v_default_value JSONB) >RETURNS JSONB IMMUTABLE AS $PROCEDURE$ >BEGIN > RETURN v_text::jsonb; > EXCEPTION > WHEN SQLSTATE '22P02' THEN -- '22P02' stands for 'invalid_text_representation', 'invalid input syntax for type json' in this case > RETURN v_default_value; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_update_column_to_jsonb_compatible_values( > v_table VARCHAR, > v_column VARCHAR, > v_default_value JSONB > ) >RETURNS VOID AS $PROCEDURE$ >DECLARE > default_value_string VARCHAR; >BEGIN > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name = v_table > AND column_name = v_column > AND data_type = 'character varying' > ) > ) THEN > BEGIN > default_value_string := CASE > WHEN v_default_value IS NULL THEN 'NULL' > ELSE '''' || v_default_value::VARCHAR || '''' > END; > EXECUTE 'UPDATE ' || v_table || ' SET ' || v_column || ' = (SELECT fn_db_varchar_to_jsonb(' || v_column || ', ' || default_value_string || '))'; > END; > END IF; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_change_table_string_columns_to_empty_string ( > v_table VARCHAR(128), > v_column VARCHAR[] > ) >RETURNS void AS $PROCEDURE$ >DECLARE > v_sql TEXT; > v_num integer := array_length(v_column, 1); > v_index integer := 1; > >BEGIN > WHILE v_index <= v_num > LOOP > IF ( > EXISTS ( > SELECT 1 > FROM information_schema.columns > WHERE table_schema = 'public' > AND table_name ilike v_table > AND column_name ilike v_column[v_index] > ) > ) THEN > BEGIN > v_sql := 'UPDATE ' || v_table || ' SET ' || v_column[v_index] || ' = '''' WHERE ' || v_column[v_index] || ' IS NULL' ; > EXECUTE v_sql; > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column[v_index] || ' SET DEFAULT '''''; > EXECUTE v_sql; > END; > ELSE > RAISE EXCEPTION 'No column named % exists in table %', v_column[v_index] , v_table; > END IF; > v_index = v_index + 1; > END LOOP; >END;$PROCEDURE$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >2019-02-26 17:06:42,312+0100 Running upgrade sql script '/usr/share/ovirt-engine/dbscripts/upgrade/post_upgrade/0010_add_object_column_white_list_table.sql'... >2019-02-26 17:06:42,314+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/upgrade/post_upgrade/0010_add_object_column_white_list_table.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION __temp_add_object_column_white_list_table() >RETURNS void >AS $function$ >BEGIN > -- This table holds the column white list per object > IF EXISTS (SELECT * FROM pg_tables WHERE tablename ILIKE 'object_column_white_list') THEN > truncate table object_column_white_list; > ELSE > CREATE TABLE object_column_white_list > ( > object_name varchar(128) NOT NULL, > column_name varchar(128) NOT NULL, > CONSTRAINT pk_object_column_white_list PRIMARY KEY(object_name,column_name) > ) WITH OIDS; > END IF; > > -- this table holds generated sql per object and is truncated upon upgrade to reflect schema changes > IF EXISTS (SELECT * FROM pg_tables WHERE tablename ILIKE 'object_column_white_list_sql') THEN > truncate table object_column_white_list_sql; > ELSE > CREATE TABLE object_column_white_list_sql > ( > object_name varchar(128) NOT NULL, > sql text NOT NULL, > CONSTRAINT pk_object_column_white_list_sql PRIMARY KEY(object_name) > ) WITH OIDS; > > END IF; > ----------------------------------- > -- Initial white list settings --- > ----------------------------------- > -- vds view > ----------------------------------- > -- A new added column will not be displayed for the user unless added specifically. > insert into object_column_white_list(object_name,column_name) > (select 'vds', column_name > from information_schema.columns > where table_schema = 'public' and > table_name = 'vds' and > column_name in ( > 'cluster_id', 'cluster_name', 'cluster_description', > 'vds_id', 'vds_name', 'ip', 'vds_unique_id', 'host_name', 'port', > 'server_ssl_enabled', 'vds_type', 'pm_enabled', 'pm_proxy_preferences', 'vds_spm_priority', 'hooks', 'status', 'cpu_cores', > 'cpu_model', 'cpu_speed_mh', 'if_total_speed', 'kvm_enabled', 'physical_mem_mb', > 'pending_vcpus_count', 'pending_vmem_size', 'mem_commited', 'vm_active', 'vm_count', > 'vm_migrating', 'incoming_migrations', 'outgoing_migrations', 'vms_cores_count', 'cpu_over_commit_time_stamp', 'hypervisor_type', > 'net_config_dirty', 'max_vds_memory_over_commit', 'storage_pool_id', 'storage_pool_name', 'reserved_mem', > 'guest_overhead', 'software_version', 'version_name', 'build_name', 'previous_status', > 'cpu_idle', 'cpu_load', 'cpu_sys', 'cpu_user', 'usage_mem_percent', 'usage_cpu_percent', > 'usage_network_percent', 'mem_available', 'mem_shared', 'swap_free', 'swap_total', 'ksm_cpu_percent', > 'ksm_pages', 'ksm_state', 'cpu_flags', 'cluster_cpu_name', 'cpu_sockets', 'vds_spm_id', > 'otp_validity', 'spm_status', 'supported_cluster_levels', 'supported_engines', > 'cluster_compatibility_version', 'cluster_virt_service', 'cluster_gluster_service', 'host_os', 'kvm_version', 'libvirt_version', 'spice_version', 'kernel_version', > 'iscsi_initiator_name', 'transparent_hugepages_state', 'anonymous_hugepages', > 'non_operational_reason', 'recoverable', 'sshkeyfingerprint', 'count_threads_as_cores', 'cpu_threads', > 'hw_manufacturer', 'hw_product_name', 'hw_version', 'hw_serial_number', 'hw_uuid', 'hw_family', 'ssh_port', 'ssh_username', 'boot_time', > 'pm_detect_kdump', 'protocol', 'vgpu_placement')); >-- pm_options are missing >END; $function$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >SELECT * FROM __temp_add_object_column_white_list_table(); >************************** > > > >********* QUERY ********** >DROP FUNCTION __temp_add_object_column_white_list_table(); >************************** > >DROP FUNCTION >********* QUERY ********** >select fn_db_add_column_to_object_white_list('vds', 'selinux_enforce_mode'); >************************** > > > >********* QUERY ********** >select fn_db_add_column_to_object_white_list('vds', 'auto_numa_balancing'); >************************** > > > >********* QUERY ********** >select fn_db_add_column_to_object_white_list('vds', 'is_numa_supported'); >************************** > > > >********* QUERY ********** >select fn_db_add_column_to_object_white_list('vds', 'protocol'); >************************** > > > >********* QUERY ********** >select fn_db_add_column_to_object_white_list('vds', 'supported_emulated_machines'); >************************** > > > >********* QUERY ********** >SELECT fn_db_add_column_to_object_white_list('vds', 'kernel_cmdline'); >************************** > > > >********* QUERY ********** >SELECT fn_db_add_column_to_object_white_list('vds', 'last_stored_kernel_cmdline'); >************************** > > > >********* QUERY ********** >SELECT fn_db_add_column_to_object_white_list('vds', 'pretty_name'); >************************** > > > >********* QUERY ********** >SELECT fn_db_add_column_to_object_white_list('vds', 'hugepages'); >************************** > > > >********* QUERY ********** >SELECT fn_db_add_column_to_object_white_list('vds', 'connector_info'); >************************** > > > >2019-02-26 17:06:42,358+0100 Running upgrade sql script '/usr/share/ovirt-engine/dbscripts/upgrade/post_upgrade/0030_set_default_cluster_for_registration.sql'... >2019-02-26 17:06:42,360+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/upgrade/post_upgrade/0030_set_default_cluster_for_registration.sql >********* QUERY ********** >CREATE OR REPLACE FUNCTION __temp_set_default_cluster_for_registration() > RETURNS void AS >$BODY$ >BEGIN > IF EXISTS (select 1 from cluster where name ilike 'Default') THEN > update vdc_options > set option_value = (select cluster_id from cluster where name ilike 'Default') > where option_name = 'AutoRegistrationDefaultClusterID' and version = 'general'; > ELSE > -- Default cluster name was changed from 'Default' to something else > -- taking the first cluster we found as default > update vdc_options > set option_value = (select cluster_id from cluster LIMIT 1) > where option_name = 'AutoRegistrationDefaultClusterID' and version = 'general'; > END IF; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >select __temp_set_default_cluster_for_registration(); >************************** > > > >********* QUERY ********** >drop function __temp_set_default_cluster_for_registration(); >************************** > >DROP FUNCTION >2019-02-26 17:06:42,375+0100 Running upgrade sql script '/usr/share/ovirt-engine/dbscripts/upgrade/post_upgrade/0040_reindex_vdc_options.sql'... >2019-02-26 17:06:42,377+0100 dbfunc_psql_die --file=/usr/share/ovirt-engine/dbscripts/upgrade/post_upgrade/0040_reindex_vdc_options.sql >********* QUERY ********** >REINDEX TABLE vdc_options; >************************** > >REINDEX >2019-02-26 17:06:42,390+0100 Applying custom users permissions on database objects... >********* QUERY ********** > >************************** > >2019-02-26 17:06:42,398+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.executeRaw:863 execute-result: ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine', '-d', 'engine', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'], rc=0 >2019-02-26 17:06:42,398+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.execute:921 execute-output: ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine', '-d', 'engine', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'] stdout: > > >2019-02-26 17:06:42,398+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.execute:926 execute-output: ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine', '-d', 'engine', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'] stderr: > > >2019-02-26 17:06:42,401+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._restart_provider_service >2019-02-26 17:06:42,401+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:42,403+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.config.Plugin._misc >2019-02-26 17:06:42,404+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf'' >2019-02-26 17:06:42,404+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf' exists >2019-02-26 17:06:42,404+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf' already has content >2019-02-26 17:06:42,405+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine-dwh/examples/10-setup-dwh-database.conf'' >2019-02-26 17:06:42,405+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine-dwh/examples/10-setup-dwh-database.conf' exists >2019-02-26 17:06:42,405+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine-dwh/examples/10-setup-dwh-database.conf' already has content >2019-02-26 17:06:42,406+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:42,406+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/ovirt_dwh_files=list:'[[], []]' >2019-02-26 17:06:42,406+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:42,407+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh_database.Plugin._miscDWHConfig >2019-02-26 17:06:42,408+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-dwh-database.conf'' >2019-02-26 17:06:42,408+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/engine.conf.d/10-setup-dwh-database.conf' exists >2019-02-26 17:06:42,408+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/engine.conf.d/10-setup-dwh-database.conf' already has content >2019-02-26 17:06:42,410+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.connection.Plugin._connection >2019-02-26 17:06:42,413+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:42,414+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/connection=connection:'<connection object at 0x7f1fdf5e26e0; dsn: 'user=ovirt_engine_history password=xxxxxxxxxxxxxxxxxxxxxx host=localhost port=5432 sslmode=allow dbname=ovirt_engine_history', closed: 0>' >2019-02-26 17:06:42,414+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/statement=Statement:'<ovirt_engine_setup.engine_common.database.Statement object at 0x7f1fdf27bf50>' >2019-02-26 17:06:42,414+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:42,415+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.vacuum.Plugin._vacuum >2019-02-26 17:06:42,415+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:42,417+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.database.Plugin._misc >2019-02-26 17:06:42,418+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-database.conf'' >2019-02-26 17:06:42,418+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/engine.conf.d/10-setup-database.conf' exists >2019-02-26 17:06:42,418+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/engine.conf.d/10-setup-database.conf' already has content >2019-02-26 17:06:42,420+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.db.connection.Plugin._connection >2019-02-26 17:06:42,423+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:42,423+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/connection=connection:'<connection object at 0x7f1fdf5e2280; dsn: 'user=engine password=xxxxxxxxxxxxxxxxxxxxxx host=localhost port=5432 sslmode=allow dbname=engine', closed: 0>' >2019-02-26 17:06:42,424+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/statement=Statement:'<ovirt_engine_setup.engine_common.database.Statement object at 0x7f1fdeca8f90>' >2019-02-26 17:06:42,424+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:42,425+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_dwh.db.engine_connection.Plugin._engine_connection >2019-02-26 17:06:42,425+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:42,427+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._attach_group_to_role >2019-02-26 17:06:42,428+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select attach_group_to_role( > 'ovirt-administrator', > 'SuperUser' > ) > ', args: {} >2019-02-26 17:06:42,431+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'attach_group_to_role': ''}] >2019-02-26 17:06:42,434+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._misc >2019-02-26 17:06:42,434+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc aaajdbc._setupSchema:100 Creating/refreshing Engine 'internal' domain database schema >2019-02-26 17:06:42,434+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.executeRaw:813 execute: ['/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine', '-d', 'engine', '-e', 'aaa_jdbc', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'], executable='None', cwd='None', env={'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'DBFUNC_DB_PGPASSFILE': '/tmp/tmphKUzTK', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'} >********* QUERY ********** >select 1; >************************** > > 1 > >********* QUERY ********** >copy ( > SELECT COUNT(schema_name) > FROM information_schema.schemata > WHERE schema_name = 'aaa_jdbc' > ) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy ( > select count(*) as count > from pg_catalog.pg_tables > where > tablename = 'schema_version' and > schemaname = 'aaa_jdbc' > ) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >SET search_path TO aaa_jdbc; >************************** > >SET >********* QUERY ********** >select 1000000; >************************** > > 1000000 > >********* QUERY ********** >SET search_path TO aaa_jdbc; >************************** > >SET >********* QUERY ********** >Create or replace FUNCTION fn_db_add_column(v_table varchar(128), v_column varchar(128), v_column_def text) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (not exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_drop_column(v_table varchar(128), v_column varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > EXECUTE v_sql; > end; > else > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >end;$procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_change_column_type(v_table varchar(128), v_column varchar(128), > v_type varchar(128), v_new_type varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column and (udt_name ilike v_type or data_type ilike v_type))) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > end; > --- ignore operation if requested type is already there > elsif (not exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column and > (udt_name ilike v_new_type or data_type ilike v_new_type))) then > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_rename_column(v_table varchar(128), v_column varchar(128), v_new_name varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > EXECUTE v_sql; > end; > else > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_create_constraint ( > v_table varchar(128), v_constraint varchar(128), v_constraint_sql text) >returns void >AS $procedure$ >begin > if NOT EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_drop_constraint ( > v_table varchar(128), v_constraint varchar(128)) >returns void >AS $procedure$ >begin > if EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION CheckDBConnection() RETURNS SETOF integer IMMUTABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_functions_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' from pg_proc inner join pg_namespace ns on (pg_proc.pronamespace=ns.oid) where ns.nspname = 'aaa_jdbc' order by proname; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_views_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP VIEW if exists ' || table_schema || '.' || table_name || ' CASCADE;' from information_schema.views where table_schema = 'aaa_jdbc' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_tables_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP TABLE if exists ' || table_schema || '.' || table_name || ' CASCADE;' from information_schema.tables where table_schema = 'aaa_jdbc' and table_type = 'BASE TABLE' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_seq_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP SEQUENCE if exists ' || sequence_schema || '.' || sequence_name || ' CASCADE;' from information_schema.sequences where sequence_schema = 'aaa_jdbc' order by sequence_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_user_types_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, pg_class c, pg_type t > WHERE n.oid = c.relnamespace and t.typrelid = c.oid and c.relkind = 'c'::"char" and > n.nspname = 'aaa_jdbc' > ORDER BY c.relname::information_schema.sql_identifier; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_get_column_size( v_table varchar(64), v_column varchar(64)) returns integer STABLE > AS $procedure$ > declare > retvalue integer; >BEGIN > retvalue := character_maximum_length from information_schema.columns > where > table_schema = 'aaa_jdbc' and > table_name ilike v_table and column_name ilike v_column and > table_schema = 'aaa_jdbc' and udt_name in ('char','varchar'); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object(v_object regclass) RETURNS setof record as >$BODY$ >DECLARE > v_sql TEXT; > v_table record; > v_table_name TEXT; > temprec record; >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > select c.relname, n.nspname INTO v_table > FROM pg_class c join pg_namespace n on c.relnamespace = n.oid WHERE c.oid = v_object; > -- try to get filtered query syntax from previous execution > if exists (select 1 from object_column_white_list_sql where object_name = v_table.relname) then > select sql into v_sql from object_column_white_list_sql where object_name = v_table.relname; > else > v_table_name := quote_ident( v_table.nspname ) || '.' || quote_ident( v_table.relname ); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > for temprec in select a.attname, t.typname > FROM pg_attribute a join pg_type t on a.atttypid = t.oid > WHERE a.attrelid = v_object AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum > loop > v_sql := coalesce( v_sql || ', ', 'SELECT ' ); > if exists(select 1 from object_column_white_list > where object_name = v_table.relname and column_name = temprec.attname) then > v_sql := v_sql || quote_ident( temprec.attname ); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident( temprec.typname ) || ' as ' || quote_ident( temprec.attname ); > END IF; > END LOOP; > v_sql := v_sql || ' FROM ' || v_table_name; > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > -- save generated query for further use > insert into object_column_white_list_sql(object_name,sql) values (v_table.relname, v_sql); > end if; > RETURN QUERY EXECUTE v_sql; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_is_table_exists (v_table varchar(64)) returns boolean STABLE > AS $procedure$ > declare > retvalue boolean; >BEGIN > retvalue := EXISTS ( > SELECT * FROM information_schema.tables WHERE table_schema = 'aaa_jdbc' AND table_name ILIKE v_table > ); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_create_index(v_index_name varchar(128), v_table_name varchar(128), v_column_names text, v_where_predicate text) >returns void >AS $procedure$ >DECLARE > v_sql TEXT; >BEGIN > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || '; CREATE INDEX ' || v_index_name || ' ON ' || v_table_name || '(' || v_column_names || ')'; > IF v_where_predicate = '' THEN > v_sql := v_sql || ';'; > ELSE > v_sql := v_sql || ' WHERE ' || v_where_predicate || ';'; > END IF; > EXECUTE v_sql; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_config_value_for_versions_up_to(v_option_name varchar(100), v_val varchar(4000), v_version varchar(40)) >returns void >AS $procedure$ >declare > i int; > arr varchar[] := array['3.0', '3.1', '3.2', '3.3', '3.4', '3.5', '3.6']; >begin > FOR i IN array_lower(arr, 1) .. array_upper(arr, 1) > LOOP > PERFORM fn_db_add_config_value(v_option_name, v_val, arr[i]); > EXIT WHEN arr[i] = v_version; > END LOOP; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >select * from aaa_jdbc.generate_drop_all_views_syntax(); >************************** > > >********* QUERY ********** >SET search_path TO aaa_jdbc; >************************** > >SET >********* QUERY ********** >Create or replace FUNCTION fn_db_add_column(v_table varchar(128), v_column varchar(128), v_column_def text) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (not exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_drop_column(v_table varchar(128), v_column varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > EXECUTE v_sql; > end; > else > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >end;$procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_change_column_type(v_table varchar(128), v_column varchar(128), > v_type varchar(128), v_new_type varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column and (udt_name ilike v_type or data_type ilike v_type))) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > end; > --- ignore operation if requested type is already there > elsif (not exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column and > (udt_name ilike v_new_type or data_type ilike v_new_type))) then > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_rename_column(v_table varchar(128), v_column varchar(128), v_new_name varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > EXECUTE v_sql; > end; > else > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_create_constraint ( > v_table varchar(128), v_constraint varchar(128), v_constraint_sql text) >returns void >AS $procedure$ >begin > if NOT EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_drop_constraint ( > v_table varchar(128), v_constraint varchar(128)) >returns void >AS $procedure$ >begin > if EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION CheckDBConnection() RETURNS SETOF integer IMMUTABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_functions_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' from pg_proc inner join pg_namespace ns on (pg_proc.pronamespace=ns.oid) where ns.nspname = 'aaa_jdbc' order by proname; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_views_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP VIEW if exists ' || table_schema || '.' || table_name || ' CASCADE;' from information_schema.views where table_schema = 'aaa_jdbc' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_tables_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP TABLE if exists ' || table_schema || '.' || table_name || ' CASCADE;' from information_schema.tables where table_schema = 'aaa_jdbc' and table_type = 'BASE TABLE' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_seq_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP SEQUENCE if exists ' || sequence_schema || '.' || sequence_name || ' CASCADE;' from information_schema.sequences where sequence_schema = 'aaa_jdbc' order by sequence_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_user_types_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, pg_class c, pg_type t > WHERE n.oid = c.relnamespace and t.typrelid = c.oid and c.relkind = 'c'::"char" and > n.nspname = 'aaa_jdbc' > ORDER BY c.relname::information_schema.sql_identifier; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_get_column_size( v_table varchar(64), v_column varchar(64)) returns integer STABLE > AS $procedure$ > declare > retvalue integer; >BEGIN > retvalue := character_maximum_length from information_schema.columns > where > table_schema = 'aaa_jdbc' and > table_name ilike v_table and column_name ilike v_column and > table_schema = 'aaa_jdbc' and udt_name in ('char','varchar'); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object(v_object regclass) RETURNS setof record as >$BODY$ >DECLARE > v_sql TEXT; > v_table record; > v_table_name TEXT; > temprec record; >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > select c.relname, n.nspname INTO v_table > FROM pg_class c join pg_namespace n on c.relnamespace = n.oid WHERE c.oid = v_object; > -- try to get filtered query syntax from previous execution > if exists (select 1 from object_column_white_list_sql where object_name = v_table.relname) then > select sql into v_sql from object_column_white_list_sql where object_name = v_table.relname; > else > v_table_name := quote_ident( v_table.nspname ) || '.' || quote_ident( v_table.relname ); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > for temprec in select a.attname, t.typname > FROM pg_attribute a join pg_type t on a.atttypid = t.oid > WHERE a.attrelid = v_object AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum > loop > v_sql := coalesce( v_sql || ', ', 'SELECT ' ); > if exists(select 1 from object_column_white_list > where object_name = v_table.relname and column_name = temprec.attname) then > v_sql := v_sql || quote_ident( temprec.attname ); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident( temprec.typname ) || ' as ' || quote_ident( temprec.attname ); > END IF; > END LOOP; > v_sql := v_sql || ' FROM ' || v_table_name; > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > -- save generated query for further use > insert into object_column_white_list_sql(object_name,sql) values (v_table.relname, v_sql); > end if; > RETURN QUERY EXECUTE v_sql; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_is_table_exists (v_table varchar(64)) returns boolean STABLE > AS $procedure$ > declare > retvalue boolean; >BEGIN > retvalue := EXISTS ( > SELECT * FROM information_schema.tables WHERE table_schema = 'aaa_jdbc' AND table_name ILIKE v_table > ); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_create_index(v_index_name varchar(128), v_table_name varchar(128), v_column_names text, v_where_predicate text) >returns void >AS $procedure$ >DECLARE > v_sql TEXT; >BEGIN > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || '; CREATE INDEX ' || v_index_name || ' ON ' || v_table_name || '(' || v_column_names || ')'; > IF v_where_predicate = '' THEN > v_sql := v_sql || ';'; > ELSE > v_sql := v_sql || ' WHERE ' || v_where_predicate || ';'; > END IF; > EXECUTE v_sql; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_config_value_for_versions_up_to(v_option_name varchar(100), v_val varchar(4000), v_version varchar(40)) >returns void >AS $procedure$ >declare > i int; > arr varchar[] := array['3.0', '3.1', '3.2', '3.3', '3.4', '3.5', '3.6']; >begin > FOR i IN array_lower(arr, 1) .. array_upper(arr, 1) > LOOP > PERFORM fn_db_add_config_value(v_option_name, v_val, arr[i]); > EXIT WHEN arr[i] = v_version; > END LOOP; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >select * from aaa_jdbc.generate_drop_all_functions_syntax(); >************************** > > drop function if exists aaa_jdbc.checkdbconnection() cascade; > drop function if exists aaa_jdbc.fn_db_add_column(character varying, character varying, text) cascade; > drop function if exists aaa_jdbc.fn_db_add_config_value_for_versions_up_to(character varying, character varying, character varying) cascade; > drop function if exists aaa_jdbc.fn_db_change_column_type(character varying, character varying, character varying, character varying) cascade; > drop function if exists aaa_jdbc.fn_db_create_constraint(character varying, character varying, text) cascade; > drop function if exists aaa_jdbc.fn_db_create_index(character varying, character varying, text, text) cascade; > drop function if exists aaa_jdbc.fn_db_drop_column(character varying, character varying) cascade; > drop function if exists aaa_jdbc.fn_db_drop_constraint(character varying, character varying) cascade; > drop function if exists aaa_jdbc.fn_db_is_table_exists(character varying) cascade; > drop function if exists aaa_jdbc.fn_db_mask_object(regclass) cascade; > drop function if exists aaa_jdbc.fn_db_rename_column(character varying, character varying, character varying) cascade; > drop function if exists aaa_jdbc.fn_get_column_size(character varying, character varying) cascade; > drop function if exists aaa_jdbc.generate_drop_all_functions_syntax() cascade; > drop function if exists aaa_jdbc.generate_drop_all_seq_syntax() cascade; > drop function if exists aaa_jdbc.generate_drop_all_tables_syntax() cascade; > drop function if exists aaa_jdbc.generate_drop_all_user_types_syntax() cascade; > drop function if exists aaa_jdbc.generate_drop_all_views_syntax() cascade; > >********* QUERY ********** > drop function if exists aaa_jdbc.checkdbconnection() cascade; > drop function if exists aaa_jdbc.fn_db_add_column(character varying, character varying, text) cascade; > drop function if exists aaa_jdbc.fn_db_add_config_value_for_versions_up_to(character varying, character varying, character varying) cascade; > drop function if exists aaa_jdbc.fn_db_change_column_type(character varying, character varying, character varying, character varying) cascade; > drop function if exists aaa_jdbc.fn_db_create_constraint(character varying, character varying, text) cascade; > drop function if exists aaa_jdbc.fn_db_create_index(character varying, character varying, text, text) cascade; > drop function if exists aaa_jdbc.fn_db_drop_column(character varying, character varying) cascade; > drop function if exists aaa_jdbc.fn_db_drop_constraint(character varying, character varying) cascade; > drop function if exists aaa_jdbc.fn_db_is_table_exists(character varying) cascade; > drop function if exists aaa_jdbc.fn_db_mask_object(regclass) cascade; > drop function if exists aaa_jdbc.fn_db_rename_column(character varying, character varying, character varying) cascade; > drop function if exists aaa_jdbc.fn_get_column_size(character varying, character varying) cascade; > drop function if exists aaa_jdbc.generate_drop_all_functions_syntax() cascade; > drop function if exists aaa_jdbc.generate_drop_all_seq_syntax() cascade; > drop function if exists aaa_jdbc.generate_drop_all_tables_syntax() cascade; > drop function if exists aaa_jdbc.generate_drop_all_user_types_syntax() cascade; > drop function if exists aaa_jdbc.generate_drop_all_views_syntax() cascade; >************************** > >DROP FUNCTION >********* QUERY ********** >SET search_path TO aaa_jdbc; >************************** > >SET >********* QUERY ********** >SET search_path TO aaa_jdbc; >************************** > >SET >********* QUERY ********** >Create or replace FUNCTION fn_db_add_column(v_table varchar(128), v_column varchar(128), v_column_def text) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (not exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_drop_column(v_table varchar(128), v_column varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > EXECUTE v_sql; > end; > else > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >end;$procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_change_column_type(v_table varchar(128), v_column varchar(128), > v_type varchar(128), v_new_type varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column and (udt_name ilike v_type or data_type ilike v_type))) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > end; > --- ignore operation if requested type is already there > elsif (not exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column and > (udt_name ilike v_new_type or data_type ilike v_new_type))) then > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_rename_column(v_table varchar(128), v_column varchar(128), v_new_name varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > EXECUTE v_sql; > end; > else > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_create_constraint ( > v_table varchar(128), v_constraint varchar(128), v_constraint_sql text) >returns void >AS $procedure$ >begin > if NOT EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_drop_constraint ( > v_table varchar(128), v_constraint varchar(128)) >returns void >AS $procedure$ >begin > if EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION CheckDBConnection() RETURNS SETOF integer IMMUTABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_functions_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' from pg_proc inner join pg_namespace ns on (pg_proc.pronamespace=ns.oid) where ns.nspname = 'aaa_jdbc' order by proname; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_views_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP VIEW if exists ' || table_schema || '.' || table_name || ' CASCADE;' from information_schema.views where table_schema = 'aaa_jdbc' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_tables_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP TABLE if exists ' || table_schema || '.' || table_name || ' CASCADE;' from information_schema.tables where table_schema = 'aaa_jdbc' and table_type = 'BASE TABLE' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_seq_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP SEQUENCE if exists ' || sequence_schema || '.' || sequence_name || ' CASCADE;' from information_schema.sequences where sequence_schema = 'aaa_jdbc' order by sequence_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_user_types_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, pg_class c, pg_type t > WHERE n.oid = c.relnamespace and t.typrelid = c.oid and c.relkind = 'c'::"char" and > n.nspname = 'aaa_jdbc' > ORDER BY c.relname::information_schema.sql_identifier; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_get_column_size( v_table varchar(64), v_column varchar(64)) returns integer STABLE > AS $procedure$ > declare > retvalue integer; >BEGIN > retvalue := character_maximum_length from information_schema.columns > where > table_schema = 'aaa_jdbc' and > table_name ilike v_table and column_name ilike v_column and > table_schema = 'aaa_jdbc' and udt_name in ('char','varchar'); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object(v_object regclass) RETURNS setof record as >$BODY$ >DECLARE > v_sql TEXT; > v_table record; > v_table_name TEXT; > temprec record; >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > select c.relname, n.nspname INTO v_table > FROM pg_class c join pg_namespace n on c.relnamespace = n.oid WHERE c.oid = v_object; > -- try to get filtered query syntax from previous execution > if exists (select 1 from object_column_white_list_sql where object_name = v_table.relname) then > select sql into v_sql from object_column_white_list_sql where object_name = v_table.relname; > else > v_table_name := quote_ident( v_table.nspname ) || '.' || quote_ident( v_table.relname ); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > for temprec in select a.attname, t.typname > FROM pg_attribute a join pg_type t on a.atttypid = t.oid > WHERE a.attrelid = v_object AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum > loop > v_sql := coalesce( v_sql || ', ', 'SELECT ' ); > if exists(select 1 from object_column_white_list > where object_name = v_table.relname and column_name = temprec.attname) then > v_sql := v_sql || quote_ident( temprec.attname ); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident( temprec.typname ) || ' as ' || quote_ident( temprec.attname ); > END IF; > END LOOP; > v_sql := v_sql || ' FROM ' || v_table_name; > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > -- save generated query for further use > insert into object_column_white_list_sql(object_name,sql) values (v_table.relname, v_sql); > end if; > RETURN QUERY EXECUTE v_sql; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_is_table_exists (v_table varchar(64)) returns boolean STABLE > AS $procedure$ > declare > retvalue boolean; >BEGIN > retvalue := EXISTS ( > SELECT * FROM information_schema.tables WHERE table_schema = 'aaa_jdbc' AND table_name ILIKE v_table > ); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_create_index(v_index_name varchar(128), v_table_name varchar(128), v_column_names text, v_where_predicate text) >returns void >AS $procedure$ >DECLARE > v_sql TEXT; >BEGIN > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || '; CREATE INDEX ' || v_index_name || ' ON ' || v_table_name || '(' || v_column_names || ')'; > IF v_where_predicate = '' THEN > v_sql := v_sql || ';'; > ELSE > v_sql := v_sql || ' WHERE ' || v_where_predicate || ';'; > END IF; > EXECUTE v_sql; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_config_value_for_versions_up_to(v_option_name varchar(100), v_val varchar(4000), v_version varchar(40)) >returns void >AS $procedure$ >declare > i int; > arr varchar[] := array['3.0', '3.1', '3.2', '3.3', '3.4', '3.5', '3.6']; >begin > FOR i IN array_lower(arr, 1) .. array_upper(arr, 1) > LOOP > PERFORM fn_db_add_config_value(v_option_name, v_val, arr[i]); > EXIT WHEN arr[i] = v_version; > END LOOP; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >SET search_path TO aaa_jdbc; >************************** > >SET >********* QUERY ********** >SELECT setval('schema_version_seq', max(id)) FROM schema_version; >************************** > > 7 > >********* QUERY ********** >copy ( > select version > from aaa_jdbc.schema_version > where current = true > order by id > LIMIT 1 > ) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy (select now()) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** >copy ( > select max(id) > from aaa_jdbc.schema_version > where state in ('INSTALLED','SKIPPED') > ) to stdout with delimiter as '|'; >************************** > >********* QUERY ********** > > update aaa_jdbc.schema_version > set current=(id=7); > >************************** > >UPDATE 7 >********* QUERY ********** >SET search_path TO aaa_jdbc; >************************** > >SET >********* QUERY ********** >Create or replace FUNCTION fn_db_add_column(v_table varchar(128), v_column varchar(128), v_column_def text) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (not exists (select 1 from information_schema.columns where table_schema = '@SCHEMA_NAME@' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_drop_column(v_table varchar(128), v_column varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; >begin > if (exists (select 1 from information_schema.columns where table_schema = '@SCHEMA_NAME@' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > EXECUTE v_sql; > end; > else > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >end;$procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_change_column_type(v_table varchar(128), v_column varchar(128), > v_type varchar(128), v_new_type varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_schema = '@SCHEMA_NAME@' and table_name ilike v_table and column_name ilike v_column and (udt_name ilike v_type or data_type ilike v_type))) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > end; > --- ignore operation if requested type is already there > elsif (not exists (select 1 from information_schema.columns where table_schema = '@SCHEMA_NAME@' and table_name ilike v_table and column_name ilike v_column and > (udt_name ilike v_new_type or data_type ilike v_new_type))) then > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_rename_column(v_table varchar(128), v_column varchar(128), v_new_name varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_schema = '@SCHEMA_NAME@' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > EXECUTE v_sql; > end; > else > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_create_constraint ( > v_table varchar(128), v_constraint varchar(128), v_constraint_sql text) >returns void >AS $procedure$ >begin > if NOT EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_drop_constraint ( > v_table varchar(128), v_constraint varchar(128)) >returns void >AS $procedure$ >begin > if EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION CheckDBConnection() RETURNS SETOF integer IMMUTABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_functions_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' from pg_proc inner join pg_namespace ns on (pg_proc.pronamespace=ns.oid) where ns.nspname = '@SCHEMA_NAME@' order by proname; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_views_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP VIEW if exists ' || table_schema || '.' || table_name || ' CASCADE;' from information_schema.views where table_schema = '@SCHEMA_NAME@' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_tables_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP TABLE if exists ' || table_schema || '.' || table_name || ' CASCADE;' from information_schema.tables where table_schema = '@SCHEMA_NAME@' and table_type = 'BASE TABLE' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_seq_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP SEQUENCE if exists ' || sequence_schema || '.' || sequence_name || ' CASCADE;' from information_schema.sequences where sequence_schema = '@SCHEMA_NAME@' order by sequence_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_user_types_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, pg_class c, pg_type t > WHERE n.oid = c.relnamespace and t.typrelid = c.oid and c.relkind = 'c'::"char" and > n.nspname = '@SCHEMA_NAME@' > ORDER BY c.relname::information_schema.sql_identifier; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_get_column_size( v_table varchar(64), v_column varchar(64)) returns integer STABLE > AS $procedure$ > declare > retvalue integer; >BEGIN > retvalue := character_maximum_length from information_schema.columns > where > table_schema = '@SCHEMA_NAME@' and > table_name ilike v_table and column_name ilike v_column and > table_schema = '@SCHEMA_NAME@' and udt_name in ('char','varchar'); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object(v_object regclass) RETURNS setof record as >$BODY$ >DECLARE > v_sql TEXT; > v_table record; > v_table_name TEXT; > temprec record; >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > select c.relname, n.nspname INTO v_table > FROM pg_class c join pg_namespace n on c.relnamespace = n.oid WHERE c.oid = v_object; > -- try to get filtered query syntax from previous execution > if exists (select 1 from object_column_white_list_sql where object_name = v_table.relname) then > select sql into v_sql from object_column_white_list_sql where object_name = v_table.relname; > else > v_table_name := quote_ident( v_table.nspname ) || '.' || quote_ident( v_table.relname ); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > for temprec in select a.attname, t.typname > FROM pg_attribute a join pg_type t on a.atttypid = t.oid > WHERE a.attrelid = v_object AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum > loop > v_sql := coalesce( v_sql || ', ', 'SELECT ' ); > if exists(select 1 from object_column_white_list > where object_name = v_table.relname and column_name = temprec.attname) then > v_sql := v_sql || quote_ident( temprec.attname ); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident( temprec.typname ) || ' as ' || quote_ident( temprec.attname ); > END IF; > END LOOP; > v_sql := v_sql || ' FROM ' || v_table_name; > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > -- save generated query for further use > insert into object_column_white_list_sql(object_name,sql) values (v_table.relname, v_sql); > end if; > RETURN QUERY EXECUTE v_sql; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_is_table_exists (v_table varchar(64)) returns boolean STABLE > AS $procedure$ > declare > retvalue boolean; >BEGIN > retvalue := EXISTS ( > SELECT * FROM information_schema.tables WHERE table_schema = '@SCHEMA_NAME@' AND table_name ILIKE v_table > ); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_create_index(v_index_name varchar(128), v_table_name varchar(128), v_column_names text, v_where_predicate text) >returns void >AS $procedure$ >DECLARE > v_sql TEXT; >BEGIN > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || '; CREATE INDEX ' || v_index_name || ' ON ' || v_table_name || '(' || v_column_names || ')'; > IF v_where_predicate = '' THEN > v_sql := v_sql || ';'; > ELSE > v_sql := v_sql || ' WHERE ' || v_where_predicate || ';'; > END IF; > EXECUTE v_sql; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_config_value_for_versions_up_to(v_option_name varchar(100), v_val varchar(4000), v_version varchar(40)) >returns void >AS $procedure$ >declare > i int; > arr varchar[] := array['3.0', '3.1', '3.2', '3.3', '3.4', '3.5', '3.6']; >begin > FOR i IN array_lower(arr, 1) .. array_upper(arr, 1) > LOOP > PERFORM fn_db_add_config_value(v_option_name, v_val, arr[i]); > EXIT WHEN arr[i] = v_version; > END LOOP; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >SET search_path TO aaa_jdbc; >************************** > >SET >********* QUERY ********** >Create or replace FUNCTION fn_db_add_column(v_table varchar(128), v_column varchar(128), v_column_def text) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (not exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ADD COLUMN ' || v_column || ' ' || v_column_def; > EXECUTE v_sql; > end; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_drop_column(v_table varchar(128), v_column varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' DROP COLUMN ' || v_column; > EXECUTE v_sql; > end; > else > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >end;$procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_change_column_type(v_table varchar(128), v_column varchar(128), > v_type varchar(128), v_new_type varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column and (udt_name ilike v_type or data_type ilike v_type))) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' ALTER COLUMN ' || v_column || ' TYPE ' || v_new_type; > EXECUTE v_sql; > end; > --- ignore operation if requested type is already there > elsif (not exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column and > (udt_name ilike v_new_type or data_type ilike v_new_type))) then > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_db_rename_column(v_table varchar(128), v_column varchar(128), v_new_name varchar(128)) >returns void >AS $procedure$ >declare >v_sql text; > >begin > if (exists (select 1 from information_schema.columns where table_schema = 'aaa_jdbc' and table_name ilike v_table and column_name ilike v_column)) then > begin > v_sql := 'ALTER TABLE ' || v_table || ' RENAME COLUMN ' || v_column || ' TO ' || v_new_name; > EXECUTE v_sql; > end; > else > RAISE EXCEPTION 'Table % or Column % does not exist.', v_table, v_column; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_create_constraint ( > v_table varchar(128), v_constraint varchar(128), v_constraint_sql text) >returns void >AS $procedure$ >begin > if NOT EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' ADD CONSTRAINT ' || v_constraint || ' ' || v_constraint_sql; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace function fn_db_drop_constraint ( > v_table varchar(128), v_constraint varchar(128)) >returns void >AS $procedure$ >begin > if EXISTS (SELECT 1 from pg_constraint where conname ilike v_constraint) then > execute 'ALTER TABLE ' || v_table || ' DROP CONSTRAINT ' || v_constraint || ' CASCADE'; > end if; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION CheckDBConnection() RETURNS SETOF integer IMMUTABLE > AS $procedure$ >BEGIN > RETURN QUERY SELECT 1; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_functions_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' from pg_proc inner join pg_namespace ns on (pg_proc.pronamespace=ns.oid) where ns.nspname = 'aaa_jdbc' order by proname; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_views_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP VIEW if exists ' || table_schema || '.' || table_name || ' CASCADE;' from information_schema.views where table_schema = 'aaa_jdbc' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_tables_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP TABLE if exists ' || table_schema || '.' || table_name || ' CASCADE;' from information_schema.tables where table_schema = 'aaa_jdbc' and table_type = 'BASE TABLE' order by table_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_seq_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY select 'DROP SEQUENCE if exists ' || sequence_schema || '.' || sequence_name || ' CASCADE;' from information_schema.sequences where sequence_schema = 'aaa_jdbc' order by sequence_name; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION generate_drop_all_user_types_syntax() RETURNS SETOF text STABLE > AS $procedure$ >BEGIN >RETURN QUERY SELECT 'DROP TYPE if exists ' || c.relname::information_schema.sql_identifier || ' CASCADE;' > FROM pg_namespace n, pg_class c, pg_type t > WHERE n.oid = c.relnamespace and t.typrelid = c.oid and c.relkind = 'c'::"char" and > n.nspname = 'aaa_jdbc' > ORDER BY c.relname::information_schema.sql_identifier; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >Create or replace FUNCTION fn_get_column_size( v_table varchar(64), v_column varchar(64)) returns integer STABLE > AS $procedure$ > declare > retvalue integer; >BEGIN > retvalue := character_maximum_length from information_schema.columns > where > table_schema = 'aaa_jdbc' and > table_name ilike v_table and column_name ilike v_column and > table_schema = 'aaa_jdbc' and udt_name in ('char','varchar'); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_mask_object(v_object regclass) RETURNS setof record as >$BODY$ >DECLARE > v_sql TEXT; > v_table record; > v_table_name TEXT; > temprec record; >BEGIN > -- get full table/view name from v_object (i.e <namespace>.<name>) > select c.relname, n.nspname INTO v_table > FROM pg_class c join pg_namespace n on c.relnamespace = n.oid WHERE c.oid = v_object; > -- try to get filtered query syntax from previous execution > if exists (select 1 from object_column_white_list_sql where object_name = v_table.relname) then > select sql into v_sql from object_column_white_list_sql where object_name = v_table.relname; > else > v_table_name := quote_ident( v_table.nspname ) || '.' || quote_ident( v_table.relname ); > -- compose sql statement while skipping values for columns not defined in object_column_white_list for this table. > for temprec in select a.attname, t.typname > FROM pg_attribute a join pg_type t on a.atttypid = t.oid > WHERE a.attrelid = v_object AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum > loop > v_sql := coalesce( v_sql || ', ', 'SELECT ' ); > if exists(select 1 from object_column_white_list > where object_name = v_table.relname and column_name = temprec.attname) then > v_sql := v_sql || quote_ident( temprec.attname ); > ELSE > v_sql := v_sql || 'NULL::' || quote_ident( temprec.typname ) || ' as ' || quote_ident( temprec.attname ); > END IF; > END LOOP; > v_sql := v_sql || ' FROM ' || v_table_name; > v_sql := 'SELECT x::' || v_table_name || ' as rec FROM (' || v_sql || ') as x'; > -- save generated query for further use > insert into object_column_white_list_sql(object_name,sql) values (v_table.relname, v_sql); > end if; > RETURN QUERY EXECUTE v_sql; >END; $BODY$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >CREATE OR REPLACE FUNCTION fn_db_is_table_exists (v_table varchar(64)) returns boolean STABLE > AS $procedure$ > declare > retvalue boolean; >BEGIN > retvalue := EXISTS ( > SELECT * FROM information_schema.tables WHERE table_schema = 'aaa_jdbc' AND table_name ILIKE v_table > ); > return retvalue; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_create_index(v_index_name varchar(128), v_table_name varchar(128), v_column_names text, v_where_predicate text) >returns void >AS $procedure$ >DECLARE > v_sql TEXT; >BEGIN > v_sql := 'DROP INDEX ' || ' IF EXISTS ' || v_index_name || '; CREATE INDEX ' || v_index_name || ' ON ' || v_table_name || '(' || v_column_names || ')'; > IF v_where_predicate = '' THEN > v_sql := v_sql || ';'; > ELSE > v_sql := v_sql || ' WHERE ' || v_where_predicate || ';'; > END IF; > EXECUTE v_sql; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** >create or replace FUNCTION fn_db_add_config_value_for_versions_up_to(v_option_name varchar(100), v_val varchar(4000), v_version varchar(40)) >returns void >AS $procedure$ >declare > i int; > arr varchar[] := array['3.0', '3.1', '3.2', '3.3', '3.4', '3.5', '3.6']; >begin > FOR i IN array_lower(arr, 1) .. array_upper(arr, 1) > LOOP > PERFORM fn_db_add_config_value(v_option_name, v_val, arr[i]); > EXIT WHEN arr[i] = v_version; > END LOOP; >END; $procedure$ >LANGUAGE plpgsql; >************************** > >CREATE FUNCTION >********* QUERY ********** > >************************** > >2019-02-26 17:06:43,772+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.executeRaw:863 execute-result: ['/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine', '-d', 'engine', '-e', 'aaa_jdbc', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'], rc=0 >2019-02-26 17:06:43,773+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.execute:921 execute-output: ['/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine', '-d', 'engine', '-e', 'aaa_jdbc', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'] stdout: >Creating schema aaa_jdbc in engine@localhost:5432/engine >Saving custom users permissions on database objects... >upgrade script detected a change in Config, View or Stored Procedure... >Creating stored procedures... >Creating stored procedures from /usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/common_sp.sql... >Applying custom users permissions on database objects... > >2019-02-26 17:06:43,773+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.execute:926 execute-output: ['/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine', '-d', 'engine', '-e', 'aaa_jdbc', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', '-c', 'apply'] stderr: > > >2019-02-26 17:06:43,773+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/aaa/internal.properties'' >2019-02-26 17:06:43,774+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/aaa/internal.properties' exists >2019-02-26 17:06:43,774+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/aaa/internal.properties' already has content >2019-02-26 17:06:43,774+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/extensions.d/internal-authn.properties'' >2019-02-26 17:06:43,774+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/extensions.d/internal-authn.properties' exists >2019-02-26 17:06:43,774+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/extensions.d/internal-authn.properties' already has content >2019-02-26 17:06:43,775+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/extensions.d/internal-authz.properties'' >2019-02-26 17:06:43,775+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/extensions.d/internal-authz.properties' exists >2019-02-26 17:06:43,775+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/extensions.d/internal-authz.properties' already has content >2019-02-26 17:06:43,775+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.executeRaw:813 execute: ('/usr/bin/ovirt-aaa-jdbc-tool', '--db-config=/etc/ovirt-engine/aaa/internal.properties', 'query', '--what=user', '--pattern=name=admin'), executable='None', cwd='None', env={'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'OVIRT_ENGINE_JAVA_HOME': u'/usr/lib/jvm/jre', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'OVIRT_JBOSS_HOME': '/usr/share/ovirt-engine-wildfly', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'OVIRT_ENGINE_JAVA_HOME_FORCE': '1', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'} >2019-02-26 17:06:44,237+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.executeRaw:863 execute-result: ('/usr/bin/ovirt-aaa-jdbc-tool', '--db-config=/etc/ovirt-engine/aaa/internal.properties', 'query', '--what=user', '--pattern=name=admin'), rc=0 >2019-02-26 17:06:44,238+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.execute:921 execute-output: ('/usr/bin/ovirt-aaa-jdbc-tool', '--db-config=/etc/ovirt-engine/aaa/internal.properties', 'query', '--what=user', '--pattern=name=admin') stdout: >-- User admin(50a91983-19f1-4193-9755-227c79ab5e36) -- >Namespace: * >Name: admin >ID: 50a91983-19f1-4193-9755-227c79ab5e36 >Display Name: >Email: >First Name: admin >Last Name: >Department: >Title: >Description: >Account Disabled: false >Account Locked: false >Account Unlocked At: 1970-01-01 00:00:00Z >Account Valid From: 2019-02-26 15:44:27Z >Account Valid To: 2219-02-26 15:44:27Z >Account Without Password: false >Last successful Login At: 2019-02-26 16:03:09Z >Last unsuccessful Login At: 2019-02-26 15:53:57Z >Password Valid To: 2219-01-09 16:01:53Z > >2019-02-26 17:06:44,238+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.execute:926 execute-output: ('/usr/bin/ovirt-aaa-jdbc-tool', '--db-config=/etc/ovirt-engine/aaa/internal.properties', 'query', '--what=user', '--pattern=name=admin') stderr: > > >2019-02-26 17:06:44,241+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.appmode.Plugin._misc >2019-02-26 17:06:44,241+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:44,243+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.ca.Plugin._misc >2019-02-26 17:06:44,243+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-pki.conf'' >2019-02-26 17:06:44,243+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/engine.conf.d/10-setup-pki.conf' exists >2019-02-26 17:06:44,243+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/engine.conf.d/10-setup-pki.conf' already has content >2019-02-26 17:06:44,244+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:44,244+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/ca_config=list:'[[]]' >2019-02-26 17:06:44,245+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_LINES_GROUP/ca_config=dict:'{}' >2019-02-26 17:06:44,245+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:44,246+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.domain_type.Plugin._misc >2019-02-26 17:06:44,246+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:44,248+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.iso_domain.Plugin._add_iso_domain_to_db >2019-02-26 17:06:44,248+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:44,250+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.options.Plugin._miscAlways >2019-02-26 17:06:44,250+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select count(*) as count > from vdc_options > where > option_name=%(name)s and > version=%(version)s > ', args: {'version': 'general', 'name': 'ProductRPMVersion'} >2019-02-26 17:06:44,251+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'count': 1L}] >2019-02-26 17:06:44,251+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select fn_db_update_config_value ( > %(name)s, > %(value)s, > %(version)s > ) > ', args: {'version': 'general', 'name': 'ProductRPMVersion', 'value': '4.3.1.2-0.0.master.20190225111554.git314f81b.el7'} >2019-02-26 17:06:44,253+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'fn_db_update_config_value': ''}] >2019-02-26 17:06:44,253+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select count(*) as count > from vdc_options > where > option_name=%(name)s and > version=%(version)s > ', args: {'version': 'general', 'name': 'DbJustRestored'} >2019-02-26 17:06:44,253+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'count': 1L}] >2019-02-26 17:06:44,254+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select fn_db_update_config_value ( > %(name)s, > %(value)s, > %(version)s > ) > ', args: {'version': 'general', 'name': 'DbJustRestored', 'value': '0'} >2019-02-26 17:06:44,255+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'fn_db_update_config_value': ''}] >2019-02-26 17:06:44,257+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.options.Plugin._miscNewDatabase >2019-02-26 17:06:44,257+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:44,259+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.public_glance_repository.Plugin._misc >2019-02-26 17:06:44,259+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select inst_add_glance_provider( > %(provider_id)s, > %(provider_name)s, > %(provider_description)s, > %(provider_url)s, > %(storage_domain_id)s > ) > ', args: {'provider_url': 'http://glance.ovirt.org:9292', 'provider_name': 'ovirt-image-repository', 'storage_domain_id': '072fbaa1-08f3-4a40-9f34-a5ca22dd1d74', 'provider_description': 'Public Glance repository for oVirt', 'provider_id': 'ceab03af-7220-4d42-8f5c-9b557f5d29af'} >2019-02-26 17:06:44,261+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'inst_add_glance_provider': ''}] >2019-02-26 17:06:44,263+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.sso.Plugin._misc >2019-02-26 17:06:44,263+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select sso_oauth_client_exists( > %(client_id)s > ) as r > ', args: {'client_id': 'ovirt-engine-core'} >2019-02-26 17:06:44,263+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'r': 1}] >2019-02-26 17:06:44,264+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Unregistering existing client registration info. >2019-02-26 17:06:44,264+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select sso_oauth_unregister_client( > %(client_id)s > ) > ', args: {'client_id': 'ovirt-engine-core'} >2019-02-26 17:06:44,264+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'sso_oauth_unregister_client': ''}] >2019-02-26 17:06:44,267+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.sso plugin.executeRaw:813 execute: ('/usr/share/ovirt-engine/bin/ovirt-engine-crypto-tool.sh', 'pbe-encode', '--password=env:pass'), executable='None', cwd='None', env={'pass': '**FILTERED**', 'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'OVIRT_ENGINE_JAVA_HOME': u'/usr/lib/jvm/jre', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'OVIRT_JBOSS_HOME': '/usr/share/ovirt-engine-wildfly', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'OVIRT_ENGINE_JAVA_HOME_FORCE': '1', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'} >2019-02-26 17:06:44,773+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.sso plugin.executeRaw:863 execute-result: ('/usr/share/ovirt-engine/bin/ovirt-engine-crypto-tool.sh', 'pbe-encode', '--password=env:pass'), rc=0 >2019-02-26 17:06:44,774+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.sso plugin.execute:921 execute-output: ('/usr/share/ovirt-engine/bin/ovirt-engine-crypto-tool.sh', 'pbe-encode', '--password=env:pass') stdout: >eyJhcnRpZmFjdCI6IkVudmVsb3BlUEJFIiwic2FsdCI6Ill2b29rSlcvUTMwbEowcEhtKzZlekJkYzN1YmFwNlIvTE1yNHA4T2d2VVE9Iiwic2VjcmV0Ijoia20wZFd2bnRKWm42Y0RVaE1qZE5PREZMOGtlRnFib1NpOVFjTHNDYnU3MD0iLCJ2ZXJzaW9uIjoiMSIsIml0ZXJhdGlvbnMiOiI0MDAwIiwiYWxnb3JpdGhtIjoiUEJLREYyV2l0aEhtYWNTSEExIn0= > >2019-02-26 17:06:44,774+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.sso plugin.execute:926 execute-output: ('/usr/share/ovirt-engine/bin/ovirt-engine-crypto-tool.sh', 'pbe-encode', '--password=env:pass') stderr: > > >2019-02-26 17:06:44,774+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select sso_oauth_register_client( > %(client_id)s, > %(client_secret)s, > %(scope)s, > %(certificate)s, > %(callback_prefix)s, > %(description)s, > %(email)s, > %(trusted)s, > %(notification_callback)s, > %(notification_callback_host_protocol)s, > %(notification_callback_host_verification)s, > %(notification_callback_chain_validation)s > ) > ', args: {'notification_callback_host_verification': False, 'description': 'oVirt Engine', 'certificate': '/etc/pki/ovirt-engine/certs/engine.cer', 'callback_prefix': 'https://gb60kf2.democustomer.televic.com:443/ovirt-engine/', 'notification_callback_host_protocol': 'TLS', 'client_id': 'ovirt-engine-core', 'notification_callback_chain_validation': True, 'scope': 'openid ovirt-app-portal ovirt-app-admin ovirt-app-api ovirt-ext=auth:identity ovirt-ext=token:password-access ovirt-ext=auth:sequence-priority ovirt-ext=token:login-on-behalf ovirt-ext=token-info:authz-search ovirt-ext=token-info:public-authz-search ovirt-ext=token-info:validate ovirt-ext=revoke:revoke-all', 'client_secret': u'eyJhcnRpZmFjdCI6IkVudmVsb3BlUEJFIiwic2FsdCI6Ill2b29rSlcvUTMwbEowcEhtKzZlekJkYzN1YmFwNlIvTE1yNHA4T2d2VVE9Iiwic2VjcmV0Ijoia20wZFd2bnRKWm42Y0RVaE1qZE5PREZMOGtlRnFib1NpOVFjTHNDYnU3MD0iLCJ2ZXJzaW9uIjoiMSIsIml0ZXJhdGlvbnMiOiI0MDAwIiwiYWxnb3JpdGhtIjoiUEJLREYyV2l0aEhtYWNTSEExIn0=', 'notification_callback': 'https://gb60kf2.democustomer.televic.com:443/ovirt-engine/services/sso-callback', 'email': '', 'trusted': True} >2019-02-26 17:06:44,775+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'sso_oauth_register_client': ''}] >2019-02-26 17:06:44,775+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine/engine.conf.d/11-setup-sso.conf'' >2019-02-26 17:06:44,775+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine/engine.conf.d/11-setup-sso.conf' exists >2019-02-26 17:06:44,776+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine/engine.conf.d/11-setup-sso.conf' already has content >2019-02-26 17:06:44,778+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.storage.Plugin._updateSANWipeAfterDelete >2019-02-26 17:06:44,778+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:44,781+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.macpools.Plugin._misc_db_entries >2019-02-26 17:06:44,781+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > SELECT id > FROM mac_pools > WHERE default_pool IS true; > ', args: {} >2019-02-26 17:06:44,781+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'id': '58ca604b-017d-0374-0220-00000000014e'}] >2019-02-26 17:06:44,781+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > SELECT count(mac_pool_id) AS mac_pool_ranges_count > FROM mac_pool_ranges > WHERE mac_pool_id = %(mac_pool_id)s > ', args: {'mac_pool_id': '58ca604b-017d-0374-0220-00000000014e'} >2019-02-26 17:06:44,782+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'mac_pool_ranges_count': 1L}] >2019-02-26 17:06:44,784+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._misc_db_entries >2019-02-26 17:06:44,784+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:44,786+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin.miscOptions >2019-02-26 17:06:44,786+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:44,788+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.auth_url_validation.Plugin._update_providers >2019-02-26 17:06:44,790+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._databaseOptions >2019-02-26 17:06:44,790+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:44,792+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._setupAdminPassword >2019-02-26 17:06:44,793+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc aaajdbc._setupAdminPassword:409 Setting a password for internal user admin >2019-02-26 17:06:44,793+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.executeRaw:813 execute: ('/usr/bin/ovirt-aaa-jdbc-tool', '--db-config=/etc/ovirt-engine/aaa/internal.properties', 'user', 'password-reset', 'admin', '--password=env:pass', '--force', '--password-valid-to=2219-01-09 16:06:44Z'), executable='None', cwd='None', env={'pass': '**FILTERED**', 'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': 'fd00::1:20d:b9ff:fe4a:c80c 54404 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'OVIRT_ENGINE_JAVA_HOME': u'/usr/lib/jvm/jre', 'PATH': '/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'HOME': '/root', 'OVIRT_JBOSS_HOME': '/usr/share/ovirt-engine-wildfly', 'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64', 'SHLVL': '5', 'POSTGRESQLENV': 'COMMAND/pg_dump=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_dump COMMAND/psql=str:/opt/rh/rh-postgresql10/root/usr/bin/psql COMMAND/pg_restore=str:/opt/rh/rh-postgresql10/root/usr/bin/pg_restore COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup OVESETUP_PROVISIONING/postgresService=str:rh-postgresql10-postgresql OVESETUP_PROVISIONING/oldPostgresService=str:rh-postgresql95-postgresql OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION', 'MANPATH': '/opt/rh/rh-postgresql10/root/usr/share/man:', 'X_SCLS': 'rh-postgresql10 ', 'XDG_RUNTIME_DIR': '/run/user/0', 'OVIRT_ENGINE_JAVA_HOME_FORCE': '1', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/mail/root', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql10/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID': '8', 'sclenv': 'rh-postgresql10', 'LS_COLORS': '', 'SSH_TTY': '/dev/pts/0', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql10/java:/etc/java', 'SELINUX_LEVEL_REQUESTED': '', 'PWD': '/root', 'CPATH': '/opt/rh/rh-postgresql10/root/usr/include', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', 'SSH_CONNECTION': 'fd00::1:20d:b9ff:fe4a:c80c 54404 fd00::1:1298:36ff:fea3:d613 22', 'OTOPI_EXECDIR': '/root'} >2019-02-26 17:06:45,402+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.executeRaw:863 execute-result: ('/usr/bin/ovirt-aaa-jdbc-tool', '--db-config=/etc/ovirt-engine/aaa/internal.properties', 'user', 'password-reset', 'admin', '--password=env:pass', '--force', '--password-valid-to=2219-01-09 16:06:44Z'), rc=0 >2019-02-26 17:06:45,402+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.execute:921 execute-output: ('/usr/bin/ovirt-aaa-jdbc-tool', '--db-config=/etc/ovirt-engine/aaa/internal.properties', 'user', 'password-reset', 'admin', '--password=env:pass', '--force', '--password-valid-to=2219-01-09 16:06:44Z') stdout: >updating user admin... >user updated successfully > >2019-02-26 17:06:45,402+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.execute:926 execute-output: ('/usr/bin/ovirt-aaa-jdbc-tool', '--db-config=/etc/ovirt-engine/aaa/internal.properties', 'user', 'password-reset', 'admin', '--password=env:pass', '--force', '--password-valid-to=2219-01-09 16:06:44Z') stderr: > > >2019-02-26 17:06:45,405+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._misc >2019-02-26 17:06:45,405+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:45,407+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.image_upload.Plugin._misc >2019-02-26 17:06:45,407+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:45,409+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.single_etl.Plugin._misc >2019-02-26 17:06:45,410+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-uuid.conf'' >2019-02-26 17:06:45,410+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-uuid.conf' exists >2019-02-26 17:06:45,410+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-uuid.conf' already has content >2019-02-26 17:06:45,410+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select * from GetDwhHistoryTimekeepingByVarName( > %(name)s > ) > ', args: {'name': 'dwhHostname'} >2019-02-26 17:06:45,410+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:45,415+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'var_value': 'gb60kf2.democustomer.televic.com', 'var_datetime': None, 'var_name': 'dwhHostname'}] >2019-02-26 17:06:45,415+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select UpdateDwhHistoryTimekeeping( > %(name)s, > %(value)s, > NULL > ) > ', args: {'name': 'dwhHostname', 'value': 'gb60kf2.democustomer.televic.com'} >2019-02-26 17:06:45,416+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'updatedwhhistorytimekeeping': ''}] >2019-02-26 17:06:45,416+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select * from GetDwhHistoryTimekeepingByVarName( > %(name)s > ) > ', args: {'name': 'dwhUuid'} >2019-02-26 17:06:45,416+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:246 Creating own connection >2019-02-26 17:06:45,421+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'var_value': 'bf29a673-1ae8-45e3-b07f-4f56faa3e4a5', 'var_datetime': None, 'var_name': 'dwhUuid'}] >2019-02-26 17:06:45,421+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:241 Database: 'None', Statement: ' > select UpdateDwhHistoryTimekeeping( > %(name)s, > %(value)s, > NULL > ) > ', args: {'name': 'dwhUuid', 'value': 'bf29a673-1ae8-45e3-b07f-4f56faa3e4a5'} >2019-02-26 17:06:45,421+0100 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:291 Result: [{'updatedwhhistorytimekeeping': ''}] >2019-02-26 17:06:45,422+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:45,422+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/ovirt_dwh_files=list:'[[], [], []]' >2019-02-26 17:06:45,423+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:45,424+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._misc >2019-02-26 17:06:45,424+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:45,426+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_common.base.system.selinux.Plugin._misc >2019-02-26 17:06:45,426+0100 DEBUG otopi.plugins.ovirt_engine_common.base.system.selinux plugin.executeRaw:813 execute: ('/usr/sbin/semanage', 'boolean', '--modify', '--on', 'httpd_can_network_connect'), executable='None', cwd='None', env=None >2019-02-26 17:06:47,920+0100 DEBUG otopi.plugins.ovirt_engine_common.base.system.selinux plugin.executeRaw:863 execute-result: ('/usr/sbin/semanage', 'boolean', '--modify', '--on', 'httpd_can_network_connect'), rc=0 >2019-02-26 17:06:47,921+0100 DEBUG otopi.plugins.ovirt_engine_common.base.system.selinux plugin.execute:921 execute-output: ('/usr/sbin/semanage', 'boolean', '--modify', '--on', 'httpd_can_network_connect') stdout: > > >2019-02-26 17:06:47,922+0100 DEBUG otopi.plugins.ovirt_engine_common.base.system.selinux plugin.execute:926 execute-output: ('/usr/sbin/semanage', 'boolean', '--modify', '--on', 'httpd_can_network_connect') stderr: > > >2019-02-26 17:06:47,924+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_common.apache.misc.Plugin._misc >2019-02-26 17:06:47,927+0100 DEBUG otopi.context context._executeMethod:127 Stage misc METHOD otopi.plugins.ovirt_engine_common.base.core.postinstall.Plugin._misc >2019-02-26 17:06:47,927+0100 INFO otopi.plugins.ovirt_engine_common.base.core.postinstall postinstall._misc:60 Generating post install configuration file '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf' >2019-02-26 17:06:47,928+0100 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf'' >2019-02-26 17:06:47,929+0100 DEBUG otopi.filetransaction filetransaction.prepare:186 file '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf' exists >2019-02-26 17:06:47,929+0100 DEBUG otopi.filetransaction filetransaction.prepare:190 file '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf' already has content >2019-02-26 17:06:47,930+0100 INFO otopi.context context.runSequence:610 Stage: Transaction commit >2019-02-26 17:06:47,930+0100 DEBUG otopi.context context.runSequence:614 STAGE cleanup >2019-02-26 17:06:47,931+0100 DEBUG otopi.context context._executeMethod:127 Stage cleanup METHOD otopi.plugins.otopi.core.transaction.Plugin._main_end >2019-02-26 17:06:47,932+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf'' >2019-02-26 17:06:47,932+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-uuid.conf'' >2019-02-26 17:06:47,932+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/engine.conf.d/11-setup-sso.conf'' >2019-02-26 17:06:47,932+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-pki.conf'' >2019-02-26 17:06:47,932+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/extensions.d/internal-authz.properties'' >2019-02-26 17:06:47,932+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/extensions.d/internal-authn.properties'' >2019-02-26 17:06:47,932+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/aaa/internal.properties'' >2019-02-26 17:06:47,933+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-database.conf'' >2019-02-26 17:06:47,933+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-dwh-database.conf'' >2019-02-26 17:06:47,933+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine-dwh/examples/10-setup-dwh-database.conf'' >2019-02-26 17:06:47,933+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf'' >2019-02-26 17:06:47,933+0100 DEBUG otopi.transaction transaction.commit:147 committing 'Engine schema Transaction' >2019-02-26 17:06:47,933+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-cinderlib.conf'' >2019-02-26 17:06:47,934+0100 DEBUG otopi.transaction transaction.commit:147 committing 'DWH schema Transaction' >2019-02-26 17:06:47,934+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/pki/ovirt-engine/keys/engine_id_rsa'' >2019-02-26 17:06:47,934+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf'' >2019-02-26 17:06:47,934+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-vmconsole/ovirt-vmconsole-proxy/conf.d/20-ovirt-vmconsole-proxy-helper.conf'' >2019-02-26 17:06:47,934+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/ovirt-vmconsole-proxy-helper.conf.d/10-setup.conf'' >2019-02-26 17:06:47,934+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-imageio-proxy/ovirt-imageio-proxy.conf'' >2019-02-26 17:06:47,934+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf'' >2019-02-26 17:06:47,935+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/yum/pluginconf.d/versionlock.conf'' >2019-02-26 17:06:47,935+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/logcollector.conf.d/10-engine-setup.conf'' >2019-02-26 17:06:47,935+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/isouploader.conf.d/10-engine-setup.conf'' >2019-02-26 17:06:47,935+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf'' >2019-02-26 17:06:47,935+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/notifier/notifier.conf.d/10-setup-jboss.conf'' >2019-02-26 17:06:47,935+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/engine.conf.d/10-setup-jboss.conf'' >2019-02-26 17:06:47,935+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/httpd/conf.d/z-ovirt-engine-proxy.conf'' >2019-02-26 17:06:47,936+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/iptables.example'' >2019-02-26 17:06:47,936+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-postgres.xml'' >2019-02-26 17:06:47,936+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-postgres.xml'' >2019-02-26 17:06:47,936+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-fence-kdump-listener.xml'' >2019-02-26 17:06:47,936+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-websocket-proxy.xml'' >2019-02-26 17:06:47,936+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-imageio-proxy.xml'' >2019-02-26 17:06:47,937+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-vmconsole-proxy.xml'' >2019-02-26 17:06:47,937+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-https.xml'' >2019-02-26 17:06:47,937+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-http.xml'' >2019-02-26 17:06:47,937+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/firewalld/ovirt-provider-ovn.xml'' >2019-02-26 17:06:47,937+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/ovirt-engine/firewalld/ovn-central-firewall-service.xml'' >2019-02-26 17:06:47,937+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/firewalld/services/ovirt-provider-ovn.xml'' >2019-02-26 17:06:47,937+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/firewalld/services/ovirt-vmconsole-proxy.xml'' >2019-02-26 17:06:47,938+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/firewalld/services/ovirt-http.xml'' >2019-02-26 17:06:47,938+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/firewalld/services/ovirt-websocket-proxy.xml'' >2019-02-26 17:06:47,938+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/firewalld/services/ovirt-imageio-proxy.xml'' >2019-02-26 17:06:47,938+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/firewalld/services/ovirt-fence-kdump-listener.xml'' >2019-02-26 17:06:47,938+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/firewalld/services/ovn-central-firewall-service.xml'' >2019-02-26 17:06:47,938+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/firewalld/services/ovirt-https.xml'' >2019-02-26 17:06:47,938+0100 DEBUG otopi.transaction transaction.commit:147 committing 'File transaction for '/etc/firewalld/services/ovirt-postgres.xml'' >2019-02-26 17:06:47,939+0100 DEBUG otopi.transaction transaction.commit:147 committing 'Firewalld Transaction' >2019-02-26 17:06:47,939+0100 DEBUG otopi.transaction transaction.commit:147 committing 'DWH database Transaction' >2019-02-26 17:06:47,939+0100 DEBUG otopi.transaction transaction.commit:147 committing 'Version Lock Transaction' >2019-02-26 17:06:47,939+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages plugin.executeRaw:813 execute: ('/usr/bin/rpm', '-q', 'ovirt-engine-webadmin-portal', 'ovirt-engine-ui-extensions', 'ovirt-engine-dwh', 'ovirt-engine', 'ovirt-engine-restapi', 'ovirt-engine-dbscripts', 'ovirt-engine-tools-backup', 'ovirt-engine-wildfly', 'ovirt-engine-backend', 'ovirt-engine-wildfly-overlay', 'ovirt-engine-tools', 'ovirt-engine-extension-aaa-jdbc'), executable='None', cwd='None', env=None >2019-02-26 17:06:47,975+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages plugin.executeRaw:863 execute-result: ('/usr/bin/rpm', '-q', 'ovirt-engine-webadmin-portal', 'ovirt-engine-ui-extensions', 'ovirt-engine-dwh', 'ovirt-engine', 'ovirt-engine-restapi', 'ovirt-engine-dbscripts', 'ovirt-engine-tools-backup', 'ovirt-engine-wildfly', 'ovirt-engine-backend', 'ovirt-engine-wildfly-overlay', 'ovirt-engine-tools', 'ovirt-engine-extension-aaa-jdbc'), rc=0 >2019-02-26 17:06:47,975+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages plugin.execute:921 execute-output: ('/usr/bin/rpm', '-q', 'ovirt-engine-webadmin-portal', 'ovirt-engine-ui-extensions', 'ovirt-engine-dwh', 'ovirt-engine', 'ovirt-engine-restapi', 'ovirt-engine-dbscripts', 'ovirt-engine-tools-backup', 'ovirt-engine-wildfly', 'ovirt-engine-backend', 'ovirt-engine-wildfly-overlay', 'ovirt-engine-tools', 'ovirt-engine-extension-aaa-jdbc') stdout: >ovirt-engine-webadmin-portal-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch >ovirt-engine-ui-extensions-1.0.3-1.el7.noarch >ovirt-engine-dwh-4.3.1-0.0.master.20190110155219.el7.noarch >ovirt-engine-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch >ovirt-engine-restapi-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch >ovirt-engine-dbscripts-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch >ovirt-engine-tools-backup-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch >ovirt-engine-wildfly-15.0.1-1.el7.x86_64 >ovirt-engine-backend-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch >ovirt-engine-wildfly-overlay-15.0.1-1.el7.noarch >ovirt-engine-tools-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch >ovirt-engine-extension-aaa-jdbc-1.1.8-1.el7.noarch > >2019-02-26 17:06:47,975+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_common.distro-rpm.packages plugin.execute:926 execute-output: ('/usr/bin/rpm', '-q', 'ovirt-engine-webadmin-portal', 'ovirt-engine-ui-extensions', 'ovirt-engine-dwh', 'ovirt-engine', 'ovirt-engine-restapi', 'ovirt-engine-dbscripts', 'ovirt-engine-tools-backup', 'ovirt-engine-wildfly', 'ovirt-engine-backend', 'ovirt-engine-wildfly-overlay', 'ovirt-engine-tools', 'ovirt-engine-extension-aaa-jdbc') stderr: > > >2019-02-26 17:06:47,976+0100 DEBUG otopi.transaction transaction.commit:147 committing 'Database Transaction' >2019-02-26 17:06:47,977+0100 DEBUG otopi.transaction transaction.commit:147 committing 'CinderLib Database Transaction' >2019-02-26 17:06:47,977+0100 DEBUG otopi.transaction transaction.commit:147 committing 'DWH Engine database Transaction' >2019-02-26 17:06:47,978+0100 DEBUG otopi.transaction transaction.commit:147 committing 'Yum Transaction' >Loaded plugins: fastestmirror, versionlock >2019-02-26 17:06:48,040+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-epel is listed more than once in the configuration >2019-02-26 17:06:48,040+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-gluster5 is listed more than once in the configuration >2019-02-26 17:06:48,041+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-virtio-win-latest is listed more than once in the configuration >2019-02-26 17:06:48,041+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-qemu-ev is listed more than once in the configuration >2019-02-26 17:06:48,042+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-ovirt43 is listed more than once in the configuration >2019-02-26 17:06:48,043+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository ovirt-4.3-centos-opstools is listed more than once in the configuration >2019-02-26 17:06:48,043+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository centos-sclo-rh-release is listed more than once in the configuration >2019-02-26 17:06:48,044+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:48,052+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository centos-sclo-rh-release is listed more than once in the configuration >2019-02-26 17:06:48,053+0100 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Repository sac-gluster-ansible is listed more than once in the configuration >2019-02-26 17:06:48,055+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:48,055+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallUnremovableFiles=list:'['/etc/yum/pluginconf.d/versionlock.conf', '/etc/yum/pluginconf.d/versionlock.list', '/etc/dnf/plugins/versionlock.list']' >2019-02-26 17:06:48,055+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/versionlock=list:'[]' >2019-02-26 17:06:48,056+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_LINES_GROUP/versionlock=dict:'{'/etc/yum/pluginconf.d/versionlock.list': [{'added': u'ovirt-engine-webadmin-portal-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-ui-extensions-1.0.3-1.el7.noarch'}, {'added': u'ovirt-engine-dwh-4.3.1-0.0.master.20190110155219.el7.noarch'}, {'added': u'ovirt-engine-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-restapi-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-dbscripts-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-tools-backup-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-wildfly-15.0.1-1.el7.x86_64'}, {'added': u'ovirt-engine-backend-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-wildfly-overlay-15.0.1-1.el7.noarch'}, {'added': u'ovirt-engine-tools-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-extension-aaa-jdbc-1.1.8-1.el7.noarch'}]}' >2019-02-26 17:06:48,056+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:48,056+0100 INFO otopi.context context.runSequence:610 Stage: Closing up >2019-02-26 17:06:48,056+0100 DEBUG otopi.context context.runSequence:614 STAGE closeup >2019-02-26 17:06:48,058+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.otopi.network.firewalld.Plugin._closeup >2019-02-26 17:06:48,058+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--reload'), executable='None', cwd='None', env=None >2019-02-26 17:06:48,767+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--reload'), rc=0 >2019-02-26 17:06:48,767+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--reload') stdout: >success > >2019-02-26 17:06:48,768+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--reload') stderr: > > >2019-02-26 17:06:48,768+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--get-active-zones'), executable='None', cwd='None', env=None >2019-02-26 17:06:49,002+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--get-active-zones'), rc=0 >2019-02-26 17:06:49,002+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--get-active-zones') stdout: >public > interfaces: em1 em2 > >2019-02-26 17:06:49,002+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--get-active-zones') stderr: > > >2019-02-26 17:06:49,002+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-postgres'), executable='None', cwd='None', env=None >2019-02-26 17:06:49,252+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-postgres'), rc=0 >2019-02-26 17:06:49,253+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-postgres') stdout: >success > >2019-02-26 17:06:49,253+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-postgres') stderr: >Warning: ALREADY_ENABLED: ovirt-postgres > >2019-02-26 17:06:49,253+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-https'), executable='None', cwd='None', env=None >2019-02-26 17:06:49,506+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-https'), rc=0 >2019-02-26 17:06:49,506+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-https') stdout: >success > >2019-02-26 17:06:49,506+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-https') stderr: >Warning: ALREADY_ENABLED: ovirt-https > >2019-02-26 17:06:49,506+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovn-central-firewall-service'), executable='None', cwd='None', env=None >2019-02-26 17:06:49,755+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovn-central-firewall-service'), rc=0 >2019-02-26 17:06:49,755+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovn-central-firewall-service') stdout: >success > >2019-02-26 17:06:49,755+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovn-central-firewall-service') stderr: >Warning: ALREADY_ENABLED: ovn-central-firewall-service > >2019-02-26 17:06:49,755+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-fence-kdump-listener'), executable='None', cwd='None', env=None >2019-02-26 17:06:50,013+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-fence-kdump-listener'), rc=0 >2019-02-26 17:06:50,014+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-fence-kdump-listener') stdout: >success > >2019-02-26 17:06:50,014+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-fence-kdump-listener') stderr: >Warning: ALREADY_ENABLED: ovirt-fence-kdump-listener > >2019-02-26 17:06:50,014+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-imageio-proxy'), executable='None', cwd='None', env=None >2019-02-26 17:06:50,262+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-imageio-proxy'), rc=0 >2019-02-26 17:06:50,263+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-imageio-proxy') stdout: >success > >2019-02-26 17:06:50,263+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-imageio-proxy') stderr: >Warning: ALREADY_ENABLED: ovirt-imageio-proxy > >2019-02-26 17:06:50,263+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-websocket-proxy'), executable='None', cwd='None', env=None >2019-02-26 17:06:50,511+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-websocket-proxy'), rc=0 >2019-02-26 17:06:50,511+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-websocket-proxy') stdout: >success > >2019-02-26 17:06:50,512+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-websocket-proxy') stderr: >Warning: ALREADY_ENABLED: ovirt-websocket-proxy > >2019-02-26 17:06:50,512+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-http'), executable='None', cwd='None', env=None >2019-02-26 17:06:50,760+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-http'), rc=0 >2019-02-26 17:06:50,760+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-http') stdout: >success > >2019-02-26 17:06:50,760+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-http') stderr: >Warning: ALREADY_ENABLED: ovirt-http > >2019-02-26 17:06:50,761+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-vmconsole-proxy'), executable='None', cwd='None', env=None >2019-02-26 17:06:51,018+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-vmconsole-proxy'), rc=0 >2019-02-26 17:06:51,019+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-vmconsole-proxy') stdout: >success > >2019-02-26 17:06:51,019+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-vmconsole-proxy') stderr: >Warning: ALREADY_ENABLED: ovirt-vmconsole-proxy > >2019-02-26 17:06:51,019+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-provider-ovn'), executable='None', cwd='None', env=None >2019-02-26 17:06:51,270+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-provider-ovn'), rc=0 >2019-02-26 17:06:51,270+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-provider-ovn') stdout: >success > >2019-02-26 17:06:51,271+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--zone', u'public', '--permanent', '--add-service', 'ovirt-provider-ovn') stderr: >Warning: ALREADY_ENABLED: ovirt-provider-ovn > >2019-02-26 17:06:51,271+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:813 execute: ('/usr/bin/firewall-cmd', '--reload'), executable='None', cwd='None', env=None >2019-02-26 17:06:51,951+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.executeRaw:863 execute-result: ('/usr/bin/firewall-cmd', '--reload'), rc=0 >2019-02-26 17:06:51,952+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:921 execute-output: ('/usr/bin/firewall-cmd', '--reload') stdout: >success > >2019-02-26 17:06:51,952+0100 DEBUG otopi.plugins.otopi.network.firewalld plugin.execute:926 execute-output: ('/usr/bin/firewall-cmd', '--reload') stderr: > > >2019-02-26 17:06:51,955+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.otopi.network.iptables.Plugin._closeup >2019-02-26 17:06:51,955+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:51,957+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_common.base.system.hostile_services.Plugin._closeup >2019-02-26 17:06:51,960+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.fence_kdump_listener.config.Plugin._closeup >2019-02-26 17:06:51,960+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service ovirt-fence-kdump-listener >2019-02-26 17:06:51,960+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'ovirt-fence-kdump-listener.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:51,972+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'ovirt-fence-kdump-listener.service'), rc=0 >2019-02-26 17:06:51,973+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-fence-kdump-listener.service') stdout: > > >2019-02-26 17:06:51,973+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-fence-kdump-listener.service') stderr: > > >2019-02-26 17:06:51,973+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 starting service ovirt-fence-kdump-listener >2019-02-26 17:06:51,973+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'start', 'ovirt-fence-kdump-listener.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:52,027+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'start', 'ovirt-fence-kdump-listener.service'), rc=0 >2019-02-26 17:06:52,027+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-fence-kdump-listener.service') stdout: > > >2019-02-26 17:06:52,028+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-fence-kdump-listener.service') stderr: > > >2019-02-26 17:06:52,028+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.startup:99 set service ovirt-fence-kdump-listener startup to True >2019-02-26 17:06:52,028+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-fence-kdump-listener.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:52,036+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-fence-kdump-listener.service'), rc=0 >2019-02-26 17:06:52,036+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-fence-kdump-listener.service') stdout: >Id=ovirt-fence-kdump-listener.service > >2019-02-26 17:06:52,037+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-fence-kdump-listener.service') stderr: > > >2019-02-26 17:06:52,037+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'enable', u'ovirt-fence-kdump-listener.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:52,092+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'enable', u'ovirt-fence-kdump-listener.service'), rc=0 >2019-02-26 17:06:52,092+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-fence-kdump-listener.service') stdout: > > >2019-02-26 17:06:52,092+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-fence-kdump-listener.service') stderr: > > >2019-02-26 17:06:52,096+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.engine.Plugin._closeup >2019-02-26 17:06:52,096+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.system.engine engine._closeup:54 Starting engine service >2019-02-26 17:06:52,096+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 starting service ovirt-engine >2019-02-26 17:06:52,097+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'start', 'ovirt-engine.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:52,839+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'start', 'ovirt-engine.service'), rc=0 >2019-02-26 17:06:52,839+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-engine.service') stdout: > > >2019-02-26 17:06:52,839+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-engine.service') stderr: > > >2019-02-26 17:06:52,840+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.startup:99 set service ovirt-engine startup to True >2019-02-26 17:06:52,840+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:52,848+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine.service'), rc=0 >2019-02-26 17:06:52,848+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine.service') stdout: >Id=ovirt-engine.service > >2019-02-26 17:06:52,849+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine.service') stderr: > > >2019-02-26 17:06:52,849+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'enable', u'ovirt-engine.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:52,895+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'enable', u'ovirt-engine.service'), rc=0 >2019-02-26 17:06:52,896+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-engine.service') stdout: > > >2019-02-26 17:06:52,896+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-engine.service') stderr: > > >2019-02-26 17:06:52,899+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.nfs.Plugin._closeup >2019-02-26 17:06:52,899+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:52,902+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.service.Plugin._closeup >2019-02-26 17:06:52,902+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.service service._closeup:52 Starting dwh service >2019-02-26 17:06:52,902+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 starting service ovirt-engine-dwhd >2019-02-26 17:06:52,902+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'start', 'ovirt-engine-dwhd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,092+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'start', 'ovirt-engine-dwhd.service'), rc=0 >2019-02-26 17:06:53,093+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-engine-dwhd.service') stdout: > > >2019-02-26 17:06:53,093+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-engine-dwhd.service') stderr: > > >2019-02-26 17:06:53,093+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.startup:99 set service ovirt-engine-dwhd startup to True >2019-02-26 17:06:53,093+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine-dwhd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,102+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine-dwhd.service'), rc=0 >2019-02-26 17:06:53,103+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine-dwhd.service') stdout: >Id=ovirt-engine-dwhd.service > >2019-02-26 17:06:53,103+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-engine-dwhd.service') stderr: > > >2019-02-26 17:06:53,103+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'enable', u'ovirt-engine-dwhd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,164+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'enable', u'ovirt-engine-dwhd.service'), rc=0 >2019-02-26 17:06:53,165+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-engine-dwhd.service') stdout: > > >2019-02-26 17:06:53,165+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-engine-dwhd.service') stderr: > > >2019-02-26 17:06:53,168+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.legacy.config.Plugin._closeup >2019-02-26 17:06:53,168+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:53,171+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.config.Plugin._closeup >2019-02-26 17:06:53,171+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service ovirt-imageio-proxy >2019-02-26 17:06:53,171+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'ovirt-imageio-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,181+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'ovirt-imageio-proxy.service'), rc=0 >2019-02-26 17:06:53,181+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-imageio-proxy.service') stdout: > > >2019-02-26 17:06:53,181+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-imageio-proxy.service') stderr: > > >2019-02-26 17:06:53,181+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 starting service ovirt-imageio-proxy >2019-02-26 17:06:53,181+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'start', 'ovirt-imageio-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,305+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'start', 'ovirt-imageio-proxy.service'), rc=0 >2019-02-26 17:06:53,305+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-imageio-proxy.service') stdout: > > >2019-02-26 17:06:53,305+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-imageio-proxy.service') stderr: > > >2019-02-26 17:06:53,306+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.startup:99 set service ovirt-imageio-proxy startup to True >2019-02-26 17:06:53,306+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-imageio-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,321+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-imageio-proxy.service'), rc=0 >2019-02-26 17:06:53,321+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-imageio-proxy.service') stdout: >Id=ovirt-imageio-proxy.service > >2019-02-26 17:06:53,321+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-imageio-proxy.service') stderr: > > >2019-02-26 17:06:53,322+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'enable', u'ovirt-imageio-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,382+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'enable', u'ovirt-imageio-proxy.service'), rc=0 >2019-02-26 17:06:53,383+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-imageio-proxy.service') stdout: > > >2019-02-26 17:06:53,383+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-imageio-proxy.service') stderr: > > >2019-02-26 17:06:53,386+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._closeup >2019-02-26 17:06:53,387+0100 INFO otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system system._closeup:88 Restarting ovirt-vmconsole proxy service >2019-02-26 17:06:53,387+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service ovirt-vmconsole-proxy-sshd >2019-02-26 17:06:53,387+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'ovirt-vmconsole-proxy-sshd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,403+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'ovirt-vmconsole-proxy-sshd.service'), rc=0 >2019-02-26 17:06:53,403+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-vmconsole-proxy-sshd.service') stdout: > > >2019-02-26 17:06:53,404+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-vmconsole-proxy-sshd.service') stderr: > > >2019-02-26 17:06:53,404+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 starting service ovirt-vmconsole-proxy-sshd >2019-02-26 17:06:53,404+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'start', 'ovirt-vmconsole-proxy-sshd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,424+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'start', 'ovirt-vmconsole-proxy-sshd.service'), rc=0 >2019-02-26 17:06:53,424+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-vmconsole-proxy-sshd.service') stdout: > > >2019-02-26 17:06:53,424+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-vmconsole-proxy-sshd.service') stderr: > > >2019-02-26 17:06:53,425+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.startup:99 set service ovirt-vmconsole-proxy-sshd startup to True >2019-02-26 17:06:53,425+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-vmconsole-proxy-sshd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,434+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-vmconsole-proxy-sshd.service'), rc=0 >2019-02-26 17:06:53,434+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-vmconsole-proxy-sshd.service') stdout: >Id=ovirt-vmconsole-proxy-sshd.service > >2019-02-26 17:06:53,435+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-vmconsole-proxy-sshd.service') stderr: > > >2019-02-26 17:06:53,435+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'enable', u'ovirt-vmconsole-proxy-sshd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,518+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'enable', u'ovirt-vmconsole-proxy-sshd.service'), rc=0 >2019-02-26 17:06:53,519+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-vmconsole-proxy-sshd.service') stdout: > > >2019-02-26 17:06:53,519+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-vmconsole-proxy-sshd.service') stderr: > > >2019-02-26 17:06:53,522+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.config.Plugin._closeup >2019-02-26 17:06:53,523+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service ovirt-websocket-proxy >2019-02-26 17:06:53,523+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'ovirt-websocket-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,532+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'ovirt-websocket-proxy.service'), rc=0 >2019-02-26 17:06:53,533+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-websocket-proxy.service') stdout: > > >2019-02-26 17:06:53,533+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-websocket-proxy.service') stderr: > > >2019-02-26 17:06:53,533+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 starting service ovirt-websocket-proxy >2019-02-26 17:06:53,533+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'start', 'ovirt-websocket-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,646+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'start', 'ovirt-websocket-proxy.service'), rc=0 >2019-02-26 17:06:53,647+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-websocket-proxy.service') stdout: > > >2019-02-26 17:06:53,647+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'start', 'ovirt-websocket-proxy.service') stderr: > > >2019-02-26 17:06:53,647+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.startup:99 set service ovirt-websocket-proxy startup to True >2019-02-26 17:06:53,647+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-websocket-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,656+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-websocket-proxy.service'), rc=0 >2019-02-26 17:06:53,656+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-websocket-proxy.service') stdout: >Id=ovirt-websocket-proxy.service > >2019-02-26 17:06:53,656+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-websocket-proxy.service') stderr: > > >2019-02-26 17:06:53,656+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'enable', u'ovirt-websocket-proxy.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,728+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'enable', u'ovirt-websocket-proxy.service'), rc=0 >2019-02-26 17:06:53,728+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-websocket-proxy.service') stdout: > > >2019-02-26 17:06:53,728+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'enable', u'ovirt-websocket-proxy.service') stderr: > > >2019-02-26 17:06:53,732+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_s_summary >2019-02-26 17:06:53,732+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:53,732+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== SUMMARY ==-- >2019-02-26 17:06:53,732+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:53,735+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.apache.Plugin._closeup >2019-02-26 17:06:53,735+0100 INFO otopi.plugins.ovirt_engine_common.ovirt_engine_common.system.apache apache._closeup:81 Restarting httpd >2019-02-26 17:06:53,735+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.startup:99 set service httpd startup to True >2019-02-26 17:06:53,735+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'httpd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,745+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'httpd.service'), rc=0 >2019-02-26 17:06:53,746+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'httpd.service') stdout: >Id=httpd.service > >2019-02-26 17:06:53,746+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'httpd.service') stderr: > > >2019-02-26 17:06:53,746+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'enable', u'httpd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:53,811+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'enable', u'httpd.service'), rc=0 >2019-02-26 17:06:53,812+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'enable', u'httpd.service') stdout: > > >2019-02-26 17:06:53,812+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'enable', u'httpd.service') stderr: > > >2019-02-26 17:06:53,812+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service httpd >2019-02-26 17:06:53,812+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'httpd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:54,849+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'httpd.service'), rc=0 >2019-02-26 17:06:54,849+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'httpd.service') stdout: > > >2019-02-26 17:06:54,849+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'httpd.service') stderr: > > >2019-02-26 17:06:54,849+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 starting service httpd >2019-02-26 17:06:54,849+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'start', 'httpd.service'), executable='None', cwd='None', env=None >2019-02-26 17:06:54,962+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'start', 'httpd.service'), rc=0 >2019-02-26 17:06:54,962+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'start', 'httpd.service') stdout: > > >2019-02-26 17:06:54,962+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'start', 'httpd.service') stderr: > > >2019-02-26 17:06:54,966+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.base.network.firewall_manager.Plugin._closeup >2019-02-26 17:06:54,966+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:54,968+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.cinderlib.provisioning.postgres.Plugin._closeup >2019-02-26 17:06:54,968+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:54,971+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaa.Plugin._closeup >2019-02-26 17:06:54,971+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Please use the user 'admin@internal' and password specified in order to login >2019-02-26 17:06:54,976+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.protocols.Plugin._closeup >2019-02-26 17:06:54,976+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Web access is enabled at: >2019-02-26 17:06:54,977+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND http://gb60kf2.democustomer.televic.com:80/ovirt-engine >2019-02-26 17:06:54,977+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND https://gb60kf2.democustomer.televic.com:443/ovirt-engine >2019-02-26 17:06:54,980+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._print_manual_commands >2019-02-26 17:06:54,980+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:54,993+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._print_restart_services_commands >2019-02-26 17:06:54,994+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:54,996+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ca.Plugin._closeup >2019-02-26 17:06:54,997+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Internal CA EA:91:C1:8D:D3:52:77:68:99:D3:18:CC:93:AB:62:7F:82:C2:7B:0C >2019-02-26 17:06:55,016+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh.Plugin._closeup >2019-02-26 17:06:55,017+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.executeRaw:813 execute: ('/usr/bin/ssh-keygen', '-l', '-f', '/tmp/tmpF8NkkP'), executable='None', cwd='None', env=None >2019-02-26 17:06:55,047+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.executeRaw:863 execute-result: ('/usr/bin/ssh-keygen', '-l', '-f', '/tmp/tmpF8NkkP'), rc=0 >2019-02-26 17:06:55,047+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.execute:921 execute-output: ('/usr/bin/ssh-keygen', '-l', '-f', '/tmp/tmpF8NkkP') stdout: >2048 SHA256:/K3x39O0OIfaCfxdTJn+NTiay1c3Qnjx4dJ+Tmx5lR4 no comment (RSA) > >2019-02-26 17:06:55,047+0100 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.pki.ssh plugin.execute:926 execute-output: ('/usr/bin/ssh-keygen', '-l', '-f', '/tmp/tmpF8NkkP') stderr: > > >2019-02-26 17:06:55,047+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND SSH fingerprint: SHA256:/K3x39O0OIfaCfxdTJn+NTiay1c3Qnjx4dJ+Tmx5lR4 >2019-02-26 17:06:55,052+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._closeup >2019-02-26 17:06:55,053+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,055+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.exportfs.Plugin._closeup >2019-02-26 17:06:55,055+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,058+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.system.memcheck.Plugin._closeup >2019-02-26 17:06:55,061+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh.Plugin._closeup >2019-02-26 17:06:55,061+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,064+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.dwh_database.Plugin._closeupDWHConfig >2019-02-26 17:06:55,064+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,068+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._closeupEngineAccess >2019-02-26 17:06:55,068+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,071+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.provisioning.postgres.Plugin._closeup >2019-02-26 17:06:55,071+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,073+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_setup.vmconsole_proxy_helper.system.Plugin._devenv_closeup >2019-02-26 17:06:55,074+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,076+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.ovirt_engine_common.base.dialog.titles.Plugin._title_e_summary >2019-02-26 17:06:55,076+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:55,077+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND --== END OF SUMMARY ==-- >2019-02-26 17:06:55,077+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND >2019-02-26 17:06:55,079+0100 DEBUG otopi.context context._executeMethod:127 Stage closeup METHOD otopi.plugins.otopi.system.reboot.Plugin._closeup >2019-02-26 17:06:55,079+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,081+0100 INFO otopi.context context.runSequence:610 Stage: Clean up >2019-02-26 17:06:55,081+0100 DEBUG otopi.context context.runSequence:614 STAGE cleanup >2019-02-26 17:06:55,082+0100 DEBUG otopi.context context._executeMethod:127 Stage cleanup METHOD otopi.plugins.otopi.dialog.answer_file.Plugin._generate_answer_file >2019-02-26 17:06:55,083+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:55,083+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/answerFileContent=str:'# OTOPI answer file, generated by human dialog >[environment:default] >QUESTION/1/OVESETUP_CORE_ENGINE_STOP=str:ok >QUESTION/1/OVESETUP_DIALOG_CONFIRM_SETTINGS=str:ok >QUESTION/1/OVESETUP_DWH_PERFORM_BACKUP=str:yes >' >2019-02-26 17:06:55,084+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:55,085+0100 DEBUG otopi.context context._executeMethod:127 Stage cleanup METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._cleanup >2019-02-26 17:06:55,086+0100 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log >2019-02-26 17:06:55,088+0100 DEBUG otopi.context context._executeMethod:127 Stage cleanup METHOD otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine.Plugin._cleanup >2019-02-26 17:06:55,090+0100 DEBUG otopi.context context._executeMethod:127 Stage cleanup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.remote_engine.Plugin._cleanupEngineAccess >2019-02-26 17:06:55,091+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,093+0100 DEBUG otopi.context context._executeMethod:127 Stage cleanup METHOD otopi.plugins.ovirt_engine_setup.ovirt_imageio_proxy.pki.Plugin._cleanup >2019-02-26 17:06:55,093+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,096+0100 DEBUG otopi.context context._executeMethod:127 Stage cleanup METHOD otopi.plugins.ovirt_engine_setup.websocket_proxy.pki.Plugin._cleanup >2019-02-26 17:06:55,096+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,098+0100 DEBUG otopi.context context._executeMethod:127 Stage cleanup METHOD otopi.plugins.ovirt_engine_common.base.core.uninstall.Plugin._cleanup >2019-02-26 17:06:55,102+0100 DEBUG otopi.context context._executeMethod:127 Stage cleanup METHOD otopi.plugins.ovirt_engine_common.base.core.answerfile.Plugin._cleanup >2019-02-26 17:06:55,103+0100 INFO otopi.plugins.ovirt_engine_common.base.core.answerfile answerfile._cleanup:84 Generating answer file '/var/lib/ovirt-engine/setup/answers/20190226170655-setup.conf' >2019-02-26 17:06:55,111+0100 DEBUG otopi.context context._executeMethod:127 Stage cleanup METHOD otopi.plugins.ovirt_engine_common.base.core.duplicated_constants_check.Plugin._cleanup >2019-02-26 17:06:55,115+0100 DEBUG otopi.context context._executeMethod:127 Stage cleanup METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema.Plugin._rollback >2019-02-26 17:06:55,115+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,117+0100 INFO otopi.context context.runSequence:610 Stage: Pre-termination >2019-02-26 17:06:55,117+0100 DEBUG otopi.context context.runSequence:614 STAGE pre-terminate >2019-02-26 17:06:55,118+0100 DEBUG otopi.context context._executeMethod:127 Stage pre-terminate METHOD otopi.plugins.otopi.core.misc.Plugin._preTerminate >2019-02-26 17:06:55,119+0100 DEBUG otopi.context context.dumpEnvironment:728 ENVIRONMENT DUMP - BEGIN >2019-02-26 17:06:55,119+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/aborted=bool:'False' >2019-02-26 17:06:55,119+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/debug=int:'0' >2019-02-26 17:06:55,119+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/error=bool:'False' >2019-02-26 17:06:55,119+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/exceptionInfo=list:'[]' >2019-02-26 17:06:55,119+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/executionDirectory=str:'/root' >2019-02-26 17:06:55,119+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/exitCode=list:'[{'priority': 90001, 'code': 0}]' >2019-02-26 17:06:55,119+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/log=bool:'True' >2019-02-26 17:06:55,119+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/pluginGroups=str:'otopi:ovirt-engine-common:ovirt-engine-setup:ovirt-engine-checks' >2019-02-26 17:06:55,119+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/pluginPath=str:'/usr/share/otopi/plugins:/usr/share/ovirt-engine/setup/bin/../plugins' >2019-02-26 17:06:55,120+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV BASE/suppressEnvironmentKeys=list:'[]' >2019-02-26 17:06:55,120+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/chkconfig=str:'/usr/sbin/chkconfig' >2019-02-26 17:06:55,120+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/chronyc=str:'/usr/bin/chronyc' >2019-02-26 17:06:55,120+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/date=str:'/usr/bin/date' >2019-02-26 17:06:55,120+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/dig=str:'/usr/bin/dig' >2019-02-26 17:06:55,120+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/exportfs=str:'/usr/sbin/exportfs' >2019-02-26 17:06:55,120+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/firewall-cmd=str:'/usr/bin/firewall-cmd' >2019-02-26 17:06:55,120+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/hwclock=str:'/usr/sbin/hwclock' >2019-02-26 17:06:55,120+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/initctl=NoneType:'None' >2019-02-26 17:06:55,120+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ip=str:'/usr/sbin/ip' >2019-02-26 17:06:55,120+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ntpq=str:'/usr/sbin/ntpq' >2019-02-26 17:06:55,121+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/openssl=str:'/usr/bin/openssl' >2019-02-26 17:06:55,121+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/pg_dump=str:'/opt/rh/rh-postgresql10/root/usr/bin/pg_dump' >2019-02-26 17:06:55,121+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/pg_restore=str:'/opt/rh/rh-postgresql10/root/usr/bin/pg_restore' >2019-02-26 17:06:55,121+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/postgresql-setup=str:'/opt/rh/rh-postgresql10/root/usr/bin/postgresql-setup' >2019-02-26 17:06:55,121+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/psql=str:'/opt/rh/rh-postgresql10/root/usr/bin/psql' >2019-02-26 17:06:55,121+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/python3=NoneType:'None' >2019-02-26 17:06:55,121+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/rc=NoneType:'None' >2019-02-26 17:06:55,121+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/rc-update=NoneType:'None' >2019-02-26 17:06:55,121+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/reboot=str:'/usr/sbin/reboot' >2019-02-26 17:06:55,121+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/restorecon=str:'/usr/sbin/restorecon' >2019-02-26 17:06:55,121+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/rpm=str:'/usr/bin/rpm' >2019-02-26 17:06:55,122+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/selinuxenabled=str:'/usr/sbin/selinuxenabled' >2019-02-26 17:06:55,122+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/semanage=str:'/usr/sbin/semanage' >2019-02-26 17:06:55,122+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/service=str:'/usr/sbin/service' >2019-02-26 17:06:55,122+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/ssh-keygen=str:'/usr/bin/ssh-keygen' >2019-02-26 17:06:55,122+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/sysctl=str:'/usr/sbin/sysctl' >2019-02-26 17:06:55,122+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV COMMAND/systemctl=str:'/usr/bin/systemctl' >2019-02-26 17:06:55,122+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/configFileAppend=str:':/tmp/answerfile-20190226170545Z.txt' >2019-02-26 17:06:55,122+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/configFileName=str:'/etc/ovirt-engine-setup.conf' >2019-02-26 17:06:55,122+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/failOnPrioOverride=bool:'True' >2019-02-26 17:06:55,122+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/internalPackageTransaction=Transaction:'transaction' >2019-02-26 17:06:55,122+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logDir=str:'/var/log/ovirt-engine/setup' >2019-02-26 17:06:55,123+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileHandle=file:'<open file '/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log', mode 'a' at 0x7f1fe50f6a50>' >2019-02-26 17:06:55,123+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileName=str:'/var/log/ovirt-engine/setup/ovirt-engine-setup-20190226170604-v83a48.log' >2019-02-26 17:06:55,123+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFileNamePrefix=str:'ovirt-engine-setup' >2019-02-26 17:06:55,123+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilter=_MyLoggerFilter:'filter' >2019-02-26 17:06:55,123+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilterKeys=list:'['OVESETUP_DWH_DB/password', 'OVESETUP_DB/password', 'OVESETUP_CONFIG/remoteEngineHostRootPassword', 'OVESETUP_DB/password', 'OVESETUP_PKI/storePassword', 'OVESETUP_CONFIG/adminPassword', 'OVESETUP_OVN/ovirtProviderOvnSecret', 'OVESETUP_OVN/ovirtProviderOvnPassword', 'OVESETUP_CL_DB/password']' >2019-02-26 17:06:55,123+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logFilterRe=list:'[<_sre.SRE_Pattern object at 0x2363440>]' >2019-02-26 17:06:55,123+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/logRemoveAtExit=bool:'False' >2019-02-26 17:06:55,123+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/mainTransaction=Transaction:'transaction' >2019-02-26 17:06:55,123+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/modifiedFiles=list:'[]' >2019-02-26 17:06:55,124+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV CORE/randomizeEvents=bool:'False' >2019-02-26 17:06:55,124+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/answerFile=NoneType:'None' >2019-02-26 17:06:55,124+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/answerFileContent=str:'# OTOPI answer file, generated by human dialog >[environment:default] >QUESTION/1/OVESETUP_CORE_ENGINE_STOP=str:ok >QUESTION/1/OVESETUP_DIALOG_CONFIRM_SETTINGS=str:ok >QUESTION/1/OVESETUP_DWH_PERFORM_BACKUP=str:yes >' >2019-02-26 17:06:55,124+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/autoAcceptDefault=bool:'True' >2019-02-26 17:06:55,124+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/boundary=str:'--=451b80dc-996f-432e-9e4f-2b29ef6d1141=--' >2019-02-26 17:06:55,124+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/cliVersion=int:'1' >2019-02-26 17:06:55,124+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/customization=bool:'False' >2019-02-26 17:06:55,124+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV DIALOG/dialect=str:'human' >2019-02-26 17:06:55,124+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_NAME=str:'otopi' >2019-02-26 17:06:55,124+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV INFO/PACKAGE_VERSION=str:'1.8.1_master' >2019-02-26 17:06:55,125+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/firewalldAvailable=bool:'True' >2019-02-26 17:06:55,125+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/firewalldDisableServices=list:'[]' >2019-02-26 17:06:55,125+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/firewalldEnable=bool:'True' >2019-02-26 17:06:55,125+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/iptablesEnable=bool:'False' >2019-02-26 17:06:55,125+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/iptablesRules=NoneType:'None' >2019-02-26 17:06:55,125+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/sshEnable=bool:'False' >2019-02-26 17:06:55,125+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/sshKey=NoneType:'None' >2019-02-26 17:06:55,125+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK/sshUser=str:'' >2019-02-26 17:06:55,125+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-fence-kdump-listener=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-fence-kdump-listener</short> > <description>oVirt configured fence_kdump listener service</description> > <port protocol="udp" port="7410"/> ></service> >' >2019-02-26 17:06:55,126+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-http=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-http</short> > <description>oVirt configured http service</description> > <port protocol="tcp" port="80"/> ></service> >' >2019-02-26 17:06:55,126+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-https=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-https</short> > <description>oVirt configured https service</description> > <port protocol="tcp" port="443"/> ></service> >' >2019-02-26 17:06:55,126+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-imageio-proxy=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-imageio-proxy</short> > <description>oVirt ImageIO Proxy service</description> > <port protocol="tcp" port="54323"/> ></service> >' >2019-02-26 17:06:55,126+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-postgres=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-postgres</short> > <description>oVirt configured postgres service</description> > <port protocol="tcp" port="5432"/> ></service> >' >2019-02-26 17:06:55,126+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-provider-ovn=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-provider-ovn</short> > <description>oVirt provider ovn</description> > <port protocol="tcp" port="9696"/> > <port protocol="tcp" port="35357"/> ></service> >' >2019-02-26 17:06:55,126+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-vmconsole-proxy=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-vmconsole-proxy</short> > <description>oVirt configured VM Console Proxy service</description> > <port protocol="tcp" port="2222"/> ></service> >' >2019-02-26 17:06:55,126+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovirt-websocket-proxy=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovirt-websocket-proxy</short> > <description>oVirt configured WebSocket Proxy service</description> > <port protocol="tcp" port="6100"/> ></service> >' >2019-02-26 17:06:55,126+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV NETWORK_FIREWALLD_SERVICE/ovn-central-firewall-service=str:'<?xml version="1.0" encoding="utf-8"?> ><service> > <short>ovn-central-firewall-service</short> > <description>Firewall service for ovn central</description> > <port protocol="tcp" port="6641"/> > <port protocol="tcp" port="6642"/> ></service> >' >2019-02-26 17:06:55,126+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/enableUpgrade=NoneType:'None' >2019-02-26 17:06:55,126+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/requireRollback=NoneType:'None' >2019-02-26 17:06:55,126+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockApply=list:'['ovirt-engine-extension-aaa-jdbc', 'ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay', 'ovirt-engine', 'ovirt-engine-backend', 'ovirt-engine-dbscripts', 'ovirt-engine-restapi', 'ovirt-engine-tools', 'ovirt-engine-tools-backup', 'ovirt-engine-webadmin-portal', 'ovirt-engine-ui-extensions', 'ovirt-engine-dwh']' >2019-02-26 17:06:55,127+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OSETUP_RPMDISTRO/versionLockFilter=list:'['ovirt-engine-extension-aaa-jdbc', 'ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay', 'ovirt-engine', 'ovirt-engine-dwh', 'ovirt-engine-dwh-setup']' >2019-02-26 17:06:55,127+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configFileOvirtEngine=str:'/etc/httpd/conf.d/z-ovirt-engine-proxy.conf' >2019-02-26 17:06:55,127+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configFileOvirtRoot=str:'/etc/httpd/conf.d/ovirt-engine-root-redirect.conf' >2019-02-26 17:06:55,127+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configFileSsl=str:'/etc/httpd/conf.d/ssl.conf' >2019-02-26 17:06:55,127+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configureRootRedirection=NoneType:'None' >2019-02-26 17:06:55,127+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configureRootRedirectionDefault=bool:'True' >2019-02-26 17:06:55,128+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configureSsl=NoneType:'None' >2019-02-26 17:06:55,128+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/configured=bool:'True' >2019-02-26 17:06:55,128+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/enable=bool:'True' >2019-02-26 17:06:55,130+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/httpdService=str:'httpd' >2019-02-26 17:06:55,130+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_APACHE/needRestart=bool:'True' >2019-02-26 17:06:55,130+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ASYNC/clearTasks=bool:'True' >2019-02-26 17:06:55,130+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ASYNC/clearTasksWait=int:'20' >2019-02-26 17:06:55,130+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/connection=NoneType:'None' >2019-02-26 17:06:55,131+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/database=NoneType:'None' >2019-02-26 17:06:55,131+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/dumper=str:'pg_custom' >2019-02-26 17:06:55,131+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/enable=bool:'False' >2019-02-26 17:06:55,131+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/filter=NoneType:'None' >2019-02-26 17:06:55,131+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/host=NoneType:'None' >2019-02-26 17:06:55,131+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/justRestored=bool:'False' >2019-02-26 17:06:55,131+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/needDBMSUpgrade=bool:'False' >2019-02-26 17:06:55,131+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/newDatabase=bool:'True' >2019-02-26 17:06:55,131+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/password=NoneType:'None' >2019-02-26 17:06:55,131+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/pgPassFile=NoneType:'None' >2019-02-26 17:06:55,131+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/port=NoneType:'None' >2019-02-26 17:06:55,132+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/restoreJobs=int:'2' >2019-02-26 17:06:55,132+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/secured=NoneType:'None' >2019-02-26 17:06:55,132+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/securedHostValidation=NoneType:'None' >2019-02-26 17:06:55,132+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/statement=NoneType:'None' >2019-02-26 17:06:55,132+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_DB/user=NoneType:'None' >2019-02-26 17:06:55,132+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CL_PROVISIONING/postgresProvisioningEnabled=NoneType:'None' >2019-02-26 17:06:55,132+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/addOvirtGlanceRepository=bool:'True' >2019-02-26 17:06:55,132+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminPassword=str:'**FILTERED**' >2019-02-26 17:06:55,132+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUser=str:'admin@internal' >2019-02-26 17:06:55,132+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserAuthzName=str:'internal-authz' >2019-02-26 17:06:55,132+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserAuthzType=str:'ovirt-engine-extension-aaa-jdbc' >2019-02-26 17:06:55,133+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserId=str:'50a91983-19f1-4193-9755-227c79ab5e36' >2019-02-26 17:06:55,133+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/adminUserNamespace=str:'*' >2019-02-26 17:06:55,133+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/applicationMode=NoneType:'None' >2019-02-26 17:06:55,133+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/continueSetupOnHEVM=NoneType:'None' >2019-02-26 17:06:55,133+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineDbBackupDir=str:'/var/lib/ovirt-engine/backups' >2019-02-26 17:06:55,133+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineHeapMax=str:'3928M' >2019-02-26 17:06:55,133+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineHeapMin=str:'3928M' >2019-02-26 17:06:55,133+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/engineServiceStopNeeded=bool:'True' >2019-02-26 17:06:55,133+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fenceKdumpListenerStopNeeded=bool:'True' >2019-02-26 17:06:55,133+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallChangesReview=NoneType:'None' >2019-02-26 17:06:55,134+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallManager=str:'firewalld' >2019-02-26 17:06:55,134+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/firewallManagers=list:'[<otopi.plugins.ovirt_engine_common.base.network.firewall_manager_firewalld._FirewalldManager object at 0x7f1fdf5ab9d0>, <otopi.plugins.ovirt_engine_common.base.network.firewall_manager_human._HumanManager object at 0x7f1fdf5abd90>, <otopi.plugins.ovirt_engine_common.base.network.firewall_manager_iptables._IpTablesManager object at 0x7f1fdf5abdd0>]' >2019-02-26 17:06:55,134+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdn=str:'gb60kf2.democustomer.televic.com' >2019-02-26 17:06:55,134+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdnIsNeeded=bool:'True' >2019-02-26 17:06:55,134+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdnNonLoopback=bool:'False' >2019-02-26 17:06:55,134+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/fqdnReverseValidation=bool:'False' >2019-02-26 17:06:55,134+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/httpPort=int:'80' >2019-02-26 17:06:55,134+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/httpsPort=int:'443' >2019-02-26 17:06:55,134+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/ignoreVdsgroupInNotifier=NoneType:'None' >2019-02-26 17:06:55,134+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyConfig=bool:'True' >2019-02-26 17:06:55,134+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyHost=str:'localhost' >2019-02-26 17:06:55,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyPort=int:'54323' >2019-02-26 17:06:55,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/imageioProxyStopNeeded=bool:'True' >2019-02-26 17:06:55,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainACL=NoneType:'None' >2019-02-26 17:06:55,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainDefaultMountPoint=str:'/var/lib/exports/iso' >2019-02-26 17:06:55,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainExists=bool:'False' >2019-02-26 17:06:55,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainMountPoint=NoneType:'None' >2019-02-26 17:06:55,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainName=NoneType:'None' >2019-02-26 17:06:55,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainSdUuid=NoneType:'None' >2019-02-26 17:06:55,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoDomainStorageDir=NoneType:'None' >2019-02-26 17:06:55,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/isoPathsToUpload=list:'['/usr/share/virtio-win/virtio-win_x86.vfd', '/usr/share/virtio-win/virtio-win_amd64.vfd', '/usr/share/virtio-win/virtio-win.iso', '/usr/share/ovirt-guest-tools-iso/ovirt-tools-setup.iso', '/usr/share/rhev-guest-tools-iso/rhev-tools-setup.iso', '/usr/share/rhv-guest-tools-iso/rhv-tools-setup.iso']' >2019-02-26 17:06:55,135+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/javaHome=unicode:'/usr/lib/jvm/jre' >2019-02-26 17:06:55,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/javaNeeded=bool:'True' >2019-02-26 17:06:55,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossAjpPort=int:'8702' >2019-02-26 17:06:55,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossDebugAddress=str:'127.0.0.1:8787' >2019-02-26 17:06:55,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossDirectHttpPort=NoneType:'None' >2019-02-26 17:06:55,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossDirectHttpsPort=NoneType:'None' >2019-02-26 17:06:55,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossHome=str:'/usr/share/ovirt-engine-wildfly' >2019-02-26 17:06:55,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossHttpPort=int:'8080' >2019-02-26 17:06:55,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossHttpsPort=int:'8443' >2019-02-26 17:06:55,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/jbossNeeded=bool:'True' >2019-02-26 17:06:55,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/needCommonTitles=bool:'True' >2019-02-26 17:06:55,136+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/pkiOIPCSRFilename=NoneType:'None' >2019-02-26 17:06:55,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/pkiRenewalDocUrl=str:'https://www.ovirt.org/develop/release-management/features/infra/pki-renew/' >2019-02-26 17:06:55,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/pkiWSPCSRFilename=NoneType:'None' >2019-02-26 17:06:55,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/publicHttpPort=int:'80' >2019-02-26 17:06:55,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/publicHttpsPort=int:'443' >2019-02-26 17:06:55,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostClientKey=NoneType:'None' >2019-02-26 17:06:55,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostKnownHosts=NoneType:'None' >2019-02-26 17:06:55,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostRootPassword=NoneType:'None' >2019-02-26 17:06:55,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineHostSshPort=NoneType:'None' >2019-02-26 17:06:55,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineSetupStyle=NoneType:'None' >2019-02-26 17:06:55,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/remoteEngineSetupStyles=list:'[<otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_root_ssh._RootSshManager object at 0x7f1fdf5ab6d0>, <otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_manual_files._ManualFiles object at 0x7f1fdf5ab910>]' >2019-02-26 17:06:55,137+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/sanWipeAfterDelete=bool:'False' >2019-02-26 17:06:55,138+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/storageIsLocal=bool:'False' >2019-02-26 17:06:55,138+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/storageType=NoneType:'None' >2019-02-26 17:06:55,138+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/totalMemoryMB=int:'15715' >2019-02-26 17:06:55,138+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/updateFirewall=bool:'True' >2019-02-26 17:06:55,138+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/validFirewallManagers=str:'' >2019-02-26 17:06:55,138+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/vmconsoleProxyStopNeeded=bool:'True' >2019-02-26 17:06:55,138+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyConfig=bool:'True' >2019-02-26 17:06:55,138+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyHost=str:'localhost' >2019-02-26 17:06:55,138+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyPort=int:'6100' >2019-02-26 17:06:55,138+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CONFIG/websocketProxyStopNeeded=bool:'True' >2019-02-26 17:06:55,138+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/action=str:'setup' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/answerFile=NoneType:'None' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/developerMode=bool:'False' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/engineStop=bool:'True' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/failOnDulicatedConstant=bool:'False' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/generatePostInstall=bool:'True' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/generateStandardAnswerfile=bool:'True' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/generatedByVersion=str:'4.3.1.2_master' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/offlinePackager=bool:'False' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/originalGeneratedByVersion=str:'4.3.1.2_master' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/reconfigureOptionalComponents=NoneType:'None' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/registerUninstallGroups=RegisterGroups:'<otopi.plugins.ovirt_engine_common.base.core.uninstall.RegisterGroups object at 0x7f1fdf5a12d0>' >2019-02-26 17:06:55,139+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/remoteEngine=RemoteEngine:'<ovirt_engine_setup.remote_engine.RemoteEngine object at 0x7f1fdf5ab490>' >2019-02-26 17:06:55,140+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/setupAttributesModules=list:'[<module 'ovirt_engine_setup.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/constants.pyc'>, <module 'ovirt_engine_setup.engine_common.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/constants.pyc'>, <module 'ovirt_engine_setup.engine.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/constants.pyc'>, <module 'ovirt_engine_setup.cinderlib.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/cinderlib/constants.pyc'>, <module 'ovirt_engine_setup.websocket_proxy.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/websocket_proxy/constants.pyc'>, <module 'ovirt_engine_setup.dwh.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/dwh/constants.pyc'>, <module 'ovirt_engine_setup.ovirt_imageio_proxy.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/ovirt_imageio_proxy/constants.pyc'>, <module 'ovirt_engine_setup.vmconsole_proxy_helper.constants' from '/usr/share/ovirt-engine/setup/ovirt_engine_setup/vmconsole_proxy_helper/constants.pyc'>]' >2019-02-26 17:06:55,140+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallFilesInfo=dict:'{'/etc/pki/ovirt-engine/keys/reports.key.nopass': {'sha256': '5786546ba359fa30cc1aafa2f8184920aff22a0242af8c896e622bff6915654a', 'groups': ['ca_pki'], 'changed': False}, '/etc/yum/pluginconf.d/versionlock.list': {'sha256': 'b24d4cbdd21257b2bd18a2d0c74215914c6c6af6669982db603ad5536c33c85c', 'groups': ['unremovable'], 'changed': False}, '/etc/httpd/conf.d/ovirt-engine-root-redirect.conf': {'sha256': '725e6910924daf7b0ee32850d87e5ca34044466a83bab52e4701b36007c0605e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/cacert.conf': {'sha256': '8e6283fb385e553115e552a728c83305e19b579b896d38366ef6cb2ecb47b369', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-vmconsole/ca.pub': {'sha256': 'b1ccf8cb0574165993635052971e3e446dfc113969163ee0090355661f3c6035', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/imageio-proxy.key.nopass': {'sha256': '05d63444b83788dda4b6587313614d25708e45d3a5453b86c724bf1649c15dcc', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-websocket-proxy.xml': {'sha256': 'a3e2c90d0f9376eae859c80ec34fdfeddddb14d71d8e4ce7ac5451caaf92c626', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/vmconsole-proxy-user-cert.pub': {'sha256': '97821c32d42b4922621ed7ff231c395e3fd7d1cc7ff7a0c1b60bdb783b144cbb', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-engine/.truststore': {'sha256': '0208bd660df27eb6f41b7b6bf7cc3d85172f4a20c212bed8ede03d76f30dee1f', 'groups': ['ca_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-postgres.xml': {'sha256': 'ec1497fa614341e63f87356f45d355725cffd002f88f9c06f4cc4d22b8c6a111', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/vmconsole-proxy-helper.cer': {'sha256': '489067aa36a0e7156a4f7b133b017ba157f79f8eaa8cbf7d94caf464ed988a2e', 'groups': ['vmconsole_proxy_helper_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-provider-ovn.xml': {'sha256': '160675cdc8b9f21799dc0a4e128c92a538c39e0b2a9211db2b1075791e72499e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/ca.pem': {'sha256': 'acab4732736542e99d9acd3889b7770137ebd9ce3b903058c56fd402ce3bb2b5', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/certs/vmconsole-proxy-host-cert.pub': {'sha256': '6f42b0a2b51944325376725c5d296d6a40800e0b3f05ff530862a90aeb98f9fa', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf': {'sha256': '148cc4885960c035e4a144e8be309ee5387341a1141a7ffb84c103b30cfb1c57', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/extensions.d/internal-authz.properties': {'sha256': '8f725950bc98cf5ebc90b49a7164232bbc96dba496cdff49fb8695810c3ed25d', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovn-central-firewall-service.xml': {'sha256': '5e333ccf96a4ced8db8c7d6fce1103a9176d8ed6dd92aa3c65b4591019610479', 'groups': ['core'], 'changed': False}, '/etc/httpd/conf.d/ssl.conf': {'sha256': '16a0d7280fa0233a430b95a9e26ed932cc1cd37d95f97503c49bdcb278e46f34', 'groups': ['unremovable'], 'changed': False}, '/etc/pki/ovirt-engine/certs/ovn-ndb.cer': {'sha256': '6f9f3b3975cc56949fad8f2436ae13147060ac0d885524d27556e95defdeab4a', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-vmconsole-proxy.xml': {'sha256': '79572b94e2659e3fa00e05daef86ed585eb4c0b0fa2bf1a294f3931d682aaa43', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovirt-https.xml': {'sha256': '4c9dcba46006fd50fc5b3c2cae4c80b511a0b1cb85d8485564396e792227ed74', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/cacert.template': {'sha256': '8e6283fb385e553115e552a728c83305e19b579b896d38366ef6cb2ecb47b369', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf': {'sha256': '4b7456eb6f9fd945cf73d0c4ee42ba7eef326e7242f5c4bd1bbdecaa2640b4f5', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-http.xml': {'sha256': 'dae71c32b5e1f48169289864a4b6aaf0f05ed275411ca0e48f754bee38839c4b', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovirt-imageio-proxy.xml': {'sha256': '9fd6c2d442292be1a3e2bb76e01be7fdd48109581f6fcc74ca695f4fe5d70fce', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/cert.conf': {'sha256': 'f5e5f1f639a3739b1706f70908185225aa54737a03750461ce79be9182959bd3', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-uuid.conf': {'sha256': '89207814d037350e2145bf137a5b97ed7452d5c67af825a6af237ed0d6b12e6b', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_user_rsa-cert.pub': {'sha256': '97821c32d42b4922621ed7ff231c395e3fd7d1cc7ff7a0c1b60bdb783b144cbb', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-engine/certs/ovn-sdb.cer': {'sha256': '0e95c592994203f493a1748c63c70a1ef4258bfd3524748db062305ba7c46e5f', 'groups': ['ca_pki'], 'changed': False}, '/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf': {'sha256': 'e473a6d26516e2d53f2656419e2b972e7b8a98fabf8062152dd658cc87803103', 'groups': ['core', 'unremovable'], 'changed': False}, '/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf': {'sha256': '756d8fd6fc3dba3fbcdbb67f976fdcd3674d142186acba1f2d1f49eef9e4b90d', 'groups': ['core', 'unremovable'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-pki.conf': {'sha256': '473acc826d85e13c12a1963408c09236c0ae0df3dd273d01c2662615857c908c', 'groups': ['ca_config'], 'changed': False}, '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf': {'sha256': 'a56c71dbd4ffa4c4ef5e2242ba293c74526a6639e0ad74dcde0d0194e3385da4', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/ovirt-imageio-proxy/ovirt-imageio-proxy.conf': {'sha256': 'f318c37839090c1293601e99c175df6de5c031789402484cb87047c61cd67b1e', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf': {'sha256': '787af541ce3a5f3cc94a8cc5b69836185c85eb27ac7674968829fda2295fe5e8', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/firewalld/services/ovirt-vmconsole-proxy.xml': {'sha256': '79572b94e2659e3fa00e05daef86ed585eb4c0b0fa2bf1a294f3931d682aaa43', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-dwh-database.conf': {'sha256': 'c9ca6fb104a7f278d8f8967305eca046e08aa32925671dd4b000665cc6d5dc21', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-java.conf': {'sha256': '428cf474ba75072c2b43094d28531b8e20de57d5a61804cbe1e73e29b03d4d9a', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/ovirt-provider-ovn-conf.example': {'sha256': 'd103404352547707ef1c5e7554d8b9cfa46565831f7f5dac2b22c860b0676df6', 'groups': ['ovirt-provider-ovn'], 'changed': False}, '/etc/ovirt-engine/isouploader.conf.d/10-engine-setup.conf': {'sha256': '78a4331e420caa644e54eb50d27feabaab74640be84a8bc63d1db8a1ed907782', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/11-setup-sso.conf': {'sha256': 'c9e19cc3a7cfee6b7ba4ab2558173415609f524e920a72a0b24a0f90cc05c1bf', 'groups': ['core'], 'changed': False}, '/etc/yum/pluginconf.d/versionlock.conf': {'sha256': '7704b1e5aec28208978d1d82ea7426741f5a46c603058bfc0c40caaeffabddf4', 'groups': ['unremovable'], 'changed': False}, '/etc/pki/ovirt-engine/certs/apache.cer': {'sha256': '7266f5cf82cf35bf7a56b00a45ae44148cfeca3253b41973acad045f1cca8f06', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/iptables.example': {'sha256': '0bcb04737d92298c4d073c0eb5a341b121861b6840871a87615f67e39c91a03e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/apache.key.nopass': {'sha256': 'eeeebb779eef7f386e9134e173f1522da4568f66c7fa54cda05acdbe75cbf2ad', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/apache-ca.pem': {'sha256': 'acab4732736542e99d9acd3889b7770137ebd9ce3b903058c56fd402ce3bb2b5', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/aaa/internal.properties': {'sha256': '1c543148b3d3a613237a61a7d37929a437d45189f5a59c339e82219bb895acc3', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/vmconsole-proxy-helper.key.nopass': {'sha256': '83ff5b10f2e9e4db76f696330a5a5a6e6ae137a0ff7e88be4143f3c0f157c872', 'groups': ['vmconsole_proxy_helper_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-imageio-proxy.xml': {'sha256': '9fd6c2d442292be1a3e2bb76e01be7fdd48109581f6fcc74ca695f4fe5d70fce', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/websocket-proxy.cer': {'sha256': '20dee3e913e8e1c080f97b76e6a97f755cd6639bd9b2da3630b06ebbebf256ea', 'groups': ['ca_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-websocket-proxy.xml': {'sha256': 'a3e2c90d0f9376eae859c80ec34fdfeddddb14d71d8e4ce7ac5451caaf92c626', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/extensions.d/internal-authn.properties': {'sha256': 'e2cecb90c9c076747d578e225899b4b42a167a94f7df871a630fefded4faaf0b', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine-dwh/examples/10-setup-dwh-database.conf': {'sha256': '88a531652eb7ed1e67ddca7d0079f22bbe79c6977d572d0852f19eb7efe48845', 'groups': ['ovirt_dwh_files'], 'changed': False}, '/etc/pki/ovirt-engine/cert.template': {'sha256': 'f5e5f1f639a3739b1706f70908185225aa54737a03750461ce79be9182959bd3', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-database.conf': {'sha256': '5e9fed213d2d7e67092f4085f0a700b1eff6637e47d2d5ad8eaf894ac1bada87', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-https.xml': {'sha256': '4c9dcba46006fd50fc5b3c2cae4c80b511a0b1cb85d8485564396e792227ed74', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-cinderlib.conf': {'sha256': '91908e56616762d7f15da4e753e4581583d5ffa2d6199ae1b84b47cbf68ca82b', 'groups': ['core'], 'changed': False}, '/etc/ovirt-provider-ovn/conf.d/10-setup-ovirt-provider-ovn.conf': {'sha256': 'd103404352547707ef1c5e7554d8b9cfa46565831f7f5dac2b22c860b0676df6', 'groups': ['ovirt-provider-ovn'], 'changed': False}, '/etc/pki/ovirt-engine/private/ca.pem': {'sha256': '1df8e07c30f8f1fd4418fe808e9e22e94d699b4ce92ff356135d82659352ba81', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/ovn-sdb.key.nopass': {'sha256': '22afb845e5ce0c97857cdec190475805fba9e4e58173a13288d6d7074f0710f2', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/websocket-proxy.key.nopass': {'sha256': '08656d2d49c6ce8d42851b1288ce249052b3d1aac34c82eea7b66185b12cb90a', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-jboss.conf': {'sha256': '42db91c01eaa61ad8bbfe74c4de198be7287a09bd8cc1fc2c95bbc844c381d1f', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf': {'sha256': '1586d0f9f0839f12acd9210b89edb712f301a2b2070cf0ba59ea20c4d8eb8c3f', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_host_rsa-cert.pub': {'sha256': '6f42b0a2b51944325376725c5d296d6a40800e0b3f05ff530862a90aeb98f9fa', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/ovirt-engine/notifier/notifier.conf.d/10-setup-jboss.conf': {'sha256': '42db91c01eaa61ad8bbfe74c4de198be7287a09bd8cc1fc2c95bbc844c381d1f', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/logcollector.conf.d/10-engine-setup.conf': {'sha256': 'b57b6a8a257ba92441a3e2047e26003f5d9d16bc347f751773df6966670b1686', 'groups': ['core'], 'changed': False}, '/etc/httpd/conf.d/z-ovirt-engine-proxy.conf': {'sha256': 'bb2da5e6a7eb055ac75a7d29efaae581f6545eb23997bde2355b6e542eefa9d9', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-provider-ovn.xml': {'sha256': '160675cdc8b9f21799dc0a4e128c92a538c39e0b2a9211db2b1075791e72499e', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/engine_id_rsa': {'sha256': '97c8f82a0ab8d5952fbbece09ac62801999ca3eac95fe905c432099adbf80ee4', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/imageio-proxy.cer': {'sha256': '0c50c7e8405172cf578dec8d44351702030e2b69fb466925881d9e2cf2b5e67a', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/ovirt-provider-ovn.key.nopass': {'sha256': 'f3c52037a36d94a84b28a017387aecfb0cfba9becb42539870787d13c02d0439', 'groups': ['ca_pki'], 'changed': False}, '/etc/firewalld/services/ovirt-http.xml': {'sha256': 'dae71c32b5e1f48169289864a4b6aaf0f05ed275411ca0e48f754bee38839c4b', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/certs/ovirt-provider-ovn.cer': {'sha256': 'cd96751d90af0d9530d627c8e018225bd3af6a2e32033e3c3abc5b8c97751827', 'groups': ['ca_pki'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovn-central-firewall-service.xml': {'sha256': '5e333ccf96a4ced8db8c7d6fce1103a9176d8ed6dd92aa3c65b4591019610479', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_host_rsa': {'sha256': '98ce9eed1124a50f7863abc4e8c9fe3348459d439d8b83b560c9ae4c9964b2cc', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/pki/ovirt-vmconsole/proxy-ssh_user_rsa': {'sha256': 'd6da744a31597c598968586a2293e0cf7865a7a8a0a55a6703bc95086975102d', 'groups': ['vmconsole_proxy_pki'], 'changed': False}, '/etc/ovirt-vmconsole/ovirt-vmconsole-proxy/conf.d/20-ovirt-vmconsole-proxy-helper.conf': {'sha256': '545cc02604213084f5c397dd5f84d3827dcc8b7a226d07c0be6dbace037dae1b', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-postgres.xml': {'sha256': 'ec1497fa614341e63f87356f45d355725cffd002f88f9c06f4cc4d22b8c6a111', 'groups': ['core'], 'changed': False}, '/etc/firewalld/services/ovirt-fence-kdump-listener.xml': {'sha256': '3935d1dd81240dbd3578c39e32593c31e2441a3939055383b5f8c19ed2581025', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/firewalld/ovirt-fence-kdump-listener.xml': {'sha256': '3935d1dd81240dbd3578c39e32593c31e2441a3939055383b5f8c19ed2581025', 'groups': ['core'], 'changed': False}, '/etc/ovirt-engine/ovirt-vmconsole-proxy-helper.conf.d/10-setup.conf': {'sha256': '910757bc728db6844a1d2ae3c8b5c59b8998c2c6eda1f9368e8703131fa0940f', 'groups': ['core'], 'changed': False}, '/etc/pki/ovirt-engine/keys/vmconsole-proxy-helper.p12': {'sha256': '2a7222eb6ce9ec43ca1667a77bda949f784a20f829a50c4f651e8bb2d97857f6', 'groups': ['vmconsole_proxy_helper_pki'], 'changed': False}, '/etc/pki/ovirt-engine/keys/ovn-ndb.key.nopass': {'sha256': '4720b1b2f579ad730346f446b4e6569494b2af48d6d43d518a9b424a2ea1c28c', 'groups': ['ca_pki'], 'changed': False}, '/etc/pki/ovirt-engine/certs/reports.cer': {'sha256': '24b6b068b64a11b3c4e71fca2e4e4a5172a801c879802a8d8af7a6cac59f398e', 'groups': ['ca_pki'], 'changed': False}}' >2019-02-26 17:06:55,140+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallGroupsDescriptions=dict:'{'core': 'Core files', 'ca_pki': 'PKI keys', 'ovirt-provider-ovn': 'ovirt-provider-ovn configuration files', 'ssl': 'Apache SSL configuration', 'ca_config': 'PKI configuration', 'vmconsole_proxy_helper_pki': 'VMConsole Helper PKI keys', 'versionlock_conf': 'Versionlock Plugin Configuration', 'versionlock': 'YUM version locking configuration', 'ovirt_dwh_files': 'DWH files', 'vmconsole_proxy_pki': 'VMConsole PKI Proxy keys'}' >2019-02-26 17:06:55,140+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallLinesInfo=dict:'{'/etc/httpd/conf.d/ssl.conf': [{'added': 'SSLCACertificateFile /etc/pki/ovirt-engine/apache-ca.pem'}, {'removed': 'SSLProtocol all -SSLv2 -SSLv3', 'added': '# SSLProtocol all -SSLv2 -SSLv3'}, {'removed': 'SSLCertificateKeyFile /etc/pki/tls/private/localhost.key', 'added': '# SSLCertificateKeyFile /etc/pki/tls/private/localhost.key'}, {'added': 'SSLCertificateKeyFile /etc/pki/ovirt-engine/keys/apache.key.nopass'}, {'removed': 'SSLCertificateFile /etc/pki/tls/certs/localhost.crt', 'added': '# SSLCertificateFile /etc/pki/tls/certs/localhost.crt'}, {'added': 'SSLCertificateFile /etc/pki/ovirt-engine/certs/apache.cer'}, {'removed': 'SSLProtocol all -SSLv2 -SSLv3', 'added': '# SSLProtocol all -SSLv2 -SSLv3'}, {'added': 'SSLProtocol all -SSLv3 -TLSv1'}, {'added': 'SSLCertificateKeyFile /etc/pki/ovirt-engine/keys/apache.key.nopass'}, {'added': 'SSLProtocol all -SSLv3 -TLSv1'}, {'removed': 'SSLCertificateFile /etc/pki/tls/certs/localhost.crt', 'added': '# SSLCertificateFile /etc/pki/tls/certs/localhost.crt'}, {'added': 'SSLCACertificateFile /etc/pki/ovirt-engine/apache-ca.pem'}, {'removed': 'SSLCertificateKeyFile /etc/pki/tls/private/localhost.key', 'added': '# SSLCertificateKeyFile /etc/pki/tls/private/localhost.key'}, {'added': 'SSLCertificateFile /etc/pki/ovirt-engine/certs/apache.cer'}], '/etc/yum/pluginconf.d/versionlock.list': [{'added': 'ovirt-engine-tools-backup-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-wildfly-15.0.1-1.el7.x86_64'}, {'added': 'ovirt-engine-restapi-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-dbscripts-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-dwh-4.3.1-0.0.master.20190110155219.el7.noarch'}, {'added': 'ovirt-engine-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-webadmin-portal-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-ui-extensions-1.0.3-1.el7.noarch'}, {'added': 'ovirt-engine-backend-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': 'ovirt-engine-wildfly-overlay-15.0.1-1.el7.noarch'}, {'added': 'ovirt-engine-extension-aaa-jdbc-1.1.8-1.el7.noarch'}, {'added': 'ovirt-engine-tools-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}], '/etc/yum/pluginconf.d/versionlock.conf': [{'added': 'follow_obsoletes=1'}]}' >2019-02-26 17:06:55,140+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallUninstallFiles=list:'['/etc/ovirt-engine/uninstall.d/20190226164438-uninstall.conf', '/etc/ovirt-engine/uninstall.d/20190226164849-uninstall.conf', '/etc/ovirt-engine/uninstall.d/20190226170203-uninstall.conf']' >2019-02-26 17:06:55,140+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/uninstallUnremovableFiles=list:'['/etc/yum/pluginconf.d/versionlock.conf', '/etc/yum/pluginconf.d/versionlock.list', '/etc/dnf/plugins/versionlock.list']' >2019-02-26 17:06:55,141+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE/upgradeSupportedVersions=str:'4.1,4.2,4.3' >2019-02-26 17:06:55,141+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/ca_config=list:'[[]]' >2019-02-26 17:06:55,141+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/ca_pki=list:'[[]]' >2019-02-26 17:06:55,141+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/ovirt_dwh_files=list:'[[], [], []]' >2019-02-26 17:06:55,141+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/versionlock=list:'[]' >2019-02-26 17:06:55,141+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_FILE_GROUP/versionlock_conf=list:'[]' >2019-02-26 17:06:55,141+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_LINES_GROUP/ca_config=dict:'{}' >2019-02-26 17:06:55,141+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_LINES_GROUP/ca_pki=dict:'{}' >2019-02-26 17:06:55,141+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_LINES_GROUP/ovirt_dwh_files=dict:'{}' >2019-02-26 17:06:55,141+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_LINES_GROUP/versionlock=dict:'{'/etc/yum/pluginconf.d/versionlock.list': [{'added': u'ovirt-engine-webadmin-portal-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-ui-extensions-1.0.3-1.el7.noarch'}, {'added': u'ovirt-engine-dwh-4.3.1-0.0.master.20190110155219.el7.noarch'}, {'added': u'ovirt-engine-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-restapi-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-dbscripts-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-tools-backup-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-wildfly-15.0.1-1.el7.x86_64'}, {'added': u'ovirt-engine-backend-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-wildfly-overlay-15.0.1-1.el7.noarch'}, {'added': u'ovirt-engine-tools-4.3.1.2-0.0.master.20190225111554.git314f81b.el7.noarch'}, {'added': u'ovirt-engine-extension-aaa-jdbc-1.1.8-1.el7.noarch'}]}' >2019-02-26 17:06:55,142+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_CORE_MODIFIED_LINES_GROUP/versionlock_conf=dict:'{'/etc/yum/pluginconf.d/versionlock.conf': []}' >2019-02-26 17:06:55,142+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/connection=connection:'<connection object at 0x7f1fdf5e2280; dsn: 'user=engine password=xxxxxxxxxxxxxxxxxxxxxx host=localhost port=5432 sslmode=allow dbname=engine', closed: 0>' >2019-02-26 17:06:55,142+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/database=str:'engine' >2019-02-26 17:06:55,142+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/dumper=str:'pg_custom' >2019-02-26 17:06:55,142+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/dwhVacuumFull=bool:'False' >2019-02-26 17:06:55,142+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/engineVacuumFull=bool:'False' >2019-02-26 17:06:55,142+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/filter=NoneType:'None' >2019-02-26 17:06:55,142+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/fixDbConfiguration=NoneType:'None' >2019-02-26 17:06:55,142+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/fixDbViolations=NoneType:'None' >2019-02-26 17:06:55,142+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/host=str:'localhost' >2019-02-26 17:06:55,142+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/invalidConfigItems=NoneType:'None' >2019-02-26 17:06:55,143+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/justRestored=bool:'False' >2019-02-26 17:06:55,143+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/needDBMSUpgrade=bool:'False' >2019-02-26 17:06:55,143+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/newDatabase=bool:'False' >2019-02-26 17:06:55,143+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/password=str:'**FILTERED**' >2019-02-26 17:06:55,143+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/pgPassFile=str:'/tmp/tmphKUzTK' >2019-02-26 17:06:55,143+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/port=str:'5432' >2019-02-26 17:06:55,143+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/restoreJobs=int:'2' >2019-02-26 17:06:55,143+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/secured=bool:'False' >2019-02-26 17:06:55,143+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/securedHostValidation=bool:'False' >2019-02-26 17:06:55,143+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/statement=Statement:'<ovirt_engine_setup.engine_common.database.Statement object at 0x7f1fdeca8f90>' >2019-02-26 17:06:55,143+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DB/user=str:'engine' >2019-02-26 17:06:55,144+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DIALOG/confirmSettings=bool:'True' >2019-02-26 17:06:55,144+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/dwhDbBackupDir=str:'/var/lib/ovirt-engine-dwh/backups' >2019-02-26 17:06:55,144+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/dwhServiceStopNeeded=bool:'True' >2019-02-26 17:06:55,144+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/remoteEngineConfigured=bool:'False' >2019-02-26 17:06:55,144+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CONFIG/scale=str:'1' >2019-02-26 17:06:55,144+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CORE/enable=bool:'True' >2019-02-26 17:06:55,144+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_CORE/uuid=str:'bf29a673-1ae8-45e3-b07f-4f56faa3e4a5' >2019-02-26 17:06:55,144+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/connection=connection:'<connection object at 0x7f1fdf5e26e0; dsn: 'user=ovirt_engine_history password=xxxxxxxxxxxxxxxxxxxxxx host=localhost port=5432 sslmode=allow dbname=ovirt_engine_history', closed: 0>' >2019-02-26 17:06:55,144+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/database=str:'ovirt_engine_history' >2019-02-26 17:06:55,144+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/disconnectExistingDwh=NoneType:'None' >2019-02-26 17:06:55,147+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/dumper=str:'pg_custom' >2019-02-26 17:06:55,147+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/filter=NoneType:'None' >2019-02-26 17:06:55,147+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/host=str:'localhost' >2019-02-26 17:06:55,147+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/needDBMSUpgrade=bool:'False' >2019-02-26 17:06:55,147+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/newDatabase=bool:'False' >2019-02-26 17:06:55,147+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/password=str:'**FILTERED**' >2019-02-26 17:06:55,147+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/performBackup=bool:'True' >2019-02-26 17:06:55,147+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/pgPassFile=str:'/tmp/tmpGEZX1y' >2019-02-26 17:06:55,147+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/port=int:'5432' >2019-02-26 17:06:55,147+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/restoreBackupLate=bool:'True' >2019-02-26 17:06:55,148+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/restoreJobs=int:'2' >2019-02-26 17:06:55,148+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/secured=bool:'False' >2019-02-26 17:06:55,148+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/securedHostValidation=bool:'False' >2019-02-26 17:06:55,148+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/statement=Statement:'<ovirt_engine_setup.engine_common.database.Statement object at 0x7f1fdf27bf50>' >2019-02-26 17:06:55,148+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_DB/user=str:'ovirt_engine_history' >2019-02-26 17:06:55,148+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_PROVISIONING/postgresProvisioningEnabled=bool:'True' >2019-02-26 17:06:55,148+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_RPMDISRO_PACKAGES=str:'ovirt-engine-dwh' >2019-02-26 17:06:55,148+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_DWH_RPMDISRO_PACKAGES_SETUP=str:'ovirt-engine-dwh-setup' >2019-02-26 17:06:55,148+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ENGINE_CONFIG/fqdn=str:'gb60kf2.democustomer.televic.com' >2019-02-26 17:06:55,148+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_ENGINE_CORE/enable=bool:'True' >2019-02-26 17:06:55,148+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldServices=list:'[{'absolute_path': '/usr/lib/firewalld/services/ovn-central-firewall-service.xml', 'name': 'ovn-central-firewall-service'}, {'absolute_path': '/usr/lib/firewalld/services/ovirt-provider-ovn.xml', 'name': 'ovirt-provider-ovn'}, {'directory': 'ovirt-common', 'name': 'ovirt-http'}, {'directory': 'ovirt-common', 'name': 'ovirt-https'}, {'directory': 'vmconsole-proxy', 'name': 'ovirt-vmconsole-proxy'}, {'directory': 'ovirt-imageio-proxy', 'name': 'ovirt-imageio-proxy'}, {'directory': 'websocket-proxy', 'name': 'ovirt-websocket-proxy'}, {'directory': 'ovirt-engine', 'name': 'ovirt-fence-kdump-listener'}, {'directory': 'ovirt-common', 'name': 'ovirt-postgres'}, {'directory': 'ovirt-common', 'name': 'ovirt-postgres'}]' >2019-02-26 17:06:55,149+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_NETWORK/firewalldSubst=dict:'{'@WEBSOCKET_PROXY_PORT@': 6100, '@HTTPS_PORT@': 443, '@VMCONSOLE_PROXY_PORT@': 2222, '@HTTP_PORT@': 80, '@IMAGEIO_PROXY_PORT@': 54323, '@JBOSS_HTTPS_PORT@': None, '@JBOSS_HTTP_PORT@': None}' >2019-02-26 17:06:55,149+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/firewalldServices=str:'ovn-central-firewall-service,ovirt-provider-ovn' >2019-02-26 17:06:55,149+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/firewalldServicesDir=str:'/usr/lib/firewalld/services' >2019-02-26 17:06:55,149+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvn=bool:'True' >2019-02-26 17:06:55,149+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvnId=str:'92e45e35-9ffe-4ded-b153-d69ee53e5bd6' >2019-02-26 17:06:55,149+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvnPassword=str:'**FILTERED**' >2019-02-26 17:06:55,149+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_OVN/ovirtProviderOvnUser=str:'admin@internal' >2019-02-26 17:06:55,149+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/country=str:'US' >2019-02-26 17:06:55,149+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/entities=list:'[{'keepKey': True, 'extract': False, 'name': 'engine', 'user': 'OVESETUP_SYSTEM/userEngine'}, {'keepKey': False, 'extract': False, 'name': 'jboss', 'user': 'OVESETUP_SYSTEM/userEngine'}, {'keepKey': False, 'extract': True, 'name': 'websocket-proxy', 'user': 'OVESETUP_SYSTEM/userEngine'}, {'keepKey': False, 'extract': True, 'name': 'apache', 'user': 'OVESETUP_SYSTEM/userRoot'}, {'keepKey': False, 'extract': True, 'name': 'reports', 'user': 'OVESETUP_SYSTEM/userRoot'}, {'keepKey': False, 'extract': True, 'name': 'imageio-proxy', 'user': 'OVESETUP_SYSTEM/userRoot'}]' >2019-02-26 17:06:55,149+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/organization=str:'demospace.televic.com' >2019-02-26 17:06:55,150+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/renew=NoneType:'None' >2019-02-26 17:06:55,150+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/sshPublicKey=unicode:'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCLHH6PrJmCvMFQt4IVPE5ilwcKJy6pvkdRWob2mCM9JQlIiBZHWliCow5pYVpA6v3mEDXbU2uzkD92DQkB9F6KJBrrGGiSUacasDZ4+FSVJrPQXm5iwrt4G5vvZOmA9Jtiwc/ja/NbVzrOyVHYk9VP03jsnl/3/qNq1yCNHnEpx7qeE+3YPdzQhK4SLUnB8HaNrjTG7nw/pOR/T6y/j6ayIiyKmyMTD8hRUM1LSGA7HEZNXSBdwflRoOctv5d5Fo9LiBCrXPTQmZEa2fhWzATke/ZKYmAMH+DJ86Mtd6M7+29ilVI/E3uU+0Mq7lmafcndBerQyvDMDPktVykb8bB' >2019-02-26 17:06:55,150+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PKI/storePassword=str:'**FILTERED**' >2019-02-26 17:06:55,150+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/oldPostgresService=str:'rh-postgresql95-postgresql' >2019-02-26 17:06:55,150+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumAnalyzeScaleFactor=float:'0.075' >2019-02-26 17:06:55,150+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumMaintenanceWorkMem=int:'65536' >2019-02-26 17:06:55,150+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumMaxWorkers=int:'6' >2019-02-26 17:06:55,150+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresAutovacuumVacuumScaleFactor=float:'0.01' >2019-02-26 17:06:55,150+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresConf=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf' >2019-02-26 17:06:55,150+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresExtraConfigItems=tuple:'({'ok': <function <lambda> at 0x7f1fdf599578>, 'check_on_use': True, 'needed_on_create': True, 'key': 'autovacuum_vacuum_scale_factor', 'expected': 0.01, 'error_msg': "It is required to be at most '{expected}'"}, {'ok': <function <lambda> at 0x7f1fdf550f50>, 'check_on_use': True, 'needed_on_create': True, 'key': 'autovacuum_analyze_scale_factor', 'expected': 0.075, 'error_msg': "It is required to be at most '{expected}'"}, {'ok': <function <lambda> at 0x7f1fdf2e0140>, 'check_on_use': True, 'needed_on_create': True, 'key': 'autovacuum_max_workers', 'expected': 6, 'error_msg': "It is required to be at least '{expected}'"}, {'ok': <function <lambda> at 0x7f1fdf2e02a8>, 'check_on_use': True, 'needed_on_create': True, 'key': 'maintenance_work_mem', 'expected': 65536, 'error_msg': "It is required to be at least '{expected}'", 'useQueryForValue': True}, {'ok': <function <lambda> at 0x7f1fdf2e0230>, 'check_on_use': True, 'needed_on_create': True, 'key': 'work_mem', 'expected': 8192, 'error_msg': "It is required to be at least '{expected}'", 'useQueryForValue': True})' >2019-02-26 17:06:55,150+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresLCMessages=str:''en_US.UTF-8'' >2019-02-26 17:06:55,151+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresListenAddress=str:''*'' >2019-02-26 17:06:55,151+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresMaxConn=int:'150' >2019-02-26 17:06:55,151+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresPgHba=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf' >2019-02-26 17:06:55,151+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresPgVersion=str:'/var/opt/rh/rh-postgresql10/lib/pgsql/data/PG_VERSION' >2019-02-26 17:06:55,151+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresProvisioningEnabled=NoneType:'None' >2019-02-26 17:06:55,151+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresService=str:'rh-postgresql10-postgresql' >2019-02-26 17:06:55,151+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresUpgradeCleanold=bool:'False' >2019-02-26 17:06:55,151+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresUpgradeInplace=bool:'False' >2019-02-26 17:06:55,151+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_PROVISIONING/postgresWorkMemKb=int:'8192' >2019-02-26 17:06:55,151+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/aaaJdbcPackage=str:'ovirt-engine-extension-aaa-jdbc' >2019-02-26 17:06:55,151+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/additionalPackages=str:'ovirt-host-deploy,ovirt-iso-uploader,ovirt-engine-ui-extensions,ovirt-web-ui' >2019-02-26 17:06:55,152+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/enginePackages=str:'ovirt-engine' >2019-02-26 17:06:55,152+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/engineSetupPackages=str:'ovirt-engine-setup' >2019-02-26 17:06:55,152+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/jbossPackages=str:'ovirt-engine-wildfly,ovirt-engine-wildfly-overlay' >2019-02-26 17:06:55,152+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesSetup=list:'['ovirt-engine-setup', 'ovirt-engine-setup-plugin-websocket-proxy', 'ovirt-engine-dwh-setup']' >2019-02-26 17:06:55,152+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_RPMDISTRO/packagesUpgradeList=list:'[{'packages': ['ovirt-engine-extension-aaa-jdbc']}, {'packages': ['ovirt-engine-wildfly', 'ovirt-engine-wildfly-overlay']}, {'packages': ['ovirt-engine', 'ovirt-host-deploy', 'ovirt-iso-uploader', 'ovirt-engine-ui-extensions', 'ovirt-web-ui']}, {'packages': ['ovirt-engine-websocket-proxy']}, {'packages': ['ovirt-engine-dwh']}]' >2019-02-26 17:06:55,152+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/groupEngine=str:'ovirt' >2019-02-26 17:06:55,152+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/groupKvm=str:'kvm' >2019-02-26 17:06:55,152+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/groupVmConsole=str:'ovirt-vmconsole' >2019-02-26 17:06:55,152+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/hostileServices=str:'ovirt-engine-dwhd,ovirt-engine-notifier' >2019-02-26 17:06:55,152+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckEnabled=bool:'False' >2019-02-26 17:06:55,152+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckMinimumMB=int:'4096' >2019-02-26 17:06:55,153+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckRecommendedMB=int:'16384' >2019-02-26 17:06:55,153+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/memCheckThreshold=int:'90' >2019-02-26 17:06:55,153+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/nfsConfigEnabled=bool:'False' >2019-02-26 17:06:55,153+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/nfsConfigEnabled_legacyInPostInstall=bool:'False' >2019-02-26 17:06:55,153+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/nfsServiceName=str:'nfs-server' >2019-02-26 17:06:55,153+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/selinuxBooleans=list:'[{'state': 'on', 'boolean': 'httpd_can_network_connect'}]' >2019-02-26 17:06:55,153+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/selinuxContexts=list:'[]' >2019-02-26 17:06:55,153+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/selinuxRestorePaths=list:'[]' >2019-02-26 17:06:55,153+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/shmmax=int:'68719476736' >2019-02-26 17:06:55,153+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userApache=str:'apache' >2019-02-26 17:06:55,153+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userEngine=str:'ovirt' >2019-02-26 17:06:55,154+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userPostgres=str:'postgres' >2019-02-26 17:06:55,154+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userRoot=str:'root' >2019-02-26 17:06:55,154+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userVdsm=str:'vdsm' >2019-02-26 17:06:55,154+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_SYSTEM/userVmConsole=str:'ovirt-vmconsole' >2019-02-26 17:06:55,154+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyConfig=bool:'True' >2019-02-26 17:06:55,154+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyPort=int:'2222' >2019-02-26 17:06:55,154+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_WSP_RPMDISTRO_PACKAGES=str:'ovirt-engine-websocket-proxy' >2019-02-26 17:06:55,154+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV OVESETUP_WSP_RPMDISTRO_PACKAGES_SETUP=str:'ovirt-engine-setup-plugin-websocket-proxy' >2019-02-26 17:06:55,154+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfDisabledPlugins=list:'[]' >2019-02-26 17:06:55,154+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfExpireCache=bool:'True' >2019-02-26 17:06:55,155+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfRollback=bool:'True' >2019-02-26 17:06:55,155+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/dnfpackagerEnabled=bool:'True' >2019-02-26 17:06:55,155+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/keepAliveInterval=int:'30' >2019-02-26 17:06:55,155+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumDisabledPlugins=list:'[]' >2019-02-26 17:06:55,155+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumEnabledPlugins=list:'[]' >2019-02-26 17:06:55,155+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumExpireCache=bool:'True' >2019-02-26 17:06:55,155+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumRollback=bool:'True' >2019-02-26 17:06:55,155+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV PACKAGER/yumpackagerEnabled=bool:'True' >2019-02-26 17:06:55,155+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV QUESTION/1/OVESETUP_CORE_ENGINE_STOP=str:'ok' >2019-02-26 17:06:55,155+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV QUESTION/1/OVESETUP_DIALOG_CONFIRM_SETTINGS=str:'ok' >2019-02-26 17:06:55,155+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV QUESTION/1/OVESETUP_DWH_PERFORM_BACKUP=str:'yes' >2019-02-26 17:06:55,156+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/clockMaxGap=int:'5' >2019-02-26 17:06:55,156+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/clockSet=bool:'False' >2019-02-26 17:06:55,156+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/commandPath=str:'/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin' >2019-02-26 17:06:55,156+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/reboot=bool:'False' >2019-02-26 17:06:55,156+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/rebootAllow=bool:'True' >2019-02-26 17:06:55,156+0100 DEBUG otopi.context context.dumpEnvironment:738 ENV SYSTEM/rebootDeferTime=int:'10' >2019-02-26 17:06:55,156+0100 DEBUG otopi.context context.dumpEnvironment:742 ENVIRONMENT DUMP - END >2019-02-26 17:06:55,158+0100 DEBUG otopi.context context._executeMethod:127 Stage pre-terminate METHOD otopi.plugins.otopi.dialog.cli.Plugin._pre_terminate >2019-02-26 17:06:55,159+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,160+0100 INFO otopi.context context.runSequence:610 Stage: Termination >2019-02-26 17:06:55,160+0100 DEBUG otopi.context context.runSequence:614 STAGE terminate >2019-02-26 17:06:55,186+0100 DEBUG otopi.context context._executeMethod:127 Stage terminate METHOD otopi.plugins.ovirt_engine_common.base.core.misc.Plugin._terminate >2019-02-26 17:06:55,186+0100 INFO otopi.plugins.ovirt_engine_common.base.core.misc misc._terminate:170 Execution of setup completed successfully >2019-02-26 17:06:55,189+0100 DEBUG otopi.context context._executeMethod:127 Stage terminate METHOD otopi.plugins.otopi.dialog.human.Plugin._terminate >2019-02-26 17:06:55,197+0100 DEBUG otopi.context context._executeMethod:127 Stage terminate METHOD otopi.plugins.otopi.dialog.machine.Plugin._terminate >2019-02-26 17:06:55,204+0100 DEBUG otopi.context context._executeMethod:134 condition False >2019-02-26 17:06:55,207+0100 DEBUG otopi.context context._executeMethod:127 Stage terminate METHOD otopi.plugins.otopi.core.log.Plugin._terminate
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1680970
:
1538903
|
1538904
| 1538905