ros-infrastructure / buildfarm_deployment

Apache License 2.0
30 stars 39 forks source link

repo deployment: init_building_repo: "ImportError: No module named configparser" #174

Closed gavanderhoorn closed 6 years ago

gavanderhoorn commented 6 years ago

Deploying the repo host runs into the following:

/Stage[main]/Profile::Ros::Repo/Exec[init_building_repo]/returns (notice): Traceback (most recent call last):
/Stage[main]/Profile::Ros::Repo/Exec[init_building_repo]/returns (notice):   File "/home/jenkins-agent/reprepro-updater/scripts/setup_repo.py", line 8, in <module>
/Stage[main]/Profile::Ros::Repo/Exec[init_building_repo]/returns (notice):     from reprepro_updater import conf
/Stage[main]/Profile::Ros::Repo/Exec[init_building_repo]/returns (notice):   File "/home/jenkins-agent/reprepro-updater/src/reprepro_updater/conf.py", line 33, in <module>
/Stage[main]/Profile::Ros::Repo/Exec[init_building_repo]/returns (notice):     from configparser import SafeConfigParser
/Stage[main]/Profile::Ros::Repo/Exec[init_building_repo]/returns (notice): ImportError: No module named configparser
Puppet (err): /home/jenkins-agent/reprepro-updater/scripts/setup_repo.py ubuntu_building -c returned 1 instead of one of [0]
/Stage[main]/Profile::Ros::Repo/Exec[init_building_repo]/returns (err): change from notrun to 0 failed: /home/jenkins-agent/reprepro-updater/scripts/setup_repo.py ubuntu_building -c returned 1 instead of one of [0]

Starting python after the failed run and trying import configparser succeeds (in both Python 2 and 3), so not sure what is going on here.

buildfarm_deployment at 3da95258c079452de52083cc071167ec90bdb15f on a fresh Ubuntu Server 16.04 amd64 VM.

gavanderhoorn commented 6 years ago

And the same for init_main_repo:

/Stage[main]/Profile::Ros::Repo/Exec[init_main_repo]/returns (notice): Traceback (most recent call last):
/Stage[main]/Profile::Ros::Repo/Exec[init_main_repo]/returns (notice):   File "/home/jenkins-agent/reprepro-updater/scripts/setup_repo.py", line 8, in <module>
/Stage[main]/Profile::Ros::Repo/Exec[init_main_repo]/returns (notice):     from reprepro_updater import conf
/Stage[main]/Profile::Ros::Repo/Exec[init_main_repo]/returns (notice):   File "/home/jenkins-agent/reprepro-updater/src/reprepro_updater/conf.py", line 33, in <module>
/Stage[main]/Profile::Ros::Repo/Exec[init_main_repo]/returns (notice):     from configparser import SafeConfigParser
/Stage[main]/Profile::Ros::Repo/Exec[init_main_repo]/returns (notice): ImportError: No module named configparser
Puppet (err): /home/jenkins-agent/reprepro-updater/scripts/setup_repo.py ubuntu_main -c returned 1 instead of one of [0]
/Stage[main]/Profile::Ros::Repo/Exec[init_main_repo]/returns (err): change from notrun to 0 failed: /home/jenkins-agent/reprepro-updater/scripts/setup_repo.py ubuntu_main -c returned 1 instead of one of [0]
gavanderhoorn commented 6 years ago

And init_testing_repo fails with:

/Stage[main]/Profile::Ros::Repo/Exec[init_testing_repo]/returns (notice): OSError: [Errno 13] Permission denied: '/var/repos'

Not sure whether that is caused by the two earlier failures.

nuclearsandwich commented 6 years ago

I was able to reproduce this today when provisioning a fresh repo host in AWS.

nuclearsandwich commented 6 years ago

Fixed by #178