-
Notifications
You must be signed in to change notification settings - Fork 1
/
TODO
512 lines (422 loc) · 19.5 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
11/04/2024
Create debian packages
11/04/2024
Use LDAP to store DHCP data. This can be added as a switch in the config
file.
11/04/2024
Update options to mksp:
-g for lvm should be -m
-l for volume-group should be -g
Add options to mksp:
-l list existing storage pools
11/04/2024
Update ax_lib_mysql to check for mysql.h header file.
10/04/2024
If we are unable to read any config files, then the config values are
not set, and this causes big issues (seg faults). Need to check the
autoconf script, as it is NOT setting the correct values for
sysconfdir and localstatedir if installed into /usr/local
Remove checks for dnsa.conf. Config file should be
${sysconfdir}/cmdb/cmdb.conf. Check if it exists, and exit if
it does not.
31/12/2023
Fix up the listing of services and network. Relying on the ID's are not
reproducable. Should use the type name, and these should be unique.
26/12/2023
Investigate adding multiple network cards with mkvm, and ensure they get
the correct name in the interface.
** BONUS ** Naming the interfact in linux with the same name as the
network in libvirt
23/12/2023
Systems with less than 768MB RAM will pause installation with a low memory
warning. This can be overcome by adding lowmem=1 to the bootline
22/12/2023
Check writing DHCP hosts file, as we write it out even if the hostname given
to cbc -w is incorrect
09/08/2023
The main issue with mkvm is it does not add a _build_ into cmdb. It can add
the server in there, but there is no build. We need to add this!
31/12/2020
ailsa_multiple_delete function is not working properly. I think because the
ailsa_sql_delete_s struct is used, this is limited to 20 arguments. Need to
rework it to use the ailsa_sql_multi_s struct instead.
Also, cmdb_records_to_remove is to aggressive in adding records to the
remove struct. When running through the indicies, it will match a reverse
record to remove, when it is in the _wrong_ index, as there is no forward
record for it. Need to check if there even is a reverse for that IP (index +
dest in rev record)
*** Seems to have the code to fix both these issues, but need to check.
It's been a while :D *****
30/12/2020
Writing the build configuration should fail earlier if there is no server.
Currently, it will write the dhcpd.hosts config file; this is _OK_, but pretty
ugly. Should just fail with "No server found" or similar error message.
23/12/2020
The preferred_a table is a mess. It has a link to the record, but not the
reverse record. It has the IP address in it, and the FQDN in it GRRRR.
Just need to have a link the rev_record for the IP, and the forward record
to get the FQDN. Simples. This will make the comparison for building the
reverse zone easier.
Also, have the record ID in the rev_zone table (i.e. the id of the record
the PRT rev record is pointing to) will make building the zone much easier.
16/12/2020
NTP configuration in debian is not working; the preseed configuration file
does not configure the NTP server. The 2 PI's are not good time sources in
any case.
16/12/2020
Adding cbcdomain and also vmnet does not add reverse zone. Need range and
prefix to check for existing rev zone. Will need to rewrite the adding of a
rev zone in dnsa.
13/12/2020
mkvm is not idempotent. If there is an error in adding to cmdb, then when
run again, it will bail out after trying to add the libvirt VM, as it already
exists.
05/12/2020
Add a script template file to the ansible role that can add some test
data into the database.
Also, look into having an ailsalib subdirectory for most of the code that is
in ailsacmdb library, and move the ailsasql library into ailsacmdb.
Also, adding SRV (and probably MX records) do not check for trailing .
in the hostname. If this is a FQDN it will not be added as such to the
zonefile.
This bit me on the ass BIG STYLE. Fixed. Commit ID: 275a0eb
04/12/2020
* We cannot add a slave zone currently. ** DONE **
* Maybe want to be able to modify the device ID of a piece of hardware.
* update cbcos so it can remove multiple architectures at once. ** DONE **
* Ensure ansible directory is added into distribution **DONE**
03/12/2020
Not really sure we need the customers, contacts and services in CMDB. It would
make the program much more simple. Alternatively, could split them out into
a separate program.
02/12/2020
Will need to check the basic queries that join on other tables; these will
fail if the initial table is empty (also presume if the target table is also
empty)
11/07/2020
Should be able to read config values from environment variables. Also
have defaults either in config file, environment or database
28/06/2020
The cmdb_add_*_id_to_list functions are inconsistent. Some fail if they do
not find what they are searching for. Should maybe have a wrapper function
for them if we want to be _sure_ there the server is added.
** Update ** Not sure this is an issue any more. When I have the test
harness, it should pick this up.
05/05/2020
cbcscript is tightly tied into the build_type table; also the system_scripts_args
table has too much information in it. It would be better to be like system
packages where there is an args and a conf table.
03/05/2020
Adding a system package in cbcsysp should not automatically configure the
package. Indeed, it should check if the package is in the varient. This will
obviously fail for packages that are part of a base install, and so those
packages should be added to the base varient.
31/10/2016
Add support for a YAML data file, so we do not have the unwieldy command
line options. Once this is up and working, this can be the default data
definition language for the daemon too.
03/03/2015
I want to get rid of the need to have a server already in the database before
adding a build. This would mean extending the ethernet and hard-disk options
when creating the build to be able to add the server and requisite hardware
into the database before creating the build. Of course if the server and
or hardware is already in the database, then that will be fine.
27/02/2015 **** FANTASIC IDEA. NEED TO IMPLEMENT SOON *****
Should probably get rid of cbcos. Should check if we have an alias in
build_type and we can add the bt_id into the build table and remove
os_id.
*** Add: Can even just have versions in build_os; no need to have
name and alias; Have those in build_type and then reference from
build_os
06/01/2015
I want to be able to limit the number of results returned from the DB query
so we only display, say, 20 servers / dnsa zone records etc. This will mean
we need to page the terminal and also rerun the query on the database using
the LIMIT clause in the SQL statement. This can be used in the prepared
statements but probably not the base queries, so I will have to fix the whole
DB access :(
**Update** This is more a display problem. Now using AILLIST to
access database should make this easier
21/11/2014
Check the auditd source code for a cool way to read a config file.
Have to build a list of values that it can read, and will
probably want to associate these with the struct char memeber somehow.
Currently config reading is pretty ugly :(
Also need to add the ENV options too - should be able to get the
values from environment.
20/10/2014
Need to add racks, switches and power outlets into the database. Also maybe
need external storage arrays, tape drives etc. Perhaps move servers table
into asset table?
17/10/2014
Need to break out the address for customer from the main customer table. This
will be to allow multiple customer addresses / sites. Would we want to be able
to assign a service to a site? What about hardware?
09/08/2014
Need to be able to update / modify in cmdb. I will need to the add the
updates to the database.
*** Server complete 16/10/2014 ***
*** Customer and services seem complete too ***
02/06/2014
Need to add support for internal / external views.
29/03/2014
If I change the id field in the database to a uuid then I can have
a local file storage, i.e. not use a database. If I am to do this
it may be helpful to be able to import and export these fields in
raw text. libxml anyone?
23/11/2013
Allow mysql to be network aware, so that we can have multiple build
servers. We could do this by adding a build_server table and then
build_server_id (or a snappier name) to the server table. This can
then be added to the end of the SQL statement to be more precise
about the result returned. We could also use this to add enable /
disable instead of delete in the database.
19/09/2013
Only need one initial customer; techies. Need to think more about
internal customers; again most of the crap should be able to be added
later
15/09/2013
When addding a server, it's bullshit that we have to add the network
card and hard disk seperately, and also that we have to know the ID's
that they are in the database. Better to add them WHEN we add the
server.
Need to add Root-CA field into the build_domain table of database.
**Need to add default locale when we add a build OS.
**Debian build want's configuration for libnss-ldap and libpam-ldap if
we do not automatically configure them.
Fixed
07/08/2013
Use amd64 instead of x86_64 - perhaps alias? (this is for the tftp names)
06/05/2013
Database access is pretty poor. Multiple inserts need multiple statements
and the memory allocation for a large result set is bad too (each result
has an individual malloc.)
11/07/2020 **Update**
New AILLIST database access allows multiple inserts in 1 query.
Cannot page result set yet. This is more an issue with display
28/04/2013
The varients perhaps should be able to be added together, so for example you
can create a cluster varient that will install all the packages necessary
for a cluster as well as , e.g., LAMP or SQL Database.
This functionality could be added with "add on" packages
06/04/2013
Allow packages to be grouped, so e.g. PHP can contain all php modules
Should probably add racks / power points / switch points into cmdb.
======================= COMPLETE ============================
30/12/2020
As a user, I want to be able to list the servers build with a particular
cbcos cbcpart cbcvarient and cbclocale. cbcdomain does this already.
cbclocale, commit id: 1705217
cbcpart, commit id: c0c886e
cbcvarient, commit id: 28a48f1
cbcos, commit id: ed56d7f
Command line parsing needs to move away from if else statement to switch
dnsa commit id: e78f342
cbc commit id: b9a35c3
cbcdomain commit id: b9a35c3
cbcos commit id: b9a35c3
cbcvarient commit id: bb487f7
cbcpart commit id: b9a35c3
cbcsysp commit id: bb487f7
cbcscript commit id: b9a35c3
cbclocale commit id: b9a35c3
cmdb commit id: b9a35c3
cmdb-identity commit id: e78f342
mkvm Already done!
mksp Already done!
mknet Already done!
21/12/2020
Need to check when adding a reverse zone if there is any overlap with other
zones. We do this for the build domain...
** Fixed. Commit ID: 275a0eb **
19/12/2020
Currently, can only add rev zones if the have a prefix of 8, 16 or 24 or
greater. It would be good to be able to add other prefixes. This is complex
as the zone files require these prefixes. Should they be separate zones in
the database, or should the program just deal with multiple zonefiles for this
prefix? Also, when adding a reverse zone, we just check for _this zone_ and
not if it overlaps with other zones. This will be required if we have other
prefixes.
** Fixed. Commit ID: 275a0eb **
20/06/2020
Strange bug when building reverse zones with newly set preferred A record.
It does not add the record in on the first time the zone is built, only on
the 2nd time it is built.
** Fixed. Commit id: f45e301 **
06/03/2016
I should probably have a default configuration file, and use make to create
it and then have make install install it in ${sysconfdir}/cmdb. Using the
configmake header, I can then work out where this is supposed to be.
This will probably be less necessary when I move to a daemon for the main
work, and the command line programs just contact the daemon to do the work,
as the daemon can have a config file passed to it on startup.
*** Update: 07/03/2016 ***
Install script cmdb.sh now takes into account the values in
configmake.h
** Done. config.c in lib using SYSCONFDIR. Commit id: 105bf20 **
27/06/2020
It would be useful to have extra functions for the list(clone being an example)
Would need to have the size of the data pointer in the element. Also, want to
add after, before, head or tail.
Added *ailsa_clone_element* and *ailsa_list_insert_clone*. These will
only work on data types that do NOT have pointers in them, so cannot
use them for ailsa_data_s :( This would also include data types that
have pointers to strings as well. There is no easy way around this
without casting, and the function should be working with *void data
types. However, I _could_ have a clone function in AILLIST data type
that would know the data type of the element, in much the same way the
destroy function does.
** Done: Added clone function to list, and ailsa_clone_data function
for ailsa_data_s data type. Commit ID: 24c2529
02/06/2013
Should have the root password for the machine in the database and
add this to the build file. Need to work out how to get hash
*** Done: Commit id 250d84c ***
Also need to add an email alias for root in smtp configuration
06/11/2015 **UPDATE**
The package configuration for postfix is supposed to do this, but
only seems to work in stretch (and not jessie nor wheezy)
11/04/2024 **UPDATE**
This is not an issue, as these versions are now outdated
04/06/2013
For all build options there should be a default option so when you
create a build you do not need to specify all the options.
This will help for first install too, if I create some default options
*** Done: OS varient, partition scheme and build domain all
have default options. Commit id: 475199d ***
*** Also added default customer: Commit id: 4b64960 ***
30/06/2013
Have a generic config struct (config_s) that all the others (e.g.
dnsa_config_s) contain that can be shared between the programs. This way we
can have standard SQL functions that can be shared amongst the programs.
*** Done: now have ailsa_cmdb_s ***
Problem with this is to work out a way of passing the program to the SQL
search so that it will do a, e.g. cbc_search and get the correct values
for number and type of args and fields. Also this will need to be the
correct search itself. Could this config contain this information?
** Started. ailsa_cmdb_s **
** Done: Various commits. All progrmas use ailsa_cmdb_s
26/08/2013
Add checks against all strtoul from DB as if given NULL it will segfault.
**DONE** New DB access
20/04/2020
When adding a locale, need to check if that locale already exists
*** Done. Fixed in commit ID 3baec109 ***
31/01/2015
Need to check all programs are checking for ~/.dnsa.conf and also add
the -c <confg-file> option
** Added. Commit ID: 1047af9d **
Will not be adding the -c <config-file> option
19/04/2020
When adding packages, I need to check if the package already exists for
that particular varient and OS combination.
*** Done. Fixed in commit ID 51dcd4e ***
03/11/2020
When adding package to varient, we need to check if the package already
exists in that varient and not add it again. IDEMPOTENT
** Done. Commit ID: 51dcd4e **
17/07/2020
When displaying build OS, it would be useful to know what servers are
built with that OS.
Also display does not honour -o <os_version> nor -t <architecture>
** Display now honours above switches. Commit ID: 2d05b2f
** Added -q switch; need OS name and Version
02/07/2020
Fix cbcvarient where displaying varient that does not exist blows up.
** Seems fixed. Commit ID: 9ae6239 **
24/06/2020
Consolidate the cmdb_add_*_id_to_list into 2 functions:
1 for char *
1 for char **
Have to be careful of the char ** one; Need to tell length of list. Maybe end
with NULL pointer at the end of list?
** Leaving this one out. There is no need to do this **
06/06/2020
Should probably move all actions to the CMDB_ definitions. These are in
ailsacmdb.h and will remove another dependency on cmdb.h
*** Done. Completed with commit ID 25661a8 ***
06/05/2020
In the sqlite setup functions (ailsa_setup_rw_sqlite and ailsa_setup_ro_sqlite)
need to stop exiting in these functions. They should pass their error back up
the function stack
*** Done. commit ID: bb2ecda ***
03/05/2020
Need to fix the error returns, as report_error does not free memory in use
before exiting. The error report function should only report an error.
The error code should be able to 'bubble up' from whatever function had an
error, and get back to main, so we can free memory there.
** Update ** Should provide a different error function for the
command line validation; can pass the REGEX number to get the
correct error to display.
*** Done: Commit ID 0d2a63b ***
22/11/2020
In getting config values, adding a trailing / to value not read results in a
segmentation fault. I need to check if value exists first.
*** Done. Commit ID: b5cccdf ***
09/11/2018
Deleting SRV records is tricky; it seems to delete all SRV records
for a given service (e.g. ldap) and we cannot specify which one
to delete.
** Fixed. You can now specifiy using service, priority and protocol.
05/06/2013
Need to add the first zone in for dnsa otherwise the software complains
it cannot add the zone due to the A records for the NS records are not
in the zone. DOH!
03/08/2013 **UPDATE **
I could probably just add the name server(s) as A records into
the DB and then add these records to the zonefile. If you are
adding a zone there should not be any records yet.
04/12/2020 **UPDATE**
This is no longer an issue. The initial zone can now be added fine.
*** ALL ***
Need to sort out an install script for the database and decide what tables
to populate at install time, and how to get the default values from the user
Currently I am thinking make postinstall or perhaps make dbinstall
*** Added an ansible playbook to install cmdb on a host ***
The base.sh install script for debian could download a config script
for that host using the hostname.
Fixed
17/04/2014
The applications in build domain should be associated with a "system" group
of packages, separate from the "application" packages currently in the
packages table. In preseed this would allow me to create a table that can
have entries added to them by the user; the package names and the debconf
configurations for those packages, as this is what the build domain
applications currently do. For kickstart, there would be a configuration
script associated with them. Can also have a config script associated
with preseed.
*** Maybe fixed? cbcsysp and cbcscript ***
10/08/2014 - Part III
Would be good to be able to lock down the preseed file and host script to only
that IP address. As this is HTTP this will have to be in the apache config.
10/08/2014 - Part II
I should split out the generic arguments into double dashes -- , but also be
able to read them from a config file; one per line
Will need to work out priority for system config and user config
10/08/2014
Might be good to have a version of cbc that can work without cmdb. I will need
to distill it down to the esentials of the build. Will need to investigate
-- arguments to command line for the partitions
base + varient
/
varient / package
\
what base? how to choose..
size of the disk
/
partition specific part's, but can still choose
\ /
specific partitions?
Do I have to specify supported OS's?
/
operating system
Mostly IP's, mostly + DNS
/
domain
cpc create preseed config
ckc create kickstart config
**** Basic version of cpc has been written ****
**** Basic version of ckc has been written ****
Reworking the SQL code:
- allow inserts of multiple entries **DONE**
- condense cmdb dnsa and cbc sql into 1 set of functions **DONE**