Alon Bar-Lev has posted comments on this change.

Change subject: core: Remove Windows ProductKey* from db
......................................................................


Patch Set 4:

> this is part of the upgrade. Or what do you mean?

dbscripts are designed for database atomic update.

when you have integration between filesystem configuration and database, the 
appropriate location is to do that logic within the engine-upgrade scripts.

I suggest remove these values from database in 3.4 and not now, so we can read 
them post upgrade.

LOGIC

if "@ENGINE_ETC@/osinfo.conf.d/10-productkeys.properties" does not exist, 
create it using a logic similar to what in your script.

LOCATION

packaging/setup/plugins/ovirt-engine-setup/config/productkeys.py

CODE

Something like (relevant code)


    @plugin.event(
        stage=plugin.Stages.STAGE_MISC,
        after=(
            osetupcons.Stages.DB_CONNECTION_AVAILABLE,
        ),
    )
    def _misc(self):
        if not os.path.exists(osetupcons.FileLocation.XXXX):
            x = self.environment[osetupcons.DBEnv.STATEMENT].getVdcOption('y')
            do whatever... to prepare the file content within python array, 
each line is an element
            then write array to XXX file using FileTransaction, see example at:
            packaging/setup/plugins/ovirt-engine-setup/config/jboss.py

-- 
To view, visit http://gerrit.ovirt.org/19743
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I876894e7ba5fcd28ee0d435b4a2561f662140174
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to