Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

Commit

Permalink
Ensure value of tm_compute_nodes has integer type
Browse files Browse the repository at this point in the history
  • Loading branch information
HACKERMD committed Jul 3, 2017
1 parent e2767f8 commit 99114a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tmdeploy/share/playbooks/tissuemaps/postconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
vars:
db_host_master: "{{ hostvars[groups['tissuemaps_db_master'][0]].ansible_host }}"
db_hosts_workers: "{{ groups['tissuemaps_db_worker']|map('extract', hostvars, ['ansible_host'])|list }}"
db_nodes: "{{ groups['tissuemaps_db_worker']|length }}"
db_nodes: "{{ groups['tissuemaps_db_worker']|length|int }}"
roles:
- database-client

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ frontend={{ ansible_hostname }}
transport=local
auth=noauth
architecture=x86_64
max_cores={{ tm_compute_cores * tm_compute_nodes }}
max_cores={{ tm_compute_cores|int * tm_compute_nodes|int }}
max_cores_per_job={{ tm_compute_cores }}
max_memory_per_core={{ (tm_compute_memory / tm_compute_cores)|round(0, 'floor')|int }} MB
max_memory_per_core={{ (tm_compute_memory|int / tm_compute_cores|int)|round(0, 'floor')|int }} MB
max_walltime=10 days

2 changes: 1 addition & 1 deletion tmdeploy/share/playbooks/tissuemaps/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
vars:
app_host: unix # 127.0.0.1
app_port: /var/run/uwsgi/tissuemaps.sock # 5002
tm_compute_nodes: "{{ groups['tissuemaps_compute']|length if 'tissuemaps_compute' in groups else 1 }}"
tm_compute_nodes: "{{ groups['tissuemaps_compute']|length|int if 'tissuemaps_compute' in groups else 1 }}"
roles:
- web-server
- app-server
Expand Down

0 comments on commit 99114a1

Please sign in to comment.