forked from cfengine/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangeLog
2605 lines (2270 loc) · 121 KB
/
ChangeLog
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
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
3.10.0:
New features/additions:
- All new features/additions for 3.8 and 3.9 are also included in 3.10.
- Add: Classes body tailored for use with diff
- New feature: Classes promise: allow classes without an expression to default to defined.
- Support for custom ports and host names as policy hub (CFE-953)
- Add: Definition of from_cfexecd for cf-execd initiated runs
(CFE-2386)
- Add < <= > >= operators to eval().
- Add testing jUnit and TAP bundles and include them in stdlib.cf
- New function isipinsubnet() (ENT-7949)
- LogDebug(): implement module-based debug logging.
Now most DEBUG messages are *not* printed even when "-d" is in use, but
the specific debug module has to be enabled on the command line. For
example to enable all log modules, run:
cf-agent -d --log-modules=all
- Add: edit_line contains_literal_string to stdlib
- add variablesmatching_as_data() function paralleling variablesmatching()
(Redmine #7885)
- Allow specifying agent maxconnections via def.json (CFE-2461)
- Add getuserinfo() function
- Add body agent control select_end_match_eof option. (CFE-2390)
- Add class to enable post transfer verification during policy updates
- Add ability to append to bundlesequnece with def.json (CFE-2460)
- policy_server.dat now appends a newline and supports host & port
Changes:
- Rewrite iteration engine to avoid combinatorial explosion with nested variable expansions.
This speeds up enormously the execution of policies that included long
slists or JSON containers, that in the past didn't even terminate.
Change: "cf_null" string literal was changed to not be something
special, and it's now a string that can be used anywhere, like
in slists or part of bundlesequence etc.
NOTE: Old policy should be grep'ed for "cf_null" and in case such
occurences were handled specially, they should be reworked.
Change: "--empty-list--" is now never printed by format(),
an empty list is now printed as "{ }".
Change: Order of pre-evaluation was slightly changed, A new "vars" pass
at the beginning of pre-evaluation was added. It used to be
classes-vars, but it was changed to vars-classes-vars. As a
result some classes or variables might be evaluated at a
different time than before. As always try to write policy code that works no matter what the
order of execution is.
One way is to always *guard* the execution of functions to avoid
bogus function results. For example the following will avoid
running execresult() bevore the file has been created:
execresult("cmd /path/to/filename") if => fileexists("/path/to/filename");
C internals: NULL Rlist is now perfectly valid, in fact it is the only
way to denote an empty Rlist.
C internals: Since a slist variable can be NULL, API of
EvalContextVariableGet() changed: The way to detect if a
variable is found, is not to check return value for NULL,
but to check returned *type* for CF_DATA_TYPE_NONE.
Fixed what I could find as wrong API uses. (CFE-2162)
- Allow arbitrary service policies (CFE-2402)
- Behaviour change: cf-execd: Do not append -Dfrom_cfexecd to exec_command .
(CFE-2386)
- Failsafe/Bootstrap no longer copy files starting with .git (like .gitignore) or .mailmap
(CFE-2439)
- Change: Enable strict transport security
- Change: Disable http TRACE method
- Change: Verify transfered files during policy update
- Allow getvariablemetatags() and getclassmetatags() to get a specific tag key
- Change: Use more restrictive unix socket perms (ENT-2705)
- Add sys.user_data container for user starting agent.
- Pass package promise options to underlying apt-get call (#802)
(CFE-2468)
- Change: Enable agent component management policy on systemd hosts
(CFE-2429)
- Change: Switch processes restart_class logging to verbose
- Change: Log level for keeping verbatim JSON to DEBUG (CFE-2141)
- Change: Require network before cfengine services (CFE-2435)
- Behaviour change: getvalues(inexistent_var) returns an empty list.
Restores 3.7.x and earlier behaviour. (CFE-2479)
- Behaviour change: when used with CFEngine 3.10.0 or greater,
bundles set_config_values() and set_line_based() are appending a
trailing space when inserting a configuration option with empty value.
(CFE-2466)
- Behaviour change: getvalues() always returns a list now. Even when v is a simple
string (i.e. not an iterable) it will return an slist with one element:
the value of the string variable.
- Behaviour change: readintlist() now prints an error if the
file contains real numbers, not integers, and aborts; previously it was
printing an info-level error message, was half-reading an integer out of
the real, and was continuing successfully.
- Ensure synchronous start and stop with systemctl (ENT-2841)
- Change select_region INI_section to match end of section or end of file
(CFE-2519)
Bug fixes:
- fix files promise not setting ACL properly on directories. (CFE-616)
- Upgrade CFEngine dependencies to the following versions:
- lixml2 2.9.4
- OpenSSL 1.0.2j
- LibYAML 0.1.7
- Curl 7.50.3
- Fix cumulative() to accept up to 1000 years, like it's documented.
- Fixed parsing of host name/IP and port number in cf-runagent
(CFE-546)
- Fix intermittent error message of type:
"error: Process table lacks space for last columns: <cmd>" (CFE-2371)
- storage: Properly initialize the list of current mounts (CFE-1803)
- Fix 'contain' attribute 'no_output' having no effect when
the 'commands' promise is using 'module => "true"'. (CFE-2412)
- Fix bug which caused empty emails to be sent from cf-execd
if there was no previous output log and the new log was fully filtered
by email filters. (ENT-2739)
- allow ifelse(FALSE, $(x), "something else") to work. (CFE-2260)
- Fix connection cache, reuse connections when possible. (CFE-2447)
- Fix rare bug that would sometimes prevent redis-server from launching.
- Fix bug in files promise when multiple owners are promised
but first one doesn't exist, and improve logging . (CFE-2432)
- define kept outcome with action warn if edit_line is as expected
(CFE-2424)
- Example using getvariablemetatags() and getclassmetatags() to get a specific tag key
- Remove 2k limit on strings length when writing JSON policies
(CFE-2383)
- Fix ttime_range constraint to go higher than 2G as number of seconds.
- Change: cronjob bundle tolerates different spacing
- Allow editing fields in lines longer than 4k (CFE-2438)
- Don't send empty emails for logs where everything is filtered.
(ENT-2739)
- allow maplist(), maparray(), and mapdata() to evaluate function calls during iteration
(ARCHIVE-1619)
- insert_lines is no longer implicitly matching EOF as
end of the region if 'select_end' pattern is not matched . (CFE-2263)
- Change: Remove executable bit from systemd units (CFE-2436)
- cf-serverd should reload def.json when reloading policy (CFE-2406)
- Fix cf-monitord detection of usernames of the process table on AIX.
- Speed up local and remote file copying and fix spurious errors.
(ENT-2769)
- Fix occasional segfault when running getindices() on a
variable that has indices of multiple depths (e.g. both "a[x]" and
"a[x][y]"). (CFE-2397)
- When no file is provided when calling cf-promises
with cf or json output, use promises.cf by default. This restores the
previous behavior. (CFE-2375)
- Fix: Services starting or stopping unnecessarily (CFE-2421)
- Change: Split systemd units (CFE-2278)
- EOF is matched as an end of the region in edit_line
promises only if 'select_end_match_eof' parameter is true. (CFE-2263)
- Fix double logging of output_prefix, and log process name for cf-agent syslog messages.
(CFE-2225)
- Be less verbose if a network interface doesn't have a MAC address.
(CFE-1995)
- Fix: CFEngine choking on standard services (CFE-2806)
- fix insert_lines related memory corruption (CFE-2520)
- fix cf-serverd crash when reporting corrupted data. (ENT-3023)
- Fix ability to manage INI sections with metachars for
manage_variable_values_ini and set_variable_values_ini (CFE-2519)
- Fix apt_get package module incorrectly using interactive mode.
- Fix crash on Solaris when ps ucb variant is not available. (CFE-2506)
- cf-serverd: Do not close connection when file does not exist.
(CFE-2532)
- getvalues() now behaves correctly for old CFEngine arrays of depth 1.
Known issues: getvalues() still misbehaves with double-indexed arrays
(see (CFE-2504, CFE-2536)
3.9.0:
New features/additions:
- Add optional interface parameter to iprange() to match only one interface.
- Allow '=' in symbolic modes (Redmine #7826)
- Add: FreeBSD ports package module
- New package module for FreeBSD pkg package manager.
- Add support for adding/removing fifos in policy
- Add Linux parsing of /proc/net/ data.
- sys.inet
- sys.inet6
- sys.interface_data
- Data is returned as a data container.
- See documentation for more details. (Jira CFE-1991)
- sys.ip2iface: new reverse mapping variable from IP to interface name
- Namespaced classes can now be specified on the command line.
- namespaces can now be passed to cf-runagent -D and --remote-bundles
(Redmine #7856)
- Add 'cf-full' and 'json-full' to cf-promises '-p' option.
They generate output based on the entire policy. The existing 'cf'
already behaved this way, and it has now been changed to generate
output only for a single file, which the existing 'json' option
already does.
- New language functions: processexists() and findprocesses()
(Redmine #7633)
- Implement new regex_replace() function. (Redmine #7346)
- Add log rotation policy for state/classes.jsonl log. (Redmine #7951)
- Added collect_vars utility bundle to stdlib
- Intoduce report_class_log attribute to body agent control.
(Redmine #7951)
- Add standard_services service_method allowing for explicit usage
- cf-promises --show-vars can now show JSON variables.
- Add json_pipe mode to mapdata(), which allows piping a
JSON container to an external program for manipulation and receiving
JSON back. The `jq` tool is a good example where this mode can be
useful. A corresponding `$(def.jq)` variable has also been added with
a default path to this tool. See documentation for mapdata() for
more information and examples. (Jira CFE-2071)
- behaviour change: "true" is always defined and "false" is never defined in a context expression.
- Add: nimclient package module for AIX
This module provides basic functionality for using nimclient as a means
to ensure packages are either present or absent. It does not support
listing package updates available or provide any special caching.
- Add callstack_callers() and callstack_promisers() functions.
- Log variable definitions in debug output. (Redmine #7137)
- Add: Memory information to host info report (Jira CFE-1177)
- In Mustache templates, one can now use `{{#-top-}}` and
`{{/-top-}}` tags to iterate over the top level element in a
container. (Redmine #6545)
- Add network_connections() function that parses /proc/net
- Provide new -w argument to override the workdir for testing
- New feature: Emails sent by cf-execd can be filtered to get
rid of emails for unwanted log messages. The attributes
mailfilter_include and mailfilter_exclude in body executor
control control what to include. See documentation for cf-execd for
more information. (Jira CFE-2283)
- Add: file_make_mustache bundle to render mustache templates
- Add '-n' flag to cf-key to avoid host name lookups.
- cf-agent, cf-execd, cf-promises, cf-runagent and cf-serverd honor multiple -D, -N and -s arguments
(Redmine #7191)
- Add "canonify" mode to mapdata().
- Add: printfile bodies to stdlib
- Add: New `results` classes body [] (Redmine #7418, #7481)
- Implement cf-runagent --remote-bundles and cf-serverd "bundle" access promise.
(Redmine #7581)
- Add commands promise arglist attribute, augmenting args attribute.
- It's now possible to reference variables in inline JSON,
for example: `mergedata('[ thing, { "mykey": otherthing[123] } ]')`.
`thing` and `otherthing[123]` will be resolved as variables, since
they are unquoted. See the documentation for more details.
(Redmine #7871)
- Allow inline JSON to be used in the following function
calls:
- data_expand()
- difference()
- every()
- filter()
- format()
- getindices()
- getvalues()
- grep()
- intersection()
- join()
- length()
- makerule()
- mapdata()
- maplist()
- mean()
- mergedata()
- none()
- nth()
- parsejson()
- product()
- regarray()
- reglist()
- reverse()
- shuffle()
- some()
- sort()
- storejson()
- string_mustache()
- sublist()
- sum()
- unique()
- url_get()
- variance()
For example: `mergedata('[ "thing", { "mykey": "myvalue" } ]')`
See the documentation for more details. (Jira CFE-2253)
- Add: edit_line contains_literal_string to stdlib
- Add body agent control select_end_match_eof option. (Jira CFE-2390)
Changes:
- Change: classesmatching(): order of classes changed
- Change: getindices(), getvalues(), variablesmatching(), maparray():
order of variables returned has changed
- Change: set_quoted_values uses bundle scoped classes
- Change: set_config_values uses bundle scoped classes
- Change: set_variable_values uses bundle scoped classes
- Change: set_config_values_matching uses bundle scoped classes
- Change: manage_variable_values_ini uses bundle scoped classes
- Change: set_line_based should use bundle scoped classes
(Jira CFE-1959)
- getvalues() will now return a list also for data containers,
and will descend recursively into the containers. (Redmine #7116)
- Change: Improve git drop user support
- Use new package promise as default package promise
implementation. (Jira CFE-2332)
- Don't follow symbolic links when copying extended attributes.
- When a bodydefault:<promise_type>_<body_type> body is
defined, it will be used by all promises of type <promise_type>
unless another body is explicitly used.
- cf-serverd no longer appends "-I -Dcfruncommand" to
cfruncommand, this has to be done manually in masterfiles
body server control. (Redmine #7732)
- eval() function arguments mode and options are now
optional.
- sort() function argument mode is now optional.
- Change: returnszero() no longer outputs the output of a command.
The output can be seen by enabling info mode (-I).
- cfruncommand is not executed under shell. (Redmine #7409)
- Remove: Apache CGI module
- Change: Make maxbytes arg of readjson() and readyaml() optional
- Classes matching agent control's abortclasses are
now printed before exit, even if they are defined in common bundles.
Previously the regex (in abortclasses) that matched the class was
printed if the class was defined in a common bundle, but the class
itself was printed if it was defined in an agent bundle. With this
change, the defined class that caused the abort is always printed.
- Remove: Support for email settings from augments_file (Redmine #7682)
- Change: set_variable_values_ini uses bundle scoped classes
- findfiles() now skips relative paths. (Redmine #7981)
- Clients connections using non TLS protocol are rejected
by default. . (Jira CFE-2339)
- Change: Policy files specified in the "inputs" section of
def.json will no longer be auto-loaded. One has to refer to the
which are using the "inputs" field inside def.json. (Redmine #7961)
- Change: Separate binary details from policy update (Redmine #7662)
- Add guard for binary upgrade during bootstrap (Redmine #7861)
- Change: Modernize pkg module and package_method
- Remove: Userdir apache module
- filestat(path, "linktarget") now follows non-absolute links and returns full path of target.
This introduces a change in behaviour. Here is an example:
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Jun 4 2015 /bin/sh -> dash
Previously the filestat function would return "dash", and would also log
an error that the file can not be read. Now it will return "/bin/dash"
(or the final destination if it happens that /bin/dash is also a
symlink).
You can still get the previous behaviour by using
filestat(path, "linktarget_shallow"). (Redmine #7404)
- Define (bootstrap|failsafe)_mode during update.cf when triggerd from failsafe.cf
(Redmine #7861)
- Behavior change: The promise string of a processes
promise now matches just the command line of each process instead of
the line that is output by ps. This was done to reduce fragmentation
between platforms, since ps is a very nonstandardized tool.
(Jira CFE-2161)
- Allowed namespace names made more strict, to disallow
namespaces that cannot be reached. (Redmine #7903)
- Behavior change: When using readintlist(), readreallist()
or readstringlist(), parsing an empty file will no longer result in a
failed function call, but instead an empty list. Failure to open the
file will still result in a failed function call.
- insert_lines is no longer implicitly matching EOF as
end of the region if 'select_end' pattern is not matched .
(Jira CFE-2263)
- EOF is matched as an end of the region in edit_line
promises only if 'select_end_match_eof' parameter is true.
(Jira CFE-2263)
Bug fixes:
- Upgrade CFEngine dependencies to the following versions:
- Curl 7.48.0
- libxml2 2.9.4
- LMDB 0.9.18
- OpenLDAP 2.4.44
- OpenSSL 1.0.2h
- PCRE 8.38
(Jira ENT-2720)
- Upgrade dependencies to latest minor versions.
For Community / Enterprise:
For Enterprise:
- Fix bug which sometimes misparses user names in ps output.
- Fix: Problem with git not dropping privileges soon enough
- Allow def.json up to 5MB instead of 4K.
- It is possible to edit the same value in multiple regions
of one file. (Redmine #7460)
- CFEngine on Windows no longer truncates log messages if the
program in question is killed halfway through.
- Fixed a bug which caused def.json not being able to define
classes based on other hard classes. (Jira CFE-2333)
- Change: Tighten Enterprise hub permissions (Jira ENT-2708)
- Fix a regression which would sometimes cause "Permission
denied" errors on files inside directories with very restricted
permissions. (Redmine #7808)
- Fix use-after-free in ArrayMap and HashMap (Redmine #7952)
- Package repositories are no more hit every time package promise
is evaluated on SUSE.
- Fix a bug which sometimes caused package promises to be
skipped with "XX Another cf-agent seems to have done this since I
started" messages in the log, most notably in long running cf-agent
runs (longer than one minute). (Redmine #7933)
- TTY detection should be more reliable. (Redmine #7606)
- cf-promises -p cf now produces valid cfengine code (Redmine #7956)
- Fix ps options for FreeBSD to check processes only in current host and not in jails
- cf-runagent now properly supports multiple -D or -s arguments
(Redmine #7191)
- Fix: Work around impaired class definition from augments
(Jira CFE-2333)
- Fix "No such file or directory" LMDB error on heavily loaded hosts.
(Jira CFE-2300)
- Check for empty server response in RemoteDirList after decryption
(Redmine #7908)
- Small performance optimization when cf-execd scans emails before sending.
- Fix handling of closed connections during transactions
(Redmine #7926)
- The core ps parsing engine used for processes promises
has been rewritten from scratch, and should be more robust than
before. (Jira CFE-2161)
- Fix the lexer which could not handle empty newline(s)
before a ```@endif```.
- groupexists() no longer fails to detect a group name
starting with a digit. (Jira CFE-2351)
- Fix HP-UX specific bug that caused a lot of log output to disappear.
- Fix unresolved variable (Redmine #7931)
- Change: Suppress standard services noise on SUSE (Redmine #6968)
- Reduce verbosity of yum package module (Redmine #7485)
- cf-runagent: Allow connections to localhost instead of failing silently.
- Show errors regarding failure to copy extended attributes
when doing a local file copy. Errors could happen when copying
across two different mount points where the support for extended
attributes is different between the mount points.
- Fix classes being set because of hash collision in the implementation.
(Redmine #7912)
- fix build failure on FreeBSD 7.1 (Redmine #7415)
- Improve logging when managing setuid/setgid
- Reduce verbosity of apt_get package module (Redmine #7485)
- packagesmatching() and packageupdatesmatching() should work
when new package promise is used. (Jira CFE-2246)
- Fix bug which could render host unable to recover from a
syntax error, even if failsafe.cf was utilized. This could happen if
the file containing the syntax error was specified in the def.json
special file. (Redmine #7961)
- Prevent crash in cf-execd email code when policy server is not set.
- In case of networking error, assume checksum is wrong
- Fix two cases where action_policy warn still produces errors
(Redmine #7274)
- Fix bad option nlwp to vzps on Proxmox / OpenVZ. (Redmine #6961)
- @if minimum_version now correctly ignores lines starting with '@'
(Redmine #7862)
- No longer hang when changing permissions/ownership on fifos
(Redmine #7030)
- readfile() and read*list() should print an error if they fail to read file.
(Redmine #7702)
- The isvariable() function call now correctly accepts all
array variables when specified inline. Previously it would not accept
certain special characters, even though they could be specified
indirectly by using a variable to hold it. (Redmine #7088)
- Fix file descriptor leak when there are network errors.
- Improve robustness of process table parsing on Solaris.
(Jira CFE-2161)
- Installing packages containing version numbers using yum
now works correctly. (Redmine #7825)
- Parse def.json vars, classes and inputs from the C
code. This fixes a bug where certain entries in this file would be
parsed too late to have any effect on the evaluation.
(Redmine #7453, #7615)
- Change package modules permissions on hub package so that
hub can execute package promises. (Redmine #7602)
- Fix: CFEngine choking on standard services (Jira CFE-2086)
- Fix: cf-upgrade on SUSE
- Fix: Stop cfengine choking on systemctl output (Jira CFE-2806)
- storage: Properly initialize the list of current mounts
(Jira CFE-1803)
- Fix bug which caused empty emails to be sent from cf-execd
if there was no previous output log and the new log was fully filtered
by email filters. (Jira ENT-2739)
- Don't send empty emails for logs where everything is filtered.
(Jira ENT-2739)
- Fix intermittent error message of type:
"error: Process table lacks space for last columns: <cmd>"
(Jira CFE-2371)
- Be less verbose if a network interface doesn't have a MAC address.
(Jira CFE-1995)
3.8.2:
Fixes:
- Update library dependencies to latest version.
Libraries upgraded:
- curl 7.47.0
- LMDB 0.9.18
- MySQL 5.1.72
- OpenLDAP 2.4.44
- OpenSSL 1.0.2g
- PostgreSQL 9.3.11
- Redis 3.0.7
- rsync 3.1.2
PHP was kept at 5.6.17 because of problems with the 5.6.19 version.
- Reduce verbosity of apt_get package module (Redmine #7485)
- Reduce verbosity of yum package module (Redmine #7485)
- The isvariable() function call now correctly accepts all
array variables when specified inline. Previously it would not accept
certain special characters, even though they could be specified
indirectly by using a variable to hold it. (Redmine #7088)
- Don't follow symbolic links when copying extended attributes.
- Fix a bug which sometimes caused package promises to be
skipped with "XX Another cf-agent seems to have done this since I
started" messages in the log, most notably in long running cf-agent
runs (longer than one minute). (Redmine #7933)
- Fix bug which could render host unable to recover from a
syntax error, even if failsafe.cf was utilized. This could happen if
the file containing the syntax error was specified in the def.json
special file. (Redmine #7961)
- Change: Policy files specified in the "inputs" section of
def.json will no longer be auto-loaded. One has to refer to the
$(def.augments_inputs) variable in the policy (the standard
masterfiles policies include this by default). This only affects
installations which are not based on the standard masterfiles, and
which are using the "inputs" field inside def.json. (Redmine #7961)
- Fix file descriptor leak when there are network errors.
- Fix cf-serverd error messages with classic protocol clients
(Redmine #7818)
- Installing packages containing version numbers using yum
now works correctly. (Redmine #7825)
- Fix ps options for FreeBSD to check processes only in current host and not in jails
- fix build failure on FreeBSD 7.1 (Redmine #7415)
- Show errors regarding failure to copy extended attributes
when doing a local file copy. Errors could happen when copying
across two different mount points where the support for extended
attributes is different between the mount points.
- Fix classes being set because of hash collision in the implementation.
(Redmine #7912)
- Allow def.json up to 5MB instead of 4K.
- Fix a regression which would sometimes cause "Permission
denied" errors on files inside directories with very restricted
permissions. (Redmine #7808)
- Change: Suppress standard services noise on SUSE (Redmine #6968)
Changes:
- Change: classesmatching(): order of classes changed
3.8.1:
Changes:
- Upgrade CFEngine dependencies to the following versions:
- OpenSSL 1.0.2e
- PCRE 8.38
- libxml2 2.9.3
- OpenLDAP 2.4.43
- libcurl 7.46.0
- Upgrade LMDB to version 0.9.17. (Redmine #7879)
Bug fixes:
- @if minimum_version now correctly ignores lines starting with '@'
(Redmine #7862)
- Add guard for binary upgrade during bootstrap (Redmine #7861)
- Namespaced classes can now be specified on the command line.
- Fix bad option nlwp to vzps on Proxmox / OpenVZ. (Redmine #6961)
- Fix two cases where action_policy warn still produces errors
(Redmine #7274)
- Parse def.json vars, classes and inputs from the C
code. This fixes a bug where certain entries in this file would be
parsed too late to have any effect on the evaluation.
(Redmine #7453, #7615)
- Fix HP-UX specific bug that caused a lot of log output to disappear.
- Check for empty server response in RemoteDirList after decryption
(Redmine #7908)
- getvalues() will now return a list also for data containers,
and will descend recursively into the containers. (Redmine #7116)
- Define (bootstrap|failsafe)_mode during update.cf when triggerd from failsafe.cf
(Redmine #7861)
3.8.0:
New features/additions:
- New feature: Bodies can now inherit attribute values from
other bodies by specifying "inherit_from" with the name of the body to
inherit from, plus any arguments it accepts. For example:
body classes myclasses
{
inherit_from => classes_generic("myname");
}
(Redmine #4309)
- Add url_get() function. (Redmine #6480)
- Add @if feature() syntax
@if feature work like @if minimum_version but allows distinguishing
between features chosen at compile time.
- Extend module protocol to create persistent classes.
To use it, have the module print a line with "^persistence=<minutes>"
before printing any class names. "persistence=0" goes back to non-
persistent classes. (Redmine #7302)
- Add: New `results` classes body (Redmine #7418)
- Add: Debug reports in cfe_internal_cleanup_agent_reports
- Add: Path to svcprop in stdlib
- Add: masterfiles-stage script to contrib
- Whitespace is now allowed in class expressions for
readability, between class names and operators. (Redmine #7152)
Changes:
- Change: Clarify bootstrap/failsafe reports
- Change: Improve in-line docs for internal log maintenance
- Change: Improve efficiency and debug reports (Redmine #7527)
- Remove: 3.5 support from masterfiles policy framework
- Long promiser strings with multiple lines are now
abbreviated in logs. (Redmine #3964)
- Change: Reunify Version based policy split
- Change: Separate binary details from policy update (Redmine #7662)
- Remove /var/cfengine/cf3.<host>.runlog. (Redmine #6957)
- Change: sys.libdir and sys.local_libdir to non version specific path
- sys.libdir now resolves to $(sys.inputdir)/lib
- sys.local_libdir now resolves to lib (Redmine #7559)
- Moved the following files to /var/cfengine/log/:
- /var/cfengine/promise_summary.log
- /var/cfengine/cfagent.<host>.log
- Change: Separate binary details from policy update (Redmine #7662)
- Remove: Support for email settings from augments_file (Redmine #7682)
Bug fixes:
- It is possible to edit the same value in multiple regions
of one file. (Redmine #7460)
- Change package modules permissions on hub package so that
hub can execute package promises. (Rednime #7602) (Redmine #7602)
- Fix exporting CSV reports through HTTPS. (Redmine #7267)
- cf-agent, cf-execd, cf-promises, cf-runagent and cf-serverd honor
multiple -D, -N and -s arguments (Redmine #7191)
- readfile() and read*list() should print an error if they fail to read file.
(Redmine #7702)
- No longer hang when changing permissions/ownership on fifos
(Redmine #7030)
- Fix broken HA policy for 3rd disaster-recovery node.
- Fix: Policy errors for 3.5 and 3.6
- Mustache templates: Fix {{@}} key when value is not a
primitive. The old behavior, when iterating across a map or array of
maps, was to abort if the key was requested with {{@}}. The new
behavior is to always replace {{@}} with either the key name or the
iteration position in the array. An error is printed if {{@}} is used
outside of a Mustache iteration section.
- Fix build with musl libc. (Redmine #7455)
- Fixed a bug which could cause daemons to not to be killed
correctly when upgrading or manually running "service cfengine3 stop".
(Redmine #7193)
- Fix daemons not restarting correctly on upgrade on AIX.
- Package promise: Fix inability to install certain packages
with numbers. (Redmine #7421)
- Redmine #6027 Directories should no more be changed randomly
into files. (Redmine #6027)
- Improve cf-serverd's lock contention because of getpwnam()
call. (Redmine #7643) (Redmine #7643)
- action_policy "warn" now correctly produces warnings instead
of various other verbosity levels. (Redmine #7274)
- If there is an error saving a mustache template file
it is now logged with log-level error (was inform).
- The JSON parser now supports unquoted strings as keys.
- Reduce malloc() thread contention on heavily loaded
cf-serverd, by not exiting early in the logging function, if no message
is to be printed. (Redmine #7624) (Redmine #7624)
- Fix a bug which caused daemons not to be restarted on
upgrade. (Redmine #7528)
- Include latest security updates for dependencies.
- Fixed bug which would cause bff and depot packages not to
run package scripts on removal. (Redmine #7193)
- Fix upgrade causing error message under systemd because of open ports.
- Fixed several bugs which prevented CFEngine from loading
libraries from the correct location. This affected several platforms.
(Redmine #6708)
- Legacy package promise: Result classes are now defined if
the package being promised is already up to date. (Redmine #7399)
- failsafe.cf will be created when needed. (Redmine #7634)
(Redmine #7634)
- If file_select.file_types is set to symlink and there
are regular files in the scanned directory, CFEngine no longer
produces an unnecessary error message. (Redmine #6996)
- Fix 'AIX_PREINSTALL_ALREADY_DONE.txt: cannot create' error
message on AIX.
- Fix package promise not removing dependent packages. (Redmine #7424)
- Fix: Solaris packages no longer contain duplicate library
files, but instead symlinks to them. (Redmine #7591)
- Fix select_class not setting class when used in common bundle with slist.
(Redmine #7482)
- Fix "@endif" keyword sometimes being improperly processed
by policy parser. (Redmine #7413)
- Fix noise from internal policy to upgrade windows agents
(Redmine #7456)
- cfruncommand now works if it contains spaces, with the TLS protocol.
(Redmine #7405)
- Fix warning "Failed to parse csv file entry" with certain very long
commands promises. (Redmine #7400)
- CFEngine no longer erronously passes -M to useradd on HP-UX. (Redmine #6734)
- cf-monitord no longer complains about missing thermal zone files.
(Redmine #7238)
- systemd is now detected correctly if it is a symlink (Redmine #7297)
- TTY detection should be more reliable. (Redmine #7606)
(Redmine #7606)
3.7.3
Fixes:
- Reduce verbosity of yum package module (Redmine #7485)
- Reduce verbosity of apt_get package module (Redmine #7485)
- Upgrade dependencies to latest patch versions.
Upgraded libraries:
- curl 7.47.0
- libxml2 2.9.3
- LMDB 0.9.18
- MySQL 5.1.72
- OpenLDAP 2.4.44
- OpenSSL 1.0.2g
- PCRE 8.38
- PostgreSQL 9.3.11
- Redis 2.8.24
- rsync 3.1.2
PHP was kept at 5.6.17 because of problems with the 5.6.19 version.
- parse def.json vars, classes, and inputs in C (Redmine #7453)
- Namespaced classes can now be specified on the command line.
- getvalues() will now return a list also for data containers,
and will descend recursively into the containers. (Redmine #7116)
- @if minimum_version now correctly ignores lines starting with '@'
(Redmine #7862)
- Fix definition of classes from augments file
- Don't follow symbolic links when copying extended attributes.
- Fix ps options for FreeBSD to check processes only in current host and not in jails
- Fix cf-serverd error messages with classic protocol clients
(Redmine #7818)
- Change: Suppress standard services noise on SUSE (Redmine #6968)
- The isvariable() function call now correctly accepts all
array variables when specified inline. Previously it would not accept
certain special characters, even though they could be specified
indirectly by using a variable to hold it. (Redmine #7088)
- Show errors regarding failure to copy extended attributes
when doing a local file copy. Errors could happen when copying
across two different mount points where the support for extended
attributes is different between the mount points.
- Fix bad option nlwp to vzps on Proxmox / OpenVZ. (Redmine #6961)
- Fix file descriptor leak when there are network errors.
- Fix a regression which would sometimes cause "Permission
denied" errors on files inside directories with very restricted
permissions. (Redmine #7808)
- Check for empty server response in RemoteDirList after decryption
(Redmine #7908)
- Allow def.json up to 5MB instead of 4K.
- Add guard for binary upgrade during bootstrap (Redmine #7861)
- Fix HP-UX specific bug that caused a lot of log output to disappear.
- Fix a bug which sometimes caused package promises to be
skipped with "XX Another cf-agent seems to have done this since I
started" messages in the log, most notably in long running cf-agent
runs (longer than one minute). (Redmine #7933)
- Define (bootstrap|failsafe)_mode during update.cf when triggerd from failsafe.cf
(Redmine #7861)
- Fix two cases where action_policy warn still produces errors
(Redmine #7274)
- Fix classes being set because of hash collision in the implementation.
(Redmine #7912)
- fix build failure on FreeBSD 7.1 (Redmine #7415)
- Installing packages containing version numbers using yum
now works correctly. (Redmine #7825)
Changes:
- Change: classesmatching(): order of classes changed
3.7.3
Fixes:
- Reduce verbosity of yum package module (Redmine #7485)
- Reduce verbosity of apt_get package module (Redmine #7485)
- Upgrade dependencies to latest patch versions.
Upgraded libraries:
- curl 7.47.0
- libxml2 2.9.3
- LMDB 0.9.18
- MySQL 5.1.72
- OpenLDAP 2.4.44
- OpenSSL 1.0.2g
- PCRE 8.38
- PostgreSQL 9.3.11
- Redis 2.8.24
- rsync 3.1.2
PHP was kept at 5.6.17 because of problems with the 5.6.19 version.
- parse def.json vars, classes, and inputs in C (Redmine #7453)
- Namespaced classes can now be specified on the command line.
- getvalues() will now return a list also for data containers,
and will descend recursively into the containers. (Redmine #7116)
- @if minimum_version now correctly ignores lines starting with '@'
(Redmine #7862)
- Fix definition of classes from augments file
- Don't follow symbolic links when copying extended attributes.
- Fix ps options for FreeBSD to check processes only in current host and not in jails
- Fix cf-serverd error messages with classic protocol clients
(Redmine #7818)
- Change: Suppress standard services noise on SUSE (Redmine #6968)
- The isvariable() function call now correctly accepts all
array variables when specified inline. Previously it would not accept
certain special characters, even though they could be specified
indirectly by using a variable to hold it. (Redmine #7088)
- Show errors regarding failure to copy extended attributes
when doing a local file copy. Errors could happen when copying
across two different mount points where the support for extended
attributes is different between the mount points.
- Fix bad option nlwp to vzps on Proxmox / OpenVZ. (Redmine #6961)
- Fix file descriptor leak when there are network errors.
- Fix a regression which would sometimes cause "Permission
denied" errors on files inside directories with very restricted
permissions. (Redmine #7808)
- Check for empty server response in RemoteDirList after decryption
(Redmine #7908)
- Allow def.json up to 5MB instead of 4K.
- Add guard for binary upgrade during bootstrap (Redmine #7861)
- Fix HP-UX specific bug that caused a lot of log output to disappear.
- Fix a bug which sometimes caused package promises to be
skipped with "XX Another cf-agent seems to have done this since I
started" messages in the log, most notably in long running cf-agent
runs (longer than one minute). (Redmine #7933)
- Define (bootstrap|failsafe)_mode during update.cf when triggerd from failsafe.cf
(Redmine #7861)
- Fix two cases where action_policy warn still produces errors
(Redmine #7274)
- Fix classes being set because of hash collision in the implementation.
(Redmine #7912)
- fix build failure on FreeBSD 7.1 (Redmine #7415)
- Installing packages containing version numbers using yum
now works correctly. (Redmine #7825)
Changes:
- Change: classesmatching(): order of classes changed
3.7.2:
Bug fixes:
- readfile() and read*list() should print an error if they fail to read file.
(Redmine #7702)
- Fix 'AIX_PREINSTALL_ALREADY_DONE.txt: cannot create' error
message on AIX.
- If there is an error saving a mustache template file
it is now logged with log-level error (was inform).
- Change: Clarify bootstrap/failsafe reports
- Fixed several bugs which prevented CFEngine from loading
libraries from the correct location. This affected several platforms.
(Redmine #6708)
- If file_select.file_types is set to symlink and there
are regular files in the scanned directory, CFEngine no longer
produces an unnecessary error message. (Redmine #6996)
- Fix: Solaris packages no longer contain duplicate library
files, but instead symlinks to them. (Redmine #7591)
- cf-agent, cf-execd, cf-promises, cf-runagent and cf-serverd honor
multiple -D, -N and -s arguments (Redmine #7191)
- Fix "@endif" keyword sometimes being improperly processed
by policy parser. (Redmine #7413)
- It is possible to edit the same value in multiple regions
of one file. (Redmine #7460)
- Fix select_class not setting class when used in common bundle with slist.
(Redmine #7482)
- Fix broken HA policy for 3rd disaster-recovery node.
- Directories should no more be changed randomly
into files. (Redmine #6027)
- Include latest security updates for 3.7.
- Reduce malloc() thread contention on heavily loaded
cf-serverd, by not exiting early in the logging function, if no message
is to be printed. (Redmine #7624)
- Improve cf-serverd's lock contention because of getpwnam()
call. (Redmine #7643)
- action_policy "warn" now correctly produces warnings instead
of various other verbosity levels. (Redmine #7274)
- Change: Improve efficiency and debug reports (Redmine #7527)
- Change package modules permissions on hub package so that
hub can execute package promises. (Redmine #7602)
- No longer hang when changing permissions/ownership on fifos
(Redmine #7030)
- Fix exporting CSV reports through HTTPS. (Redmine #7267)
- failsafe.cf will be created when needed. (Redmine #7634)
- Mustache templates: Fix {{@}} key when value is not a
primitive. The old behavior, when iterating across a map or array of
maps, was to abort if the key was requested with {{@}}. The new
behavior is to always replace {{@}} with either the key name or the
iteration position in the array. An error is printed if {{@}} is used
outside of a Mustache iteration section.
- Legacy package promise: Result classes are now defined if
the package being promised is already up to date. (Redmine #7399)
- TTY detection should be more reliable. (Redmine #7606)
Masterfiles:
- Add: Path to svcprop in stdlib
- Add: New `results` classes body [] (Redmine #7418, #7481)
- Remove: Support for email settings from augments_file (Redmine #7682)
3.7.1:
Bug fixes:
- Fix daemons not restarting correctly on upgrade on AIX. (Redmine #7550)
- Fix upgrade causing error message under systemd because of open ports.
- Fix build with musl libc. (Redmine #7455)
- Long promiser strings with multiple lines are now
abbreviated in logs. (Redmine #3964)
- Fixed a bug which could cause daemons to not to be killed
correctly when upgrading or manually running "service cfengine3 stop".
(Redmine #7193)
- Package promise: Fix inability to install certain packages
with numbers.
- Fix package promise not removing dependent packages. (Redmine #7424)
- Fix warning "Failed to parse csv file entry" with certain very long
commands promises. (Redmine #7400)
- Fix misaligned help output in cf-hub. (Redmine #7273)
- Augmenting inputs from the augments_file (Redmine #7420)
- Add support for failover to 3rd HA node located outside cluster.
- Upgrade all dependencies for patch release.
- Fix a bug which caused daemons not to be restarted on
upgrade. (Redmine #7528)
3.7.0:
New features:
- New package promise implementation.
The syntax is much simpler, to try it out, check out the syntax:
packages:
"mypackage"
policy => "absent/present",
# Optional, default taken from common control
package_module => apt_get,
# Optional, will only match exact version. May be
# "latest".
version => "32.0",
# Optional.
architecture => "x86_64";
- Full systemd support for all relevant platforms
- New classes to determine whether certain features are enabled:
* feature_yaml
* feature_xml
For the official CFEngine packages, these are always enabled, but
packages from other sources may be built without the support.
- New readdata() support for generic data input (CSV, YAML, JSON, or auto)
- YAML support: new readyaml() function and in readdata()
- CSV support: new readcsv() function and in readdata()
- New string_mustache() function
- New data_regextract() function
- eval() can now be called with "class" as the "mode" argument, which
will cause it to return true ("any") if the calculated result is
non-zero, and false ("!any") if it is zero.
- New list_ifelse() function
- New mapdata() function as well as JSON support in maparray().
- filestat() function now supports "xattr" argument for extended
attributes.
- "ifvarclass" now has "if" as an alias, and "unless" as an inverse
alias.
- Ability to expand JSON variables directory in Mustache templates:
Prefix the name with '%' for multiline expansion, '$' for compact
expansion.
- Ability to expand the iteration *key* in Mustache templates with @
- Canonical JSON output: JSON output has reliably sorted keys so the
same data structure will produce the same JSON every time.
- New "@if minimum_version(x.x)" syntax in order to hide future language
improvements from versions that don't understand them.
- compile time option (--with-statedir) to
override the default state/ directory path.
- Fix error messages/ handling in process signalling which no longer
allowed any signals to fail silently
- Also enable shortcut keyword for cf-serverd classic protocol, eg to
simplify the bootstrap process for clients that have different
sys.masterdir settings (Redmine #3697)
- methods promises now accepts the bundle name in the promiser string,
as long as it doesn't have any parameters.
- In a services promise, if the service_method bundle is not specified,
it defaults to the promiser string (canonified) with "service_" as a
prefix. The bundle must be in the same namespace as the promise.
- inline JSON in policy files: surrounding with parsejson() is now
optional *when creating a new data container*.
- New data_expand() function to interpolate variables in a data container.
- Add configurable network bandwidth limit for all outgoing
connections ("bwlimit" attribute in "body common control") . To
enforce it in both directions, make sure the attribute is set on both
sides of the connection.
- Secure bootstrap has been facilitated by use of
"cf-agent --boostrap HUB_ADDRESS --trust-server=no"
- Implement new TLS-relevant options (Redmine #6883):
- body common control: tls_min_version
- body server control: allowtlsversion
- body common control: tls_ciphers
- body server control: allowciphers (preexisting)
Changes:
- Improved output format, less verbose, and messages are grouped.
- cf-execd: agent_expireafter default was changed to 120 minutes
(Redmine #7113)
- All embedded databases are now rooted in the state/ directory.
- TLS used as default for all outgoing connections.
- process promise now reports kept status instead of repaired if a
signal is not sent, even if the restart_class is set. The old
behavior was to set the repaired status whenever the process was not
running. (Redmine#7216).
- Bootstrapping requires keys to be generated in advance using cf-key.
- Disable class set on reverse lookup of interfaces IP addresses.
(Redmine #3993, Redmine #6870)
- Define a hard class with just the OS major version on FreeBSD.
- Abort cf-agent if OpenSSL's random number generator can't
be seeded securely.
- Masterfiles source tarball now installs using the usual commands
"./configure; make install".
- Updated Emacs syntax highlighting template to support the latest
syntax enhancements in 3.7.
Deprecations:
- Arbitrary arguments to cfruncommand (using "cf-runagent -o") are
not acceptable any more. (Redmine #6978)
- 3.4 is no longer supported in masterfiles.
Bug fixes:
- Fix server common bundles evaluation order (Redmine#7211).
- Limit LMDB disk usage by preserving sparse areas in LMDB files
(Redmine#7242).
- Fixed LMDB corruption on HP-UX 11.23. (Redmine #6994)
- Fixed insert_lines failing to converge if preserve_block was used.
(Redmine #7094)
- Fixed init script failing to stop/restart daemons on openvz/lxc
hosts. (Redmine #3394)
- rm_rf_depth now deletes base directory as advertised. (Redmine #7009)
- Refactored cf-agent's connection cache to properly differentiate
hosts using all needed attributes like host and port.
(Redmine #4646)
- Refactored lastseen database handling to avoid inconsistencies.
(Redmine #6660)
- cf-key --trust-key now supports new syntax to also update the
lastseen database, so that clients using old protocol will trust
the server correctly.
- Fixed a bug which sometimes caused an agent or daemon to kill or stop
itself. (Redmine #7075, #7244)
- Fixed a bug which made it difficult to kill CFEngine daemons,