Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 179501 Details for
Bug 247772
RFE: One service following another
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Preliminary event parser specification.
specs.txt (text/plain), 4.36 KB, created by
Lon Hohberger
on 2007-08-29 18:04:53 UTC
(
hide
)
Description:
Preliminary event parser specification.
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2007-08-29 18:04:53 UTC
Size:
4.36 KB
patch
obsolete
>Basic configuration specification: > > <rm> > <events> > <event class="node"/> <!-- all node events --> > <event class="node" > node_name="bar"/> <!-- events concerning 'bar' --> > <event class="node" > node_name="foo" > node_state="up"/> <!-- 'up' events for 'foo' --> > <event class="node" > node_id="3" > node_state="down"/> <!-- 'down' events for node ID 3 --> > > (note, all service ops and such deal with node ID, not > with node names) > > <event class="service"/> <!-- all service events--> > <event class="service" > service_name="A"/> <!-- events concerning 'A' --> > <event class="service" > service_name="B" > service_state="started"/> <!-- when 'B' is started... --> > </event> > ... > </rm> > >Node event globals: > > n_name - node name > n_id - node ID > n_state - new node state > >Service event globals: > > svc_name > svc_state > svc_owner (ID... if running; <= 0 if not) > >C-binding functions: > > service_owner( servicename ) <-- returns node ID (int) > > service_status( servicename ) <-- returns string > > service_count( nodeID ) <-- returns # of services on the node > > node_state( nodeID ) <-- returns node state > > service_start(s, pref_nodeID, avoid_nodeID) > <-- start a not-running service on > preferred node. In any case, avoid > the avoid node. > > service_relocate(s, pref_nodeID, avoid_nodeID) > <-- relo. a running service to the > preferred node. In any case, avoid > the avoid node. (both node specs > are optional) > service_stop(s) <-- stop the service > service_fail(s) <-- fail the service > service_disable(s) <-- disable the service (note: you can > NOT disable a failed service from > an event script; you must do this > manually)) > > ... > >I prototyped a simplistic script language which should work (using >lex/yacc). I also started (barely) on the internal executive for it, >which would be fairly efficient since it's a very limited language. >However, it would still take awhile to get it fully put together. > >So, I also grabbed Lua (an embedded script language) and was able to >create a C-bound function in about 45 minutes, build a test program, and >call a test lua-script which called the c-bound function. We don't ship >Lua in RHEL, so either we'd have to provide it as a library in rgmanager >or embed it statically in rgmanager if we were to use it. > >If we use Lua, it'll take maybe a week (mostly writing binding >functions) to develop functions to let admins do (literally) whatever >they need on events. Probably double if I finish the internal (more >simplistic, but faster and smaller) parser. As a side note, doing the >latter has the side effect of being able to rewrite the front-end so >long as the intermediate tree is built correctly - that is, once I get >the back end done, the front-end can be reworked and be entirely done >using XML for example. > >So, with either language construct, it's reasonably easy to do something >like this in cluster.conf: > ><event class="node" node_state="down"> > if service_owner("service:SAP_main") == n_id) and > service_state("service:SAP_main") == "started") then > > -- fail over service if it was running to the node running > -- the service named "SAP_replicated" > start_service("service:SAP_main", > service_owner("service:SAP_replicated"), 0)) > end ></event> > >Move SAP replication server away from the SAP main if they're cohabiting >and/or start the initial instance of the replication server on cluster >boot: > ><event class="service" name="service:SAP_main" state="started"> > if service_state("service:SAP_replicated") == "disabled" then > start_service("service:SAP_replicated", ...) > else if service_owner("service:SAP_main") == > service_owner("service:SAP_replicated") then > relocate_service("service:SAP_repicated", ...) > end ></event> > >Note that I am also exploring the ability to use a parsed XML tree as >a programming construct (like XEXPR, but with the ability to register >functions...).
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 247772
:
158940
|
179501
|
231331
|
231411
|
231421
|
253261
|
253271