[root@harbor data]# docker run -it --rm -v /mnt/harbor/harbor.yml:/harbor-migration/harbor-cfg/harbor.cfg -v /data/harbor/harbor.yml:/harbor-migration/harbor-cfg-out/harbor.yml goharbor/harbor-migrator:v1.9.0 --cfg up
Please backup before upgrade,
Enter y to continue updating or n to abort: y
The path of the migrated harbor.cfg is not set, the input file will be overwritten.
Command for config file migration: python ./cfg/run.py --input /harbor-migration/harbor-cfg/harbor.cfg
input version: 1.8.0, migrator chain: ['1.9.0']
migrating to version 1.9.0
Traceback (most recent call last):
File "./cfg/run.py", line 70, in
main()
File "./cfg/run.py", line 46, in main
m.migrate(curr_input_path, curr_output_path)
File "/harbor-migration/cfg/migrator_1_9_0/__init__.py", line 21, in migrate
f.write(tpl.render(**config_dict))
File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/harbor-migration/cfg/migrator_1_9_0/harbor.yml.jinja", line 122, in top-level template code
absolute_url: {{ chart.absolute_url if chart.absolute_url == 'enabled' else 'disabled' }}
File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 430, in getattr
return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'chart' is undefined
I have the same error
Same here when upgrading from 1.7.5
same here where upgrading from 1.7.4
same when upgrading from 1.7.0
same here where upgrading from 1.7.4
same here where upgrading from 1.7.5
might be issue with instruction
Hello guies you can use this following image for migration.
https://hub.docker.com/r/thatsk/harbor-migrator
Same issue when upgrading from 1.8.0 without chartmuseum
same when upgrading from 1.7.1
I get past this migrating from 1.8.0 to 1.9.1 by adding this to my original harbor.yml then running the migrator:
chart:
absolute_url: disabled
Seems the chart variable is now being treated as "required"?
I get past this migrating from 1.8.0 to 1.9.1 by adding this to my original harbor.yml then running the migrator:
chart: absolute_url: disabledSeems the chart variable is now being treated as "required"?
I upgrade from 1.8.3 to 1.9.1 and it also works for me.
Thanks!
When we can expect official fix for this issue?
Hi, I have got the same error. The fix proposed by @ryourst works for me. Thank you.
Closing as the PR has been merged to master and release-1.9.0 branch
Most helpful comment
Hello guies you can use this following image for migration.
https://hub.docker.com/r/thatsk/harbor-migrator