ce6d114c7f9c5db24d2b2cb1d125955c20d2c428
[monitor.git] / todo
1 Structure:
2
3 monitor module
4         plc wrapper
5         util functions
6         pkl database access
7         database models
8         third-party data sources
9
10 pcucontrol
11         reboot.py
12         maps types to code
13         pyssh 
14         hpilo cmds
15         amt cmds
16         racadm cmd
17         ipmitool cmd
18
19 web
20         cgi scripts
21         tgweb
22                 project...
23
24 cmds
25         py scripts
26         node
27         site
28         pcu
29         query
30         grouprins
31
32 bootman
33         rpyc
34         
35
36
37
38
39 ###############################
40 for each node:
41         Check Status ->
42                 if Pass Threshold -> 
43                         Create Issue -> 
44                                 Take Action -> 
45                                         email
46                                         bm
47                                         pcu
48                                         plc reset
49                                         apply penalties
50                                         flag for admin
51
52 for each issue
53         check issue.status
54         if issue.status is "open": 
55                 issue.take_next_action()
56         if issue.closed:
57                 issue.shutdown()
58         if issue.paused:
59                 pass
60
61 action_list for issuetype (pcudown)
62         send email
63                 yield
64         send email, apply penalty
65                 yield
66         send email, apply second penalty
67                 yield
68         send email
69
70 action_list for issuetype (badhardware)
71 action_list for issuetype (dnserror)
72 action_list for issuetype (nodeconfig)
73 action_list for issuetype (oldbootcd)
74
75 action_list for issuetype (nodedown)
76         if pcuok, reboot
77                 yield
78         if pcuok, and reboot failed, set rins, reboot
79                 yield
80         create_issue pcubroken
81         send email
82                 yield
83         send email, apply penalty
84                 yield
85         send email, apppy second penalty
86                 yield
87         send email
88         
89
90 TOOLS:
91   * add a '--nocache'  to the default set of options.
92   * add a cache parameter in the monitor.conf file.
93
94
95
96 TODO:
97  * install openssh-server, passwd, perl-libwww-perl (for rt), rt-3.4.1,  MySQL-python
98         * had to mount -t devpts devpts /dev/pts to get ssh to work inside the
99           chroot. also, disable the pam modules in /etc/pam.d/sshd
100
101  * blue
102  * auto configuration for php configuration.  
103         maybe run translation of monitor.conf before loading monitorconfig.php?
104  * blue2
105
106  * A setup script of some kind would be nice that walked through : 
107     - writing monitorconfig.py
108         - creation of monitorconfig.php
109         - run syncplcdb.py
110         - testapi.py
111         - findbad.py on sample site.
112         - nodebad.py
113         - findbadpcus.py
114         - nodequery.py
115         - nodegroups.py
116         - loads webpage for those retreived values to confirm setup succeeded.
117
118  * reimplement the config.py / .config mechanism.  I'd like for many commands
119    to share very similar argument or argument sets, as well as have some
120    common config options.  I'm not sure the best way to do this.
121     
122          - features of config.py
123                 * parse arguments and return an object with attributes equal to the
124                   parser values.
125                 * maintain values consistently across modules at run time.
126                 * have default values that are not specified at each run time.
127                 * easy to import and use
128
129          - config module is available via 'import config' or as returned by
130                   parsermodule.parse_args()
131      - python supports load-once modules, so subsequent imports refer to the
132           same module object.
133            
134  * have package pull in threadpool from easy_install
135
136  * place PKL files in a real database
137
138  * clean up plc.py; there's a lot of redundent code.
139
140  * figure out python paths for user commands.
141    - directories for pickle files.
142    - add user in rpm install
143    - user permissions for data files for day-to-day operations.
144
145  * fix BayTechCtrlCUnibe expect script.
146
147  * separate modules into different, logical categories, and create a python
148    module as part of the install:
149                 command line, 
150                 configuration, 
151                 policy, 
152                 data model, 
153                 data access,
154                 object interfaces.
155
156 Lower priority:
157  * Add a more structured, 'automate' library of scripts and means of making
158    batch calls, etc.
159
160  * add a third package for user tools that will interact with the Monitor
161    service.  Mostly, I'm guessing this would be queries for the live status of
162    nodes and a more reliable 'reboot' and 'reinstall' mechanism than currently
163    availble with PLC.
164
165 Done:
166  * Find a better location to place and pull the PKL files currently in the pdb
167    directory.  Ultimately, these should be stored in a real DB.  Until then,
168    they should sit in a location that is accessible from the www scripts,
169    backend scripts, and user utilities.
170  * nodebad loads plc_hn2lb unconditionally
171  * nodeinfo loads act_all unconditionally
172  * change findbad.py default db name
173  * remove deps on www.printbadnodes
174  * reboot.py loads findbadpcus unconditionally.
175  * nodequery loads findbad unconditionally
176  * unified_model loads findbad unconditionally
177
178  * threadpool package.
179  * build cmdamt with g++ prior to packaging
180
181  * www/*.py need appropriate access to database.py,  config.py, monitorconfig.py, etc.
182         - need to convert monitor.conf into monitorconf.sh and monitorconf.php
183
184  * pull out global configuration information from various files, like rt_db,
185    mailer.py,  auth.py, and any others.  Create a single configuration file
186    from which all others pull.
187
188    - convert plc and other files to use the new monitorconfig.py rather than
189      auth, or plc.*
190    - need to alter all import 'auth' statements.