ibpsa / project1-boptest

Building Optimization Performance Tests
Other
109 stars 70 forks source link

docker-compose - needs APP_PATH defined #402

Closed epaulson closed 2 years ago

epaulson commented 2 years ago

I'm giving the docker-compose version a try, and doing a TESTCASE=testcase1 docker-compose up gives me

ERROR: for project1-boptest_boptest_1  Cannot create container for service boptest: invalid volume specification: '/home/erik/development/boptest/project1-boptest/kpis:'/home/developer'/kpis:rw': invalid mount config for type "bind": invalid mount path: ''/home/developer'/kpis' mount path must be absolute

ERROR: for boptest  Cannot create container for service boptest: invalid volume specification: '/home/erik/development/boptest/project1-boptest/kpis:'/home/developer'/kpis:rw': invalid mount config for type "bind": invalid mount path: ''/home/developer'/kpis' mount path must be absolute
ERROR: Encountered errors while bringing up the project.

It looks like it needs APP_PATH defined, which used to come from the Makefile. I just reran withTESTCASE=testcase1 APP_PATH=/home/developer docker-compose up and it seems to work.

In digging into a bit, I see the .env file, and I've got docker-compose 1.25, which should support it, but it's not getting picked up. I'll keep an eye on my docker-compose and see if I've got something weird here.

dhblum commented 2 years ago

Thanks @epaulson for reporting. The specified command (with APP_PATH just defined in .env) works when I run it from boptest repo root and on Ubuntu 18.04, with docker-compose version 1.26.0. Note our unit testing framework also uses that command and things passed ok, also on Ubuntu 18.04, not exactly sure what version of docker-compose travis uses though. What OS are you trying on?

epaulson commented 2 years ago
(base) erik@erik-u20b:~/development/bacpypes/bacpypes/samples$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
(base) erik@erik-u20b:~/development/bacpypes/bacpypes/samples$ dpkg -s docker-compose
Package: docker-compose
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 651
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Version: 1.25.0-1
Depends: python3-cached-property (>= 1.2.0), python3-docker (>= 4.0.0), python3-dockerpty (>= 0.4.1), python3-docopt (>= 0.6.1), python3-jsonschema, python3-requests (>= 2.20.0), python3-six (<< 2), python3-six (>= 1.3.0), python3-texttable (>= 0.9.0), python3-websocket (>= 0.32.0), python3-yaml (>= 3.10), python3:any (>= 3.6~), python3-distutils
Recommends: docker.io (>= 1.9.0)
Description: Punctual, lightweight development environments using Docker
 docker-compose is a service management software built on top of docker. Define
 your services and their relationships in a simple YAML file, and let compose
 handle the rest.
Original-Maintainer: Docker Compose Team <team+docker-compose@tracker.debian.org>
Homepage: https://docs.docker.com/compose/
(base) erik@erik-u20b:~/development/bacpypes/bacpypes/samples$ apt-cache showpkg docker-compose
Package: docker-compose
Versions: 
1.25.0-1 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_focal_universe_binary-amd64_Packages) (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_focal_universe_binary-i386_Packages) (/var/lib/dpkg/status)
 Description Language: 
                 File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_focal_universe_binary-amd64_Packages
                  MD5: 14723d053f7883eda41b6bfcc0b9046a
 Description Language: en
                 File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_focal_universe_i18n_Translation-en
                  MD5: 14723d053f7883eda41b6bfcc0b9046a

Reverse Depends: 
Dependencies: 
1.25.0-1 - python3-cached-property (2 1.2.0) python3-docker (2 4.0.0) python3-dockerpty (2 0.4.1) python3-docopt (2 0.6.1) python3-jsonschema (0 (null)) python3-requests (2 2.20.0) python3-six (3 2) python3-six (2 1.3.0) python3-texttable (2 0.9.0) python3-websocket (2 0.32.0) python3-yaml (2 3.10) python3:any (2 3.6~) python3-distutils (0 (null)) docker.io (2 1.9.0) 
Provides: 
1.25.0-1 - 
Reverse Provides: 
dhblum commented 2 years ago

Hmm, I ran the unit tests on travis with Ubuntu 20 and it still worked ok: https://github.com/ibpsa/project1-boptest/commit/455b1046803133e6dfe208888ce4de533f789ef0.

dhblum commented 2 years ago

@epaulson I tried downgrading to docker compose 1.25.0 and indeed got the same error as you on travis tests: https://github.com/ibpsa/project1-boptest/commit/2565a96b1b630d1c701a9e87628840244626f462. Can you try updating to at least version 1.26.0?

dhblum commented 2 years ago

@epaulson I'm going to close this as stale. Let me know if you think it should be reopened.