git://git.onelab.eu
/
bootmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disconnected operation.
[bootmanager.git]
/
source
/
steps
/
AuthenticateWithPLC.py
diff --git
a/source/steps/AuthenticateWithPLC.py
b/source/steps/AuthenticateWithPLC.py
index
bad3c16
..
dddb5ee
100644
(file)
--- a/
source/steps/AuthenticateWithPLC.py
+++ b/
source/steps/AuthenticateWithPLC.py
@@
-1,8
+1,16
@@
+#!/usr/bin/python2
+
+# Copyright (c) 2003 Intel Corporation
+# All rights reserved.
+#
+# Copyright (c) 2004-2006 The Trustees of Princeton University
+# All rights reserved.
+
+
import os
from Exceptions import *
import BootAPI
import os
from Exceptions import *
import BootAPI
-import StartDebug
AUTH_FAILURE_COUNT_FILE= "/tmp/authfailurecount"
AUTH_FAILURE_COUNT_FILE= "/tmp/authfailurecount"
@@
-48,6
+56,13
@@
def Run( vars, log ):
return 1
except BootManagerException, e:
log.write( "Authentication failed: %s.\n" % e )
return 1
except BootManagerException, e:
log.write( "Authentication failed: %s.\n" % e )
+ except:
+ # This is ugly.
+ if vars['DISCONNECTED_OPERATION']:
+ vars['API_SERVER_INST']= None
+ return 1
+ else:
+ raise
# increment auth failure
auth_failure_count= 0
# increment auth failure
auth_failure_count= 0
@@
-71,8
+86,6
@@
def Run( vars, log ):
log.write( "Maximum number of authentication failures reached.\n" )
log.write( "Canceling boot process and going into debug mode.\n" )
log.write( "Maximum number of authentication failures reached.\n" )
log.write( "Canceling boot process and going into debug mode.\n" )
- StartDebug.Run( vars, log )
-
raise BootManagerException, "Unable to authenticate node."
raise BootManagerException, "Unable to authenticate node."