Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stephane VAROQUI
slapos
Commits
2dfd4830
Commit
2dfd4830
authored
Mar 28, 2013
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BonjourGrid: Resolv hostname bug when deploy condor project
parent
fe47fae3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
11 deletions
+7
-11
slapos/recipe/bonjourgrid/__init__.py
slapos/recipe/bonjourgrid/__init__.py
+4
-8
slapos/recipe/bonjourgrid/template/machineinfo.sh.in
slapos/recipe/bonjourgrid/template/machineinfo.sh.in
+3
-3
software/bonjourgrid/bonjourgrid.src/bonjourgrid.tar.gz
software/bonjourgrid/bonjourgrid.src/bonjourgrid.tar.gz
+0
-0
No files found.
slapos/recipe/bonjourgrid/__init__.py
View file @
2dfd4830
...
@@ -50,12 +50,9 @@ class Recipe(GenericBaseRecipe):
...
@@ -50,12 +50,9 @@ class Recipe(GenericBaseRecipe):
type
=
self
.
options
[
'type'
].
strip
()
type
=
self
.
options
[
'type'
].
strip
()
if
type
==
"condor"
:
if
type
==
"condor"
:
startCondor
=
True
startCondor
=
True
hostname
=
self
.
options
[
'condor_host'
].
strip
()
project
=
self
.
options
[
'condor_host'
].
strip
()
url
=
"http://%s"
%
hostname
if
type
==
"boinc"
:
if
type
==
"boinc"
:
import
socket
project
=
self
.
options
[
'url-boinc'
].
strip
()
hostname
=
socket
.
gethostname
()
url
=
self
.
options
[
'url-boinc'
].
strip
()
startBoinc
=
True
startBoinc
=
True
#Generate BOINC/Condor launcher script
#Generate BOINC/Condor launcher script
...
@@ -82,7 +79,6 @@ class Recipe(GenericBaseRecipe):
...
@@ -82,7 +79,6 @@ class Recipe(GenericBaseRecipe):
'--pid_file'
,
pid_file
,
'--pid_file'
,
pid_file
,
'--master_wrapper'
,
grid_wrapper
,
'--master_wrapper'
,
grid_wrapper
,
'--directory'
,
self
.
options
[
'work_dir'
].
strip
(),
'--directory'
,
self
.
options
[
'work_dir'
].
strip
(),
'--install_directory'
,
self
.
options
[
'install_dir'
].
strip
(),
'--server'
,
self
.
options
[
'redis-url'
].
strip
(),
'--server'
,
self
.
options
[
'redis-url'
].
strip
(),
'--port'
,
self
.
options
[
'redis-port'
].
strip
(),
'--port'
,
self
.
options
[
'redis-port'
].
strip
(),
'--num_workers'
,
self
.
options
[
'nworkers'
].
strip
(),
'--num_workers'
,
self
.
options
[
'nworkers'
].
strip
(),
...
@@ -97,7 +93,7 @@ class Recipe(GenericBaseRecipe):
...
@@ -97,7 +93,7 @@ class Recipe(GenericBaseRecipe):
config_info
=
self
.
createFile
(
config_info_file
,
config_info
=
self
.
createFile
(
config_info_file
,
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'machineinfo.sh.in'
),
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'machineinfo.sh.in'
),
dict
(
ip_address
=
self
.
options
[
'ipv6'
].
strip
(),
dict
(
ip_address
=
self
.
options
[
'ipv6'
].
strip
(),
hostname
=
hostname
,
url
=
url
,
project
=
project
,
middleware
=
type
)))
middleware
=
type
)))
os
.
chmod
(
config_info_file
,
0744
)
os
.
chmod
(
config_info_file
,
0744
)
path_list
.
append
(
config_info
)
path_list
.
append
(
config_info
)
...
...
slapos/recipe/bonjourgrid/template/machineinfo.sh.in
View file @
2dfd4830
...
@@ -4,15 +4,15 @@ Mhz=`grep -i Mhz /proc/cpuinfo | cut -d : -f2 | head -1 | cut -f2 -d " "`
...
@@ -4,15 +4,15 @@ Mhz=`grep -i Mhz /proc/cpuinfo | cut -d : -f2 | head -1 | cut -f2 -d " "`
mem=`grep -i MemTotal /proc/meminfo | cut -f2 -d :`
mem=`grep -i MemTotal /proc/meminfo | cut -f2 -d :`
Ram=`echo $mem | cut -f1 -d " "`
Ram=`echo $mem | cut -f1 -d " "`
Cpu=`uname -a | cut -f3 -d " "`
Cpu=`uname -a | cut -f3 -d " "`
H=
%(hostname)s
H=
`hostname`
Nbproc=`grep processor /proc/cpuinfo |wc -l`
Nbproc=`grep processor /proc/cpuinfo |wc -l`
Ip=%(ip_address)s
Ip=%(ip_address)s
status="in execution"
status="in execution"
secours="host1"
secours="host1"
middleware="%(middleware)s"
middleware="%(middleware)s"
url="%(url
)s"
project="%(project
)s"
c="{'"MHZ"':\"$Mhz\",'"Ram"':\"$Ram\",'"Cpu"':\"$Cpu\",'"HOST"':\"$H\",'"IP"':\"$Ip\",'"STATUS"':\"$status\",'"SECOURS"':\"$secours\",'"MIDDLEWARE"':\"$middleware\",'"
URL"':\"$url
\",}"
c="{'"MHZ"':\"$Mhz\",'"Ram"':\"$Ram\",'"Cpu"':\"$Cpu\",'"HOST"':\"$H\",'"IP"':\"$Ip\",'"STATUS"':\"$status\",'"SECOURS"':\"$secours\",'"MIDDLEWARE"':\"$middleware\",'"
PROJECT"':\"$project
\",}"
filename=`hostname`
filename=`hostname`
echo $c > $filename
echo $c > $filename
software/bonjourgrid/bonjourgrid.src/bonjourgrid.tar.gz
deleted
100644 → 0
View file @
fe47fae3
File deleted
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment