Comments (1)
-L is already implemented as -n $HOSTNAME internally.
This patch should do the trick:
Ticket #209: support -L flag for 'install' command
Call init_execute() also for 'install' command like
all other FSLiveCommand classes.
diff --git a/lib/Shine/Commands/Base/Command.py b/lib/Shine/Commands/Base/Command.py
index 886082b..d4ef640 100644
--- a/lib/Shine/Commands/Base/Command.py
+++ b/lib/Shine/Commands/Base/Command.py
@@ -87,6 +87,19 @@ class Command(object):
# default is to not filter return code
return rc
+ def has_local_flag(self):
+ return self.options.local or self.options.remote
+
+ def init_execute(self):
+ """
+ Initialize execution of remote command, if needed. Should be called
+ first from derived classes before really executing the command.
+ """
+ # Limit the scope of the command if called with local flag (-L) or
+ # called remotely (-R).
+ if self.has_local_flag():
+ self.options.nodes = NodeSet(Server.hostname_short())
+
def iter_fsname(self):
# If some labels are specified, they also specifies some fs names.
@@ -182,19 +195,6 @@ class RemoteCommand(Command):
Command.__init__(self, options, args)
self.eventhandler = None
- def has_local_flag(self):
- return self.options.local or self.options.remote
-
- def init_execute(self):
- """
- Initialize execution of remote command, if needed. Should be called
- first from derived classes before really executing the command.
- """
- # Limit the scope of the command if called with local flag (-L) or
- # called remotely (-R).
- if self.has_local_flag():
- self.options.nodes = NodeSet(Server.hostname_short())
-
def install_eventhandler(self, local_eventhandler, global_eventhandler):
"""
Select and install the appropriate event handler.
diff --git a/lib/Shine/Commands/Install.py b/lib/Shine/Commands/Install.py
index 5b70ac3..350dc9a 100644
--- a/lib/Shine/Commands/Install.py
+++ b/lib/Shine/Commands/Install.py
@@ -54,6 +54,8 @@ class Install(Command):
raise CommandHelpException("Lustre model file path"
"(-m <model_file>) argument required.", self)
+ self.init_execute()
+
eh = FSGlobalEventHandler(self)
# Use this Shine.FSUtils convenience function.
from shine.
Related Issues (20)
- Manage custom actions on target devices HOT 1
- shine does not apply tunings in expected order HOT 3
- start,mount,tune fail when tuning_file is not defined in shine.conf HOT 4
- Apply tunings using lctl command HOT 2
- Shine fails to start Lustre 2.10.0 file system HOT 2
- Better README HOT 1
- Update FSF address in file headers
- oss2: AttributeError: type object 'FSAction' has no attribute 'ev_error' HOT 7
- Does shine support collocation of "MGT"/MDT? HOT 2
- Subdirectory mount HOT 1
- Support for per-OST ost_mkfs_options
- shine cannot unload modules when using the lnet.service HOT 3
- Control module loading and unloading
- Drop support of Python 2.4 and 2.5 HOT 2
- target start order: MDT0 then MDTs then OSTs
- Removing a local filesystem raises an OSError
- Support Python3
- Leverage Python 2.7 support
- Backfstype option when formatting HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shine.