In particular, the log of the db restore, where I can find it? to
understand which state of the db I have now on disk... the old, the new, a
partial restore or what...

at this time the image_transfers table is clearly the old one without the
foreign key:

engine=# \d image_transfers
                        Table "public.image_transfers"
          Column           |           Type           |       Modifiers

---------------------------+--------------------------+------------------------
 command_id                | uuid                     | not null
 command_type              | integer                  | not null
 phase                     | integer                  | not null
 last_updated              | timestamp with time zone | not null
 message                   | character varying        |
 vds_id                    | uuid                     |
 disk_id                   | uuid                     |
 imaged_ticket_id          | uuid                     |
 proxy_uri                 | character varying        |
 signed_ticket             | character varying        |
 bytes_sent                | bigint                   |
 bytes_total               | bigint                   |
 type                      | integer                  | not null default 0
 active                    | boolean                  | not null default
false
 daemon_uri                | character varying        |
 client_inactivity_timeout | integer                  |
Indexes:
    "pk_image_transfers" PRIMARY KEY, btree (command_id)
    "idx_image_transfers_disk_id" btree (disk_id)


and contains

engine=# select * from image_transfers;
              command_id              | command_type | phase |
last_updated        |           m
essage           |                vds_id                |
 disk_id                | imaged
_ticket_id |           proxy_uri            |




              signed_ticket






























                                              | bytes_sent | bytes_total |
type | active | daemon_uri |
 client_inactivity_timeout
--------------------------------------+--------------+-------+----------------------------+------------
-----------------+--------------------------------------+--------------------------------------+-------
-----------+--------------------------------+----------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
----------------------------------------------+------------+-------------+------+--------+------------+
---------------------------
 7b0e8a09-d8e9-48c4-83af-fdd94268f355 |         1024 |     6 | 2017-12-05
23:09:05.307+00 | Pausing due
 to client error | 459f6e56-f813-4c73-9950-994a7de8dbb5 |
713df8c6-8a97-425f-a169-fa2b7104bdc4 |
           | https://localhost:54323/images |
eyJzYWx0IjoidHdLQWdwN0lnREU9IiwiZGF0YSI6IntcbiAgXCJuYmZcI
iA6IDE1MTI1MTQ5NzIsXG4gIFwiZXhwXCIgOiAxNTEyNTE4NTcyLFxuICBcImlhdFwiIDogMTUxMjUxNDk3MixcbiAgXCJ0cmFuc2Zl
ci10aWNrZXRcIiA6IFwiZTVjY2JiOWMtOTNlZS00MDRkLTgwOWItNDMzNzZkYTQ4ZmE3XCIsXG4gIFwiaW1hZ2VkLXVyaVwiIDogXCJ
odHRwczovL292aXJ0MDEubHV0d3luLm9yZzo1NDMyMlwiXG59Iiwic2lnbmF0dXJlIjoibiszZ0pUbmgyd1gxYzUzMWNsRWwza1c1Mk
5vSEhXOGhUZGxZZmN1T3JURlVveHlicVhwaTZTRVhsWERCN2tOOXZBT1dMb1NhT0t5TTRWT1I0VTl1djNLdldHNHlTVUp1YWhha3dFY
3J3UUJkOTFwQVkrVXM1ZGRLRkxlSTB2NkQ2eitBOEJXRkduUkpNdCtxemJUeTd5dm5wTnVXSkxIMXlFOXFRTHFDWEN4UEZTSkNHekpY
aTVveUZHQlNPTVNUdEtYbjVCS0gwejdGanR5akhZd3orMkRVM3Bxa0JESUp0dTZGRFZjeG9Gelp2bjR0amtla3M1WldvNS95NFYwekZ
pcE5Pd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Y29STlRmL1p0cmZ2M0xWTHhQcDJnU1hFXHJcbnZ5MnN1V2t6YUZFd000RW4rTXNuajBhZ3Ixb0RRamNLRW
twSjltc2pSMlJpb0xVVnRud3JpZU1XK2ljbnM0NjlpT3l1eWprY3M4a0lcclxuSkRGSXJ3aWg2MHJxVC9zSWlTSlAvQ2dXMGtYOU5Ra
GlvT2kraXo2WHZYSjRmNjVpZm1jeTNlaEhMcGZ6NVdQVWx1UlB0Vy96Z3pxcFxyXG4tLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tXG4i
LCJzaWduZWRGaWVsZHMiOiJzYWx0LGRhdGEsZGlnZXN0LHZhbGlkRnJvbSx2YWxpZFRvIiwidmFsaWRGcm9tIjoiMjAxNzEyMDUyMzA
yNTIiLCJ2YWxpZFRvIjoiMjAxNzEyMDYwMDAyNTIifQ== |          0 | 21478375424 |
  0 | f      |            |

(1 row)

engine=#

can i simply delete the record and run again "engine-setup" or do
"completely" roll back the db?

Thanks,
Gianluca


On Fri, Aug 3, 2018 at 2:24 PM, Gianluca Cecchi <gianluca.cec...@gmail.com>
wrote:

> As the potential user could upgrade from an older version, though not
> recommended to stay too much below, I simulate this upgrade from 4.2.3.7
> (current engine package version is ovirt-engine-4.2.3.7-1.el7.noarch
> updated on 26/05)  to 4.2.5 and I get this in engine-setup
>
> [ INFO  ] Backing up database localhost:engine to '/var/lib/ovirt-engine/
> backups/engine-20180803141347.gdQfiz.dump'.
> [ INFO  ] Creating/refreshing Engine database schema
> [ ERROR ] schema.sh: FATAL: Cannot execute sql command:
> --file=/usr/share/ovirt-engine/dbscripts/upgrade/04_
> 02_1210_add_foreign_key_to_image_transfers.sql
> [ ERROR ] Failed to execute stage 'Misc configuration': Engine schema
> refresh failed
> [ INFO  ] Yum Performing yum transaction rollback
>
> [ INFO  ] Restoring file '/var/lib/ovirt-engine/
> backups/engine-20180803141347.gdQfiz.dump' to database localhost:engine.
> [ ERROR ] Errors while restoring engine database, please check the log
> file for details
> [ INFO  ] Stage: Clean up
>           Log file is located at /var/log/ovirt-engine/setup/
> ovirt-engine-setup-20180803140934-1thg3k.log
> [ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/
> answers/20180803141603-setup.conf'
> [WARNING] Rollback of DWH database started
>           This might be a long process, but it should be safe to start the
> engine service before it finishes, if needed.
> [ INFO  ] Clearing DWH database ovirt_engine_history
> [ INFO  ] Restoring DWH database ovirt_engine_history
> [ INFO  ] Restoring file '/var/lib/ovirt-engine-dwh/
> backups/dwh-20180803141340.cQoOU2.dump' to database
> localhost:ovirt_engine_history.
> [ INFO  ] Stage: Pre-termination
> [ INFO  ] Stage: Termination
> [ ERROR ] Execution of setup failed
> [root@ovirt ~]#
>
> Until fixed what would be the step to resolve, as also the restore of
> database failed?
> What can I do to restore/clean/upgrade again?
>
> BTW: it is a self hosted engine
>
> Thanks,
> Gianluca
>
> On Fri, Aug 3, 2018 at 2:14 PM, Jan Siml <js...@plusline.net> wrote:
>
>> Hello,
>>
>> There are probably some more stale image transfers records,
>>> can you please check whether 'image_transfers' table is empty?
>>> If not, you can try removing them by executing:
>>> "DELETE FROM image_transfers WHERE command_id NOT IN (SELECT
>>> command_entities.command_id FROM command_entities);"
>>> (you can simply prepend it to '04_02_1210_add_foreign_key_to
>>> _image_transfers.sql')
>>>
>>
>> that's how it worked and the update was successful. Thanks!
>>
>> Regards
>>
>> Jan
>> _______________________________________________
>> Users mailing list -- users@ovirt.org
>> To unsubscribe send an email to users-le...@ovirt.org
>> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>> oVirt Code of Conduct: https://www.ovirt.org/communit
>> y/about/community-guidelines/
>> List Archives: https://lists.ovirt.org/archiv
>> es/list/users@ovirt.org/message/RQS4MHPWU7HWCZH6BIELHVGPB4BMBBGL/
>>
>
>
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/EASADI2B5ZBAPBTSANFGRV34CTBDSYLV/

Reply via email to