Skip to content

Instantly share code, notes, and snippets.

@jbd
Created August 28, 2012 09:44
Show Gist options
  • Save jbd/3496634 to your computer and use it in GitHub Desktop.
Save jbd/3496634 to your computer and use it in GitHub Desktop.
Why imyarray is empty ?
cf3> CFEngine - autonomous configuration engine - commence self-diagnostic prelude
cf3> ------------------------------------------------------------------------
cf3> Work directory is /var/cfengine
cf3> Looking for a source of entropy in /var/cfengine/randseed
cf3> Making sure that locks are private...
cf3> Checking integrity of the state database
cf3> Checking integrity of the module directory
cf3> Checking integrity of the PKI directory
cf3> -> Loaded private key /var/cfengine/ppkeys/localhost.priv
cf3> -> Loaded public key /var/cfengine/ppkeys/localhost.pub
cf3> Setting cfengine default port to 5308 = 5308
cf3> Reference time set to Tue Aug 28 11:38:28 2012
cf3> CFEngine Core 3.3.4
cf3> ------------------------------------------------------------------------
cf3> Host name is: cluster-admin.cluster.pasteur.fr
cf3> Operating System Type is linux
cf3> Operating System Release is 2.6.32-220.4.1.el6.x86_64
cf3> Architecture = x86_64
cf3> Using internal soft-class linux for host cluster-admin.cluster.pasteur.fr
cf3> The time is now Tue Aug 28 11:38:28 2012
cf3> ------------------------------------------------------------------------
cf3> # Extended system discovery is only available in version Nova and above
cf3> Additional hard class defined as: 64_bit
cf3> Additional hard class defined as: linux_2_6_32_220_4_1_el6_x86_64
cf3> Additional hard class defined as: linux_x86_64
cf3> Additional hard class defined as: linux_x86_64_2_6_32_220_4_1_el6_x86_64
cf3> GNU autoconf class from compile time: compiled_on_linux_gnu
cf3> Address given by nameserver: 192.168.1.84
cf3> -> No interface exception file /var/cfengine/inputs/ignore_interfaces.rx
cf3> Interface 1: lo
cf3> Interface 2: eth0
cf3> Interface 3: eth1
cf3> Interface 4: eth1
cf3> Trying to locate my IPv6 address
cf3> Looking for environment from cf-monitord...
cf3> Loading environment...
cf3> Environment data loaded
cf3> This appears to be a redhat (or redhat-based) system.
cf3> Looking for redhat linux info in "CentOS release 6.3 (Final)"
cf3> Reading /proc/stat utilization data -------
cf3> -> Found 8 cpu cores
cf3> ***********************************************************
cf3> Loading persistent classes
cf3> ***********************************************************
cf3> Persistent class cpu3_high_ldt for 3 more minutes
cf3> Adding persistent class cpu3_high_ldt to heap
cf3> ***********************************************************
cf3> Loaded persistent memory
cf3> ***********************************************************
cf3> -> Found a policy server (hub) on 192.168.1.84
cf3> -> Input file is outside default repository, validating it
cf3> -> Promises seem to change
cf3> -> Input file is changed since last validation, validating it
cf3> -> Verifying the syntax of the inputs...
cf3> Checking policy with command ""/var/cfengine/bin/cf-promises" -f "./test.cf""
cf3> > Parsing file ./test.cf
cf3> Initiate variable convergence...
cf3> Initiate variable convergence...
cf3> -> Defined classes = { 192_168_10_12 192_168_100_100 192_168_1_84 64_bit 8_cpus August Day28 GMT_Hr9 Hr11 Hr11_Q3 Lcycle_2 Min35_40 Min38 Morning PK_MD5_4fd0d4d6a3a3190d3b15123cbf70b448 Q3 Tuesday Yr2012 agent any centos centos_6 centos_6_3 cfengine cfengine_3 cfengine_3_3 cfengine_3_3_4 cfengine_out_high cluster_admin cluster_admin_cluster_pasteur_fr cluster_admin_sis_pasteur_fr cluster_pasteur_fr community_edition compiled_on_linux_gnu cpu0_high cpu1_high cpu2_high cpu3_high cpu3_high_ldt cpu_high diskfree_high entropy_misc_in_low entropy_misc_out_low entropy_nfsd_out_low entropy_ssh_out_low fr ipv4_
ipv4_192_99 ipv4_192_99_64 ipv4_192_168_10_12 ipv4_192 ipv4_192_168 ipv4_192_168_1 ipv4_192_168_100 ipv4_192_168_100_100 ipv4_192_168_1_84 linux linux_2_6_32_220_4_1_el6_x86_64 linux_x86_64 linux_x86_64_2_6_32_220_4_1_el6_x86_64 linux_x86_64_2_6_32_220_4_1_el6_x86_64__1_SMP_Tue_Jan_24_02_13_44_GMT_2012 loadavg_low mac_00_30_48_9e_17_5c mac_00_30_48_9e_17_5d messages_high_normal net_iface_eth0 net_iface_eth1 nfsd_out_low otherprocs_low pasteur_fr redhat rootprocs_high ssh_out_low users_high verbose_mode x86_64 }
cf3> -> Negated Classes = { }
cf3> Initiate variable convergence...
cf3> -> Additional class defined: am_policy_hub
cf3> -> Immunizing against parental death
cf3> -> Bundlesequence => {'test'}
cf3>
cf3> *****************************************************************
cf3> BUNDLE test
cf3> *****************************************************************
cf3>
cf3>
cf3> =========================================================
cf3> vars in bundle test (1)
cf3> =========================================================
cf3>
cf3>
cf3> + Private classes augmented:
cf3>
cf3> - Private classes diminished:
cf3>
cf3>
cf3>
cf3> =========================================================
cf3> reports in bundle test (1)
cf3> =========================================================
cf3>
cf3>
cf3> .........................................................
cf3> Promise's handle:
cf3> Promise made by: "myarray : a"
cf3> .........................................................
cf3>
cf3> Report: myarray : a
cf3> R: myarray : a
cf3>
cf3> .........................................................
cf3> Promise's handle:
cf3> Promise made by: "myarray : b"
cf3> .........................................................
cf3>
cf3> Report: myarray : b
cf3> R: myarray : b
cf3>
cf3> .........................................................
cf3> Promise's handle:
cf3> Promise made by: "myarray : c"
cf3> .........................................................
cf3>
cf3> Report: myarray : c
cf3> R: myarray : c
cf3>
cf3> .........................................................
cf3> Promise's handle:
cf3> Promise made by: "myarray : d"
cf3> .........................................................
cf3>
cf3> Report: myarray : d
cf3> R: myarray : d
cf3>
cf3> =========================================================
cf3> vars in bundle test (2)
cf3> =========================================================
cf3>
cf3>
cf3> + Private classes augmented:
cf3>
cf3> - Private classes diminished:
cf3>
cf3>
cf3>
cf3> =========================================================
cf3> reports in bundle test (2)
cf3> =========================================================
cf3>
cf3>
cf3> =========================================================
cf3> vars in bundle test (3)
cf3> =========================================================
cf3>
cf3>
cf3> + Private classes augmented:
cf3>
cf3> - Private classes diminished:
cf3>
cf3>
cf3>
cf3> =========================================================
cf3> reports in bundle test (3)
cf3> =========================================================
cf3>
cf3> ==> == Bundle Accounting Summary for "test" ==
cf3> ==> Promises kept in "test" = 0
cf3> ==> Promises not kept in "test" = 0
cf3> ==> Promises repaired in "test" = 4
cf3> ==> Aggregate compliance (promises kept/repaired) for bundle "test" = 100.0%
cf3> Outcome of version (not specified) (agent-0): Promises observed to be kept 0%, Promises repaired 100%, Promises not repaired 0%
cf3> -> Checked 0 objects with 6 promises, i.e. model efficiency 0.00%
cf3> -> The 6 declared promise patterns actually expanded into 4 individual promises, i.e. declaration efficiency -50.00%
cf3> -> No lock purging scheduled
# cf-agent -K -f ./test.cf
R: myarray : a
R: myarray : b
R: myarray : c
R: myarray : d
body common control
{
bundlesequence => { "test" };
}
bundle agent test
{
vars:
"indices" slist => { "a", "b", "c", "d" };
"indices_$(indices)" string => "$(indices)";
"myarray[$(indices_$(indices))]" string => "$(indices)";
"imyarray" slist => getindices("myarray");
reports:
cfengine_3::
"myarray : $(myarray[$(indices_$(indices))])";
"imyarray : $(imyarray)";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment