Killbill upgrade error

62 views
Skip to first unread message

Egor G

unread,
Feb 13, 2023, 12:02:51 AM2/13/23
to Kill Bill users mailing-list
I am trying to update the version of Kill Bill from 0.22.27 to 0.24.0. I am using a postgres database docker image. I am following the instructions https://docs.killbill.io/latest/database_migrations.html#_migrations_with_docker_images and getting an error when run the $MIGRATIONS_CMD command.
What am I doing wrong?

I also tried to manually make migrations but when I run the 'kpm migrations killbill killbill-0.22.27 killbill-0.24.0' command, I get migrations only under MySQL. Where can I get postgres migrations?


tomcat@e0652c42da8c:~$ $MIGRATIONS_CMD
ansible-playbook 2.9.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/var/lib/tomcat/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0]
Using /etc/ansible/ansible.cfg as config file

PLAYBOOK: migrations.yml *************************************************************************************************
1 plays in /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/migrations.yml

PLAY [Database migrations] ***********************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************
task path: /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/migrations.yml:2
ok: [localhost]
META: ran handlers

TASK [common : ansible_ruby_interpreter setup] ***************************************************************************
task path: /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/roles/common/tasks/main.yml:2
ok: [localhost] => {"ansible_facts": {"ansible_ruby_interpreter": "/opt/kpm-latest/lib/ruby/bin/ruby"}, "changed": false}

TASK [kpm : ensure KPM install dir exists] *******************************************************************************
task path: /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/roles/kpm/tasks/main.yml:2
ok: [localhost] => {"changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/opt", "size": 4096, "state": "directory", "uid": 0}

TASK [kpm : download kpm release metadata] *******************************************************************************
task path: /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/roles/kpm/tasks/main.yml:10
ok: [localhost] => {"accept_ranges": "bytes", "age": "512575", "changed": false, "connection": "close", "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<metadata>\n  <groupId>org.kill-bill.billing.installer</groupId>\n  <artifactId>kpm</artifactId>\n  <versioning>\n    <latest>0.11.1</latest>\n    <release>0.11.1</release>\n    <versions>\n      <version>0.5.2</version>\n      <version>0.5.3</version>\n      <version>0.6.0</version>\n      <version>0.6.1</version>\n      <version>0.6.2</version>\n      <version>0.6.3</version>\n      <version>0.6.4</version>\n      <version>0.6.5</version>\n      <version>0.7.1</version>\n      <version>0.7.2</version>\n      <version>0.8.0</version>\n      <version>0.8.1</version>\n      <version>0.9.0</version>\n      <version>0.10.0</version>\n      <version>0.10.1</version>\n      <version>0.10.2</version>\n      <version>0.10.3</version>\n      <version>0.10.4</version>\n      <version>0.10.5</version>\n      <version>0.10.6</version>\n      <version>0.11.0</version>\n      <version>0.11.1</version>\n    </versions>\n    <lastUpdated>20230103133707</lastUpdated>\n  </versioning>\n</metadata>\n", "content_length": "1003", "content_type": "text/xml", "cookies": {}, "cookies_string": "", "date": "Mon, 13 Feb 2023 04:55:32 GMT", "elapsed": 1, "etag": "\"d0e359ea15d21ef7386b4f255c31811f\"", "last_modified": "Tue, 03 Jan 2023 13:37:07 GMT", "msg": "OK (1003 bytes)", "redirected": true, "status": 200, "url": "https://repo1.maven.org/maven2/org/kill-bill/billing/installer/kpm/maven-metadata.xml", "via": "1.1 varnish, 1.1 varnish", "x_cache": "HIT, HIT", "x_cache_hits": "34, 1", "x_checksum_md5": "d0e359ea15d21ef7386b4f255c31811f", "x_checksum_sha1": "3c05baba6d92522feacd3da86a05ec90f1b3d37e", "x_served_by": "cache-iad-kjyo7100044-IAD, cache-bma1667-BMA", "x_timer": "S1676264132.248180,VS0,VE1"}

TASK [kpm : set kpm_version] *********************************************************************************************
task path: /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/roles/kpm/tasks/main.yml:19
ok: [localhost] => {"ansible_facts": {"kpm_version": "0.11.1"}, "changed": false}

TASK [kpm : check if KPM is already installed] ***************************************************************************
task path: /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/roles/kpm/tasks/main.yml:25
ok: [localhost] => {"changed": false, "stat": {"exists": false}}

TASK [kpm : install KPM] *************************************************************************************************
task path: /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/roles/kpm/tasks/main.yml:31
changed: [localhost] => {"changed": true, "dest": "/opt", "extract_results": {"cmd": ["/usr/bin/tar", "--extract", "-C", "/opt", "-z", "--owner=root", "--group=root", "-f", "/var/lib/tomcat/.ansible/tmp/ansible-tmp-1676264132.5414052-180510029802191/kpm-0.11.1-linux-x86_64.tarajjce8uo.gz"], "err": "", "out": "", "rc": 0}, "gid": 0, "group": "root", "handler": "TgzArchive", "mode": "0755", "owner": "root", "size": 4096, "src": "/var/lib/tomcat/.ansible/tmp/ansible-tmp-1676264132.5414052-180510029802191/kpm-0.11.1-linux-x86_64.tarajjce8uo.gz", "state": "directory", "uid": 0}

TASK [kpm : symlink install directory] ***********************************************************************************
task path: /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/roles/kpm/tasks/main.yml:42
changed: [localhost] => {"changed": true, "dest": "/opt/kpm-latest", "gid": 0, "group": "root", "mode": "0777", "owner": "root", "size": 28, "src": "/opt/kpm-0.11.1-linux-x86_64", "state": "link", "uid": 0}

TASK [kpm : initialize KPM] **********************************************************************************************
task path: /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/roles/kpm/tasks/main.yml:48
changed: [localhost] => {"changed": true, "cmd": ["/opt/kpm-latest/kpm", "version"], "delta": "0:00:00.223176", "end": "2023-02-13 04:55:36.564463", "rc": 0, "start": "2023-02-13 04:55:36.341287", "stderr": "", "stderr_lines": [], "stdout": "KPM version 0.11.1", "stdout_lines": ["KPM version 0.11.1"]}

TASK [kpm : set correct permissions] *************************************************************************************
task path: /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/roles/kpm/tasks/main.yml:57
ok: [localhost] => {"changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/opt/kpm-0.11.1-linux-x86_64", "size": 4096, "state": "directory", "uid": 0}

TASK [migrations : fetch all migrations] *********************************************************************************
task path: /var/lib/tomcat/.ansible/roles/killbill-cloud/ansible/roles/migrations/tasks/main.yml:2
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "/opt/kpm-0.11.1-linux-x86_64/lib/ruby/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- kpm (LoadError)\n\tfrom /opt/kpm-0.11.1-linux-x86_64/lib/ruby/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n\tfrom /var/lib/tomcat/.ansible/tmp/ansible-tmp-1676264136.9163742-123713729028780/AnsiballZ_killbill_migrations:19:in `<main>'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP ***************************************************************************************************************
localhost                  : ok=10   changed=3    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0 

karan bansal

unread,
Feb 15, 2023, 11:53:12 AM2/15/23
to Kill Bill users mailing-list
Hi Egor,

I am able to recreate the error with the migration at my end as well, though the manual command seems to be working ok. 

Regards
Karan

Egor G

unread,
Feb 15, 2023, 11:59:24 PM2/15/23
to Kill Bill users mailing-list
Thanks for your answer!
What is a manual command?

среда, 15 февраля 2023 г. в 21:53:12 UTC+5, karan bansal:

karan bansal

unread,
Feb 22, 2023, 11:40:21 AM2/22/23
to Kill Bill users mailing-list
Hi Egor,

I am referring to this one :  kpm migrations killbill killbill-0.22.27 killbill-0.24.0

Regards
Karan

Egor G

unread,
Feb 23, 2023, 11:37:06 PM2/23/23
to Kill Bill users mailing-list
Thanks for your time

среда, 22 февраля 2023 г. в 21:40:21 UTC+5, karan bansal:
Reply all
Reply to author
Forward
0 new messages