HI
I get some errs when I upgread harbor from 1.8.3 to 1.9.0 :
prepare base dir is set to /home/work/app/harbortest/harbor
Clearing the configuration file: /config/log/rsyslog_docker.conf
Clearing the configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Traceback (most recent call last):
File "main.py", line 64, in
main()
File "/usr/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(args, *kwargs)
File "/usr/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, *ctx.params)
File "/usr/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(args, **kwargs)
File "main.py", line 36, in main
prepare_nginx(config_dict)
File "/usr/src/app/utils/nginx.py", line 23, in prepare_nginx
render_nginx_template(config_dict)
File "/usr/src/app/utils/nginx.py", line 56, in render_nginx_template
prepare_nginx_certs(config_dict['cert_key_path'], config_dict['cert_path'])
File "/usr/src/app/utils/nginx.py", line 42, in prepare_nginx_certs
shutil.copy2(host_ngx_cert_key_path, real_key_path)
File "/usr/lib/python3.6/shutil.py", line 257, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.6/shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/hostfs/data/cert/x.pf.abc.com.key'
Is there something be missed in the upgread process & documentation
Thank you
Where did you put this file
x.pf.abc.com.key
I put this file : "/data/cert/x.pf.abc.com.key" , And the file ”harbor.yml“ is transformed form version 1.8.3。
is any dir in your path is symbal link?
We had similar issue on RHEL7 and the solution was to modifiy the file prepare line:53 from
-v /:/hostfs:z \
to
-v $cert_dir:/hostfs:z \
Where $cert_dir is the directory that contain the SSL certificates
and for harbor.yml the https certificate path is set to /
certificate: /server.cer
private_key: /server.key
So far it is working for us
@alchatti thanks
@ninjadq yes . The dir "/data/cert/" is a symbal link . I change the harbor.yml from
/data/cert/x.pf.abc.com.crt
to
/home/work/data/cert/x.pf.xiaomi.com.crt
and it working for us.
thanks
Most helpful comment
We had similar issue on RHEL7 and the solution was to modifiy the file
prepareline:53 fromto
Where
$cert_diris the directory that contain the SSL certificatesand for
harbor.ymlthe https certificate path is set to/So far it is working for us