Commit Graph

26372 Commits

Author SHA1 Message Date
Hugo Trippaers 8c5dba31d0 Fix the forwardingrule databag 2015-03-16 11:35:24 +01:00
Ian Southam 7fc3365459 Implemented delete (add : false) for cs_dhcp
Added some tests to the test_update_config tests for dhcp entries
2015-03-16 11:35:24 +01:00
Ian Southam e6e47de6ff Stupid stupd bug
a or b is of course not the same as a | b
2015-03-16 11:35:23 +01:00
Ian Southam c318bd6337 Corrected bug (I love tests)
The dhcp server will only start listening after a host has been added
In this condition, HUP is not enough
Changed so that if it is adding a first host it will restart the server
2015-03-16 11:35:23 +01:00
Ian Southam 0e8c79c7f1 That is the acls.
Need to check the order stays good
2015-03-16 11:35:23 +01:00
Ian Southam 8a92a0a460 Corrected a couple of small typos 2015-03-16 11:35:23 +01:00
Hugo Trippaers f273fd4659 Add the static nat rules to the merge procedure 2015-03-16 11:35:23 +01:00
Hugo Trippaers a789e8bf57 Fix a bug that would add updated control ip address instead of replace 2015-03-16 11:35:22 +01:00
Ian Southam 8f4461567d That should be all the dhcp settings correct
CsGuestNetwork moved out of configure
dnsmasq config all switched to CsDhcp
2015-03-16 11:35:22 +01:00
Ian Southam b45c71ee31 Acl code linked in
Dhcp code
Test file for dhcp entry
2015-03-16 11:35:22 +01:00
Hugo Trippaers 683e660d60 Small (but important) fixes 2015-03-16 11:35:22 +01:00
Ian Southam 574fa2c0a0 Call update_config.py if it is there 2015-03-16 11:35:21 +01:00
Ian Southam 8abf1a22ab Auto create missing chains
Auto delete superfluous rules
TO DO: Priorities
2015-03-16 11:35:21 +01:00
Ian Southam 19fd0b4b57 Added logic to create all necessary firewall rules
TODO:  Auto add chains
TODO:  Delete rules that should not be there
TODO: Deal with precidence
2015-03-16 11:35:21 +01:00
Ian Southam cd0ad69281 Tidied up main to be in line with the newer classes
Added a base classs CsDataBag which will autoload a given databag
2015-03-16 11:35:21 +01:00
Ian Southam c6d99a45a2 First part of some serious refactoring
The problem is that teh convergence model does not works as it currently is
Firewall rules will get added but not deleted

This builds a table of firewall rules that need to be present
The new CsNetfilter class will then do:
1.  Add rules that are not present
2.  Delete any that were not explicitly in the add list

WIP
2015-03-16 11:35:21 +01:00
Hugo Trippaers e323d63867 Merge vmmetadata, reuse the code from the existing script to parse it. 2015-03-16 11:35:20 +01:00
Ian Southam 4527519081 Refactored CsHelper into a module
Introduced CsNetfilter module/class
2015-03-16 11:35:20 +01:00
Ian Southam 4e63119873 Moved processing the cmd_line databag into update 2015-03-16 11:35:20 +01:00
Ian Southam 99dd91c565 Added placeholder for networkacl tests 2015-03-16 11:35:20 +01:00
Ian Southam 3ea63ced68 Added merge for network_acl type message 2015-03-16 11:35:19 +01:00
Ian Southam 7e9a0fac0d Do not update etc or you will bring in a load of files that will have their
configuration overwritten
2015-03-16 11:35:19 +01:00
Ian Southam fff3964332 Add catchall for unknown types 2015-03-16 11:35:19 +01:00
Hugo Trippaers 9ede758e4d Small update to try do deal with the stuck issue 2015-03-16 11:35:19 +01:00
Ian Southam 98a43d184b Fixed bug in which every run of loadQueueFile would append to the json file (merge)
cloud-early-config now saves its input file to /var/cache/cloud
Execute load cmd_line.json in update_config
Old way of working still in there to stop and possible clash until the base image is made
2015-03-16 11:35:19 +01:00
Sander Botman 9b40f3d379 fixing the nullpointer on type which is null 2015-03-16 11:35:18 +01:00
Ian Southam 680454dfdf Some bug fixes
Some more tests
store vmpassword functionally working
Tests for store password
2015-03-16 11:35:18 +01:00
Sander Botman 4c5113b9e5 Creating new model for the firewall rules 2015-03-16 11:35:18 +01:00
Ian Southam 9d73879061 Fixed test (assert in guest check was wrong way around)
Also found condition inw hich apache would be miscobfigured and failed to run (I love tests!!)
Fixed configure.py to cover this case
Added a test to provoke this case!
2015-03-16 11:35:18 +01:00
Hugo Trippaers d2e3b238ed New style dnsmasq configuration 2015-03-16 11:35:17 +01:00
Ian Southam 4c5f4a1f9f Added vmpassword type (does nothing yet)
Fixed tests to use /var/cache/cloud
Added some test files but will remove them when tests are properly completed
Fixed a bug in configure that did not deal well with databags with empty dev sections
2015-03-16 11:35:17 +01:00
Sander Botman daf6c33507 Creating new model for the MonitorService 2015-03-16 11:35:17 +01:00
Hugo Trippaers 6a016d5b54 Small fixes 2015-03-16 11:35:17 +01:00
Hugo Trippaers 85434f49b9 Hotfix for lost control interface 2015-03-16 11:35:17 +01:00
Sander Botman b4acd77abf New model for RemoteAccessVpn and moving into the new structure 2015-03-16 11:35:16 +01:00
Hugo Trippaers caef7ee9a9 Staticroutes to new json style 2015-03-16 11:35:16 +01:00
Hugo Trippaers 58919dcf50 Change the location for the temporary json files to /var/cache/cloud 2015-03-16 11:35:16 +01:00
Ian Southam ca2ff2946e Added some tests that test stuff
Specifically checking whether certain ip addresses get added and deleted
Also a rudementary test for the guest network ip
Much more to do!!
2015-03-16 11:35:16 +01:00
Sander Botman 92aca76c3b Adding new model for the Site2SiteVpn configuration. 2015-03-16 11:35:15 +01:00
Sander Botman 1237ded02e Fix on error reporting (null doesn't say much, so lets return the actual problem) 2015-03-16 11:35:15 +01:00
Ian Southam c428d60e6b Stop ignoring eth0 2015-03-16 11:35:15 +01:00
Ian Southam dd6b643ceb Do not use eth0 or eth1 for random tests
One or other will be the control interface of the box
2015-03-16 11:35:15 +01:00
Hugo Trippaers 2e968d85fe Migrate ip alias commands 2015-03-16 11:35:15 +01:00
Ian Southam cc5d72133e Removed chef as we will definitely not go this way 2015-03-16 11:35:14 +01:00
Ian Southam 6a7a832ef5 iDo not do the post configure steps on a control interface 2015-03-16 11:35:14 +01:00
Hugo Trippaers 660fdbe238 modified StaticNatRule to use the new style 2015-03-16 11:35:14 +01:00
Sander Botman fac3bdecd2 Adding the Vagrant configuration that will build xen and db servers. 2015-03-16 11:35:14 +01:00
Leo Simons 6e49675cf5 Have Vagrantfile errors go to STDERR so output is machine-parseable. 2015-03-16 11:35:13 +01:00
Leo Simons f5e5b74646 Add more nics by default 2015-03-16 11:35:13 +01:00
Sander Botman f423f3ea4e New style manage VPN user command <Still need some testing with the VR image> 2015-03-16 11:35:13 +01:00