Skip to content
Permalink
Browse files

Avoid a stack on misnamed scaler slaves

Log a proper error in this case, stating the expected name
format.
  • Loading branch information...
cvaroqui committed Jul 9, 2019
1 parent 1b4a498 commit 4f009da0d8680f27b2a5e91eca3bfbb29915666a
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/resContainer.py
@@ -292,7 +292,10 @@ def post_action(self, action):

def dns_search(self):
if self.svc.scaler_slave:
_name = self.svc.name[self.svc.name.index(".")+1:]
try:
_name = self.svc.name[self.svc.name.index(".")+1:]
except ValueError:
raise ex.excError("misnamed scaler slave %s: should be <n>.<scalername>" % self.svc.name)
else:
_name = self.svc.name
namespace = self.svc.namespace.lower() if self.svc.namespace else "root"

0 comments on commit 4f009da

Please sign in to comment.
You can’t perform that action at this time.