Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error sourced init orgs --token #225

Closed
clbaeza opened this issue Aug 22, 2019 · 9 comments · Fixed by #226 or #227

Comments

@clbaeza
Copy link

commented Aug 22, 2019

Error when I try to use init. I get the same with local repo.
I downloaded sourced-ce_v0.15.0_darwin_amd64.tar on macOS Mojave 10.14.6 with docker desktop 2.1.0.1
error

@smacker

This comment has been minimized.

Copy link
Member

commented Aug 23, 2019

Hi @clbaeza !
Could you please share the output of this commands?

Docker-compose version:

docker-compose -v

.env file:

cat ~/.sourced/workdirs/__active__/.env
@clbaeza

This comment has been minimized.

Copy link
Author

commented Aug 23, 2019

Hi, here are the information you required. thanks!

docker-compose -v

docker-compose version 1.24.1, build 4667896b

cat ~/.sourced/workdirs/active/.env

COMPOSE_PROJECT_NAME=srcd-b3BlbmRpY29t
GITBASE_VOLUME_TYPE=volume
GITBASE_VOLUME_SOURCE=gitbase_repositories
GITBASE_SIVA=true
GITHUB_ORGANIZATIONS=opendicom
GITHUB_TOKEN=
NO_FORKS=true
GITBASE_LIMIT_CPU=
GITCOLLECTOR_LIMIT_CPU=-0.1
GITBASE_LIMIT_MEM=

smacker added a commit to smacker/sourced-ce that referenced this issue Aug 23, 2019
Fix incorrect value for GITCOLLECTOR_LIMIT_CPU
Fix: src-d#225

Signed-off-by: Maxim Sukharev <max@smacker.ru>
smacker added a commit to smacker/sourced-ce that referenced this issue Aug 23, 2019
Fix incorrect value for GITCOLLECTOR_LIMIT_CPU
Fix: src-d#225

Signed-off-by: Maxim Sukharev <max@smacker.ru>
@smacker smacker referenced this issue Aug 23, 2019
1 of 2 tasks complete
@smacker

This comment has been minimized.

Copy link
Member

commented Aug 23, 2019

@clbaeza thank you. #226 should fix the problem. But could you please show output of this command:

docker info --format "{{.NCPU}}"

While there is no new release with the fix, as a temporary workaround you can edit ~/.sourced/workdirs/__active__/.env by changing

-GITCOLLECTOR_LIMIT_CPU=-0.1
+GITCOLLECTOR_LIMIT_CPU=

And then

cd ~/.sourced/workdirs/__active__
docker-compose --compatibility up

UI will be available after 30-60 seconds at

  http://127.0.0.1:8088
  user:admin
  pass:admin

P.S. I changed your comment to remove token.

@clbaeza

This comment has been minimized.

Copy link
Author

commented Aug 23, 2019

Oh thanks, I didn't see the token!

docker info --format "{{.NCPU}}"

2

I changed what you indicate, but I get the same error.

docker-compose --compatibility up
Traceback (most recent call last):
  File "docker-compose", line 6, in <module>
  File "compose/cli/main.py", line 71, in main
  File "compose/cli/main.py", line 124, in perform_command
  File "compose/cli/command.py", line 42, in project_from_options
  File "compose/cli/command.py", line 115, in get_project
  File "compose/config/config.py", line 404, in load
  File "compose/config/config.py", line 504, in load_services
  File "compose/config/config.py", line 483, in build_services
  File "compose/config/config.py", line 483, in <listcomp>
  File "compose/config/config.py", line 475, in build_service
  File "compose/config/config.py", line 900, in finalize_service
  File "compose/config/config.py", line 983, in translate_deploy_keys_to_container_config
  File "compose/config/config.py", line 916, in translate_resource_keys_to_container_config
ValueError: could not convert string to float: 
[1175] Failed to execute script docker-compose
@smacker

This comment has been minimized.

Copy link
Member

commented Aug 23, 2019

That is interesting. The only incorrect value in your config is GITCOLLECTOR_LIMIT_CPU.

Could you validate that docker-compose works on your machine? Because the error doesn't contain any information about incorrect configuration except some internal traceback.

mkdir lets_test
cd  lets_test
touch docker-compose.yml

put

version: '3'
services:
  redis:
    image: "redis:alpine"

into newly created docker-compose.yml and run docker-compose up from the same directory. Does it work?

@clbaeza

This comment has been minimized.

Copy link
Author

commented Aug 23, 2019

Works without a problems.

test_redis

@smacker

This comment has been minimized.

Copy link
Member

commented Aug 23, 2019

Thank you for helping with debugging.

Please execute:

sourced compose download https://gist.githubusercontent.com/smacker/6e4dc3fe5c666d4ad8604334c2664ecb/raw/0bf245ec499cacf8262f7500981020897960aa7c/docker-compose-no-limits.yml

After that sourced should work for you normally. (no need to change .env file or run docker-compose manually)

@clbaeza

This comment has been minimized.

Copy link
Author

commented Aug 26, 2019

Now it's works, thanks for all!!!

smacker added a commit to smacker/sourced-ce that referenced this issue Aug 27, 2019
Fix incompatibility of empty resourse limits
Fix: src-d#225

We changed syntax of defaults values in `docker-compose.yml` from
`${VAR:-default}` to `${VAR-default}`. We can't pass empty strings for
float numbers with such syntax anymore.

Signed-off-by: Maxim Sukharev <max@smacker.ru>
@smacker smacker referenced this issue Aug 27, 2019
1 of 2 tasks complete

@smacker smacker closed this in #227 Aug 27, 2019

@carlosms

This comment has been minimized.

Copy link
Contributor

commented Aug 27, 2019

This should be now properly fixed in the v0.15.1 release.
Thanks for reporting this @clbaeza.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.