Upgrade gaprindashvili to hammer


#1

Hi Folks,
Currently Im running this appliance version manageiq-vsphere-gaprindashvili-7.ova … is there any doc to provide the upgrade to hammer-1 version!?

Regards
Carlos


Dump and Restore Data discovered by manageiq
#2

Hi folks, any tip about it!?

Best regards,

Carlos


#3

is there any doc to provide the upgrade

Not as far as I’m aware.

I’m seeing 2 possible ways:

  • don’t upgrade, only move the database to a newer appliance
    • you’d have to make sure to run the db:migrate rake task after
  • try to upgrade everything via git (so something like vmdb; git pull origin/hammer; bundle update)
    • you’d have to make sure all of bin/update gets run, which involves updating assets, and may need more disk space than available

Again, I’m aware of no docs for this, so, this is just what I’d try to do,
if this doesn’t help, I’m sorry :).


#4

Hi @himdel.

Thank you by your tips.
I tried do the DB Migration process.
After restore database from gaprindashvili to hammer appliance and run db:migrate rake task

I the evm service does not start with some errors (attached)evm.log (58.0 KB)

Do you have any tip about it? I did not found about this. :frowning:

Best regards,

Carlos


#5

Aah @ccesario,
yes, the relevant error is that

[ManageIQ::Password::PasswordError]: can not decrypt v2_key encrypted string

That’s because to use the old database, the new appliance needs to use the same encryption key as the old appliance.

The key should be located in certs/v2_key, so it should be a simple matter of copying the old one to the new appliance.


#6

Hi @himdel,

This it seems fixed

  • stopping evm server
  • replacing the key with the prod one
  • bundle exec ruby tools/fix_auth.rb -v -y
  • bundle exec ruby tools/fix_auth.rb -v -p smartvm -P smartvm -i smartvm
  • bundle exec ruby tools/fix_auth.rb -v -y
  • starting evm

let me check if the service goes up now…

Regards,
Carlos


#7

Hi @himdel,

I got success. It follow the steps:

On the old appliance:

  1. stop the service:
    systemctl stop evmserverd

  2. dump the database
    pg_dump -Fc vmdb_production > production.dump

  3. Copy the dump file to new appliance
    scp production.dump root@ip_of_new_appliance:/root/

On the new appliance:

  1. stop the service:
    systemctl stop evmserverd

  2. drop current database
    dropdb vmdb_production

  3. create new database
    createdb vmdb_production

  4. restore database from dump
    pg_restore -d vmdb_production "/root/production.dump"

  5. change to directory /var/www/miq/vmdb
    bin/rake db:migrate
    bundle exec ruby tools/fix_auth.rb -v -y
    bundle exec ruby tools/fix_auth.rb -v -p smartvm -P smartvm -i smartvm
    bundle exec ruby tools/fix_auth.rb -v -y

  6. start the service:
    systemctl start evmserverd


#8

Looks good to me :slight_smile:

(Except that by using fix_auth you’re not preserving the passwords. If you wanted to, copying the key should work and fix_auth should not be needed (I think.).)