Open jandunk opened 5 years ago
Sorry pasted the wrong file value is defined like so: count => 1,
and wrong error:
Alert: Exception during create. The state of the resource is unknown. ex is Create failed. Response is #create'", "/usr/share/ruby/vendor_ruby/puppet/property/ensure.rb:16:in
block in defaultvalues'", "/usr/share/ruby/vendor_ruby/puppet/property.rb:197:in call_valuemethod'", "/usr/share/ruby/vendor_ruby/puppet/property.rb:498:in
set'", "/usr/share/ruby/vendor_ruby/puppet/property.rb:581:in sync'", "/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:204:in
sync'", "/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:128:in sync_if_needed'", "/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:81:in
perform_changes'", "/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in evaluate'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:204:in
apply'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:217:in eval_resource'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:147:in
call'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:147:in block (2 levels) in evaluate'", "/usr/share/ruby/vendor_ruby/puppet/util.rb:335:in
block in thinmark'", "/usr/share/ruby/benchmark.rb:296:in realtime'", "/usr/share/ruby/vendor_ruby/puppet/util.rb:334:in
thinmark'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:147:in block in evaluate'", "/usr/share/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in
traverse'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:138:in evaluate'", "/usr/share/ruby/vendor_ruby/puppet/resource/catalog.rb:169:in
block in apply'", "/usr/share/ruby/vendor_ruby/puppet/util/log.rb:149:in with_destination'", "/usr/share/ruby/vendor_ruby/puppet/transaction/report.rb:112:in
as_logging_destination'", "/usr/share/ruby/vendor_ruby/puppet/resource/catalog.rb:168:in apply'", "/usr/share/ruby/vendor_ruby/puppet/configurer.rb:120:in
block in apply_catalog'", "/usr/share/ruby/vendor_ruby/puppet/util.rb:161:in block in benchmark'", "/usr/share/ruby/benchmark.rb:296:in
realtime'", "/usr/share/ruby/vendor_ruby/puppet/util.rb:160:in benchmark'", "/usr/share/ruby/vendor_ruby/puppet/configurer.rb:119:in
apply_catalog'", "/usr/share/ruby/vendor_ruby/puppet/configurer.rb:227:in run_internal'", "/usr/share/ruby/vendor_ruby/puppet/configurer.rb:134:in
block in run'", "/usr/share/ruby/vendor_ruby/puppet/context.rb:64:in override'", "/usr/share/ruby/vendor_ruby/puppet.rb:246:in
override'", "/usr/share/ruby/vendor_ruby/puppet/configurer.rb:133:in run'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:47:in
block (4 levels) in run'", "/usr/share/ruby/vendor_ruby/puppet/agent/locker.rb:20:in lock'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:47:in
block (3 levels) in run'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:117:in with_client'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:44:in
block (2 levels) in run'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:82:in run_in_fork'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:43:in
block in run'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:179:in call'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:179:in
controlled_run'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:41:in run'", "/usr/share/ruby/vendor_ruby/puppet/application/agent.rb:361:in
onetime'", "/usr/share/ruby/vendor_ruby/puppet/application/agent.rb:327:in run_command'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:381:in
block (2 levels) in run'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:507:in plugin_hook'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:381:in
block in run'", "/usr/share/ruby/vendor_ruby/puppet/util.rb:496:in exit_on_fail'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:381:in
run'", "/usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:146:in run'", "/usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:92:in
execute'", "/usr/bin/puppet:8:in `
facing same issue, earlier it was working but today it isn't. I tried converting the count into int, still it gives same error
I'm trying to deploy an aks cluster but it fails upon creation.
Describe the Bug
Cluster does not get created and an error is thrown:
[root@vm51 manifests]# puppet agent -t Info: Retrieving pluginfacts Info: Retrieving plugin Info: Caching catalog for vm51.xxx.local Info: Applying configuration version '1566684169' Info: Calling operation ManagedClusters_List Info: Getting oauth2 token Info: Authentication succeeded Info: Called (Get) endpoint at https://management.azure.com/subscriptions/xxx/providers/Microsoft.ContainerService/managedClusters?api-version=2018-03-31, success was true Info: Checking if resource puppet-k8s-mc of type exists, returning
Info: Entered create for resource puppet-k8s-mc of type ManagedCluster
Info: Calling operation ManagedClusters_CreateOrUpdate
Info: Getting oauth2 token
Info: Authentication succeeded
Info: Called (Put) endpoint at https://management.azure.com/subscriptions/xxx/resourceGroups/puppet-k8s-rg/providers/Microsoft.ContainerService/managedClusters/puppet-k8s-mc?api-version=2018-03-31, success was false
Alert: Exception during create. The state of the resource is unknown. ex is Create failed. Response is # and body is {
"code": "UnmarshalError",
"message": "UnmarshalEntity encountered error: json: cannot unmarshal string into Go struct field Properties.agentPoolProfiles of type v20180331.AgentPoolProfile."
} and backtrace is ["/var/lib/puppet/lib/puppet/provider/azure_managed_cluster/azure_managed_cluster.rb:147:in '"]
Error: Create failed. Response is # and body is {
"code": "UnmarshalError",
"message": "UnmarshalEntity encountered error: json: cannot unmarshal string into Go struct field Properties.agentPoolProfiles of type v20180331.AgentPoolProfile."
}
Error: /Stage[main]/Main/Node[vm51.xxx.local]/Azure_managed_cluster[puppet-k8s-mc]/ensure: change from absent to present failed: Create failed. Response is # and body is {
"code": "UnmarshalError",
"message": "UnmarshalEntity encountered error: json: cannot unmarshal string into Go struct field Properties.agentPoolProfiles of type v20180331.AgentPoolProfile."
}
Info: Calling operation ResourceGroups_List
Info: Getting oauth2 token
Info: Authentication succeeded
Info: Called (Get) endpoint at https://management.azure.com/subscriptions/xxxx/resourcegroups?api-version=2018-05-01, success was true
Info: Checking if resource puppet-k8s-rg of type exists, returning true
create'", "/usr/share/ruby/vendor_ruby/puppet/property/ensure.rb:16:in
block in defaultvalues'", "/usr/share/ruby/vendor_ruby/puppet/property.rb:197:incall_valuemethod'", "/usr/share/ruby/vendor_ruby/puppet/property.rb:498:in
set'", "/usr/share/ruby/vendor_ruby/puppet/property.rb:581:insync'", "/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:204:in
sync'", "/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:128:insync_if_needed'", "/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:81:in
perform_changes'", "/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:inevaluate'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:204:in
apply'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:217:ineval_resource'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:147:in
call'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:147:inblock (2 levels) in evaluate'", "/usr/share/ruby/vendor_ruby/puppet/util.rb:335:in
block in thinmark'", "/usr/share/ruby/benchmark.rb:296:inrealtime'", "/usr/share/ruby/vendor_ruby/puppet/util.rb:334:in
thinmark'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:147:inblock in evaluate'", "/usr/share/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in
traverse'", "/usr/share/ruby/vendor_ruby/puppet/transaction.rb:138:inevaluate'", "/usr/share/ruby/vendor_ruby/puppet/resource/catalog.rb:169:in
block in apply'", "/usr/share/ruby/vendor_ruby/puppet/util/log.rb:149:inwith_destination'", "/usr/share/ruby/vendor_ruby/puppet/transaction/report.rb:112:in
as_logging_destination'", "/usr/share/ruby/vendor_ruby/puppet/resource/catalog.rb:168:inapply'", "/usr/share/ruby/vendor_ruby/puppet/configurer.rb:120:in
block in apply_catalog'", "/usr/share/ruby/vendor_ruby/puppet/util.rb:161:inblock in benchmark'", "/usr/share/ruby/benchmark.rb:296:in
realtime'", "/usr/share/ruby/vendor_ruby/puppet/util.rb:160:inbenchmark'", "/usr/share/ruby/vendor_ruby/puppet/configurer.rb:119:in
apply_catalog'", "/usr/share/ruby/vendor_ruby/puppet/configurer.rb:227:inrun_internal'", "/usr/share/ruby/vendor_ruby/puppet/configurer.rb:134:in
block in run'", "/usr/share/ruby/vendor_ruby/puppet/context.rb:64:inoverride'", "/usr/share/ruby/vendor_ruby/puppet.rb:246:in
override'", "/usr/share/ruby/vendor_ruby/puppet/configurer.rb:133:inrun'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:47:in
block (4 levels) in run'", "/usr/share/ruby/vendor_ruby/puppet/agent/locker.rb:20:inlock'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:47:in
block (3 levels) in run'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:117:inwith_client'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:44:in
block (2 levels) in run'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:82:inrun_in_fork'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:43:in
block in run'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:179:incall'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:179:in
controlled_run'", "/usr/share/ruby/vendor_ruby/puppet/agent.rb:41:inrun'", "/usr/share/ruby/vendor_ruby/puppet/application/agent.rb:361:in
onetime'", "/usr/share/ruby/vendor_ruby/puppet/application/agent.rb:327:inrun_command'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:381:in
block (2 levels) in run'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:507:inplugin_hook'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:381:in
block in run'", "/usr/share/ruby/vendor_ruby/puppet/util.rb:496:inexit_on_fail'", "/usr/share/ruby/vendor_ruby/puppet/application.rb:381:in
run'", "/usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:146:inrun'", "/usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:92:in
execute'", "/usr/bin/puppet:8:in `I have defined Properties.agentPoolProfiles without quotes in my manifest file but somehow it is not parsed as an integer.
Expected Behavior
Cluster gets created.
Steps to Reproduce
puppet agent -t
Environment
Additional Context
node 'vm51.xxxx.local' {
file {'/etc/motd': content => 'test test ',
}
$base_name = 'puppet-k8s' $rg = "${base_name}-rg" $location = 'uksouth' $mc = "${base_name}-mc" $client_id = 'xxx' $subscription_id = 'xxx' $secret_id = 'xxxx'
azure_resource_group { $rg: ensure => present, parameters => {}, location => $location }
azure_managed_cluster { $mc: ensure => present, location => $location, resource_group_name => $rg, resource_name => $mc, parameters => {}, properties => { kubernetesVersion => '1.14.6', dnsPrefix => $mc, agentPoolProfiles =>[ name => 'agentpool', count => Integer[1], vmSize => 'Standard_B2s', storageProfile => 'ManagedDisks', maxPods => 110, osType => 'Linux' ], servicePrincipalProfile => { clientId => $client_id, secret => $secret_id }, addonProfiles => { httpApplicationRouting => { enabled => true, }, omsagent => { enabled => true, config => { logAnalyticsWorkspaceResourceID => "/subscriptions/${subscription_id}/resourcegroups/defaultresourcegroup-suk/providers/microsoft.operationalinsights/workspaces/defaultworkspace-${subscription_id}-suk" #lint:ignore:140chars } } }, enableRBAC => false, networkProfile => { networkPlugin => 'kubenet', } }, }
}