Project

General

Profile

26926_hammer_cli_debug.txt

hammer cli debug - Will Foster, 05/31/2019 03:29 PM

 
1
[root@foreman ~]# hammer -d host update --name f21-h18-000-r620.rdu2.scalelab.redhat.com --build 1
2
[ INFO 2019-05-31T15:25:33 Init] Initialization of Hammer CLI (0.14.0) has started...
3
[DEBUG 2019-05-31T15:25:33 Init] Running at ruby 2.4.3-p205
4
[ INFO 2019-05-31T15:25:33 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
5
[ INFO 2019-05-31T15:25:33 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
6
[ INFO 2019-05-31T15:25:33 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded
7
[DEBUG 2019-05-31T15:25:33 SSLoptions] SSL options: {
8
    :ssl_ca_file => "/etc/puppetlabs/puppet/ssl/certs/ca.pem",
9
     :verify_ssl => true
10
}
11
[DEBUG 2019-05-31T15:25:33 API] Global headers: {
12
        :content_type => "application/json",
13
              :accept => "application/json;version=2",
14
    "Accept-Language" => "en"
15
}
16
[DEBUG 2019-05-31T15:25:33 API] Follow redirects: never
17
[DEBUG 2019-05-31T15:25:33 Connection] Registered: foreman
18
[ INFO 2019-05-31T15:25:33 Modules] Extension module hammer_cli_foreman (0.14.0) loaded.
19
[DEBUG 2019-05-31T15:25:33 Init] Using locale 'en'
20
[DEBUG 2019-05-31T15:25:33 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.14.0/locale'
21
[DEBUG 2019-05-31T15:25:33 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.14.0/locale'
22
[ INFO 2019-05-31T15:25:33 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
23
[ INFO 2019-05-31T15:25:33 HammerCLIForeman::Host] Called with options: {}
24
[ INFO 2019-05-31T15:25:33 API] Server: https://foreman.rdu2.scalelab.redhat.com
25
[ INFO 2019-05-31T15:25:33 API] GET /api/hosts
26
[DEBUG 2019-05-31T15:25:33 API] Params: {
27
    :search => "name = \"f21-h18-000-r620.rdu2.scalelab.redhat.com\""
28
}
29
[DEBUG 2019-05-31T15:25:33 API] Headers: {
30
    :params => {
31
        :search => "name = \"f21-h18-000-r620.rdu2.scalelab.redhat.com\""
32
    }
33
}
34
[DEBUG 2019-05-31T15:25:33 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
35
[DEBUG 2019-05-31T15:25:33 API] Response: {
36
       "total" => 575,
37
    "subtotal" => 1,
38
        "page" => 1,
39
    "per_page" => 1000,
40
      "search" => "name = \"f21-h18-000-r620.rdu2.scalelab.redhat.com\"",
41
        "sort" => {
42
           "by" => nil,
43
        "order" => nil
44
    },
45
     "results" => [
46
        [0] {
47
                               "ip" => "10.1.42.202",
48
                              "ip6" => "",
49
                   "environment_id" => 1,
50
                 "environment_name" => "production",
51
                      "last_report" => nil,
52
                              "mac" => "b8:ca:3a:63:87:b0",
53
                         "realm_id" => nil,
54
                       "realm_name" => nil,
55
                           "sp_mac" => nil,
56
                            "sp_ip" => nil,
57
                          "sp_name" => nil,
58
                        "domain_id" => 1,
59
                      "domain_name" => "rdu2.scalelab.redhat.com",
60
                  "architecture_id" => 1,
61
                "architecture_name" => "x86_64",
62
               "operatingsystem_id" => 2,
63
             "operatingsystem_name" => "RHEL 7",
64
                        "subnet_id" => 4,
65
                      "subnet_name" => "rdu2_mgmt3",
66
                       "subnet6_id" => nil,
67
                     "subnet6_name" => nil,
68
                     "sp_subnet_id" => nil,
69
                        "ptable_id" => 107,
70
                      "ptable_name" => "generic-rhel7",
71
                        "medium_id" => 11,
72
                      "medium_name" => "RHEL Local",
73
                       "pxe_loader" => "PXELinux BIOS",
74
                            "build" => true,
75
                          "comment" => "",
76
                             "disk" => "",
77
                     "installed_at" => nil,
78
                         "model_id" => nil,
79
                     "hostgroup_id" => 2,
80
                         "owner_id" => 4,
81
                       "owner_name" => "Admin User",
82
                       "owner_type" => "User",
83
                          "enabled" => true,
84
                          "managed" => true,
85
                        "use_image" => nil,
86
                       "image_file" => "",
87
                             "uuid" => nil,
88
              "compute_resource_id" => nil,
89
            "compute_resource_name" => nil,
90
               "compute_profile_id" => nil,
91
             "compute_profile_name" => nil,
92
                     "capabilities" => [
93
                [0] "build"
94
            ],
95
                 "provision_method" => "build",
96
                         "certname" => "f21-h18-000-r620.rdu2.scalelab.redhat.com",
97
                         "image_id" => nil,
98
                       "image_name" => nil,
99
                       "created_at" => "2019-03-12 18:58:02 UTC",
100
                       "updated_at" => "2019-05-31 15:23:44 UTC",
101
                     "last_compile" => nil,
102
                    "global_status" => 0,
103
              "global_status_label" => "OK",
104
                    "puppet_status" => 0,
105
                       "model_name" => nil,
106
                     "build_status" => 1,
107
               "build_status_label" => "Pending installation",
108
                             "name" => "f21-h18-000-r620.rdu2.scalelab.redhat.com",
109
                               "id" => 480,
110
                  "puppet_proxy_id" => nil,
111
                "puppet_proxy_name" => nil,
112
               "puppet_ca_proxy_id" => nil,
113
             "puppet_ca_proxy_name" => nil,
114
                     "puppet_proxy" => nil,
115
                  "puppet_ca_proxy" => nil,
116
                   "hostgroup_name" => "Production",
117
                  "hostgroup_title" => "Production"
118
        }
119
    ]
120
}
121
[DEBUG 2019-05-31T15:25:33 API] Response headers: {
122
                                 :date => "Fri, 31 May 2019 15:25:33 GMT",
123
                               :server => "Apache/2.4.6 (CentOS)",
124
                      :foreman_version => "1.19.1",
125
                  :foreman_api_version => "2",
126
                      :apipie_checksum => "168c3600e744d9af1db2f53be93f02db2a338009",
127
                        :cache_control => "max-age=0, private, must-revalidate",
128
                         :x_request_id => "0c5970e6-e0ca-4d87-826d-da7365beaabd",
129
                            :x_runtime => "0.135353",
130
              :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
131
            :strict_transport_security => "max-age=631139040; includeSubdomains",
132
               :x_content_type_options => "nosniff",
133
                   :x_download_options => "noopen",
134
                      :x_frame_options => "sameorigin",
135
    :x_permitted_cross_domain_policies => "none",
136
                     :x_xss_protection => "1; mode=block",
137
                         :x_powered_by => "Phusion Passenger 4.0.53",
138
                           :set_cookie => [
139
        [0] "_session_id=fd38469a7706a770be8bbd7ee72a90dd; path=/; secure; HttpOnly; SameSite=Lax"
140
    ],
141
                                 :etag => "W/\"d8aa88fb894015097e0ba14f576fa8b2-gzip\"",
142
                               :status => "200 OK",
143
                                 :vary => "Accept-Encoding",
144
                     :content_encoding => "gzip",
145
                       :content_length => "728",
146
                         :content_type => "application/json; charset=utf-8"
147
}
148
[ INFO 2019-05-31T15:25:33 HammerCLIForeman::Host::UpdateCommand] Called with options: {"option_puppetclass_ids"=>[], "option_volume_list"=>[], "option_interface_list"=>[], "option_name"=>"f21-h18-000-r620.rdu2.scalelab.redhat.com", "option_id"=>480, "option_build"=>true}
149
[ INFO 2019-05-31T15:25:34 API] Server: https://foreman.rdu2.scalelab.redhat.com
150
[ INFO 2019-05-31T15:25:34 API] PUT /api/hosts/480
151
[DEBUG 2019-05-31T15:25:34 API] Params: {
152
    "host" => {
153
                              "name" => "f21-h18-000-r620.rdu2.scalelab.redhat.com",
154
                   "puppetclass_ids" => [],
155
                             "build" => true,
156
                "compute_attributes" => {
157
            "volumes_attributes" => {}
158
        },
159
        "host_parameters_attributes" => [],
160
             "interfaces_attributes" => []
161
    }
162
}
163
[DEBUG 2019-05-31T15:25:34 API] Headers: {}
164
[DEBUG 2019-05-31T15:25:34 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
165
[DEBUG 2019-05-31T15:25:34 API] Response: {
166
                       "ip" => "10.1.42.202",
167
                      "ip6" => "",
168
           "environment_id" => 1,
169
         "environment_name" => "production",
170
              "last_report" => nil,
171
                      "mac" => "b8:ca:3a:63:87:b0",
172
                 "realm_id" => nil,
173
               "realm_name" => nil,
174
                   "sp_mac" => nil,
175
                    "sp_ip" => nil,
176
                  "sp_name" => nil,
177
                "domain_id" => 1,
178
              "domain_name" => "rdu2.scalelab.redhat.com",
179
          "architecture_id" => 1,
180
        "architecture_name" => "x86_64",
181
       "operatingsystem_id" => 2,
182
     "operatingsystem_name" => "RHEL 7",
183
                "subnet_id" => 4,
184
              "subnet_name" => "rdu2_mgmt3",
185
               "subnet6_id" => nil,
186
             "subnet6_name" => nil,
187
             "sp_subnet_id" => nil,
188
                "ptable_id" => 107,
189
              "ptable_name" => "generic-rhel7",
190
                "medium_id" => 11,
191
              "medium_name" => "RHEL Local",
192
               "pxe_loader" => "PXELinux BIOS",
193
                    "build" => true,
194
                  "comment" => "",
195
                     "disk" => "",
196
             "installed_at" => nil,
197
                 "model_id" => nil,
198
             "hostgroup_id" => 2,
199
                 "owner_id" => 4,
200
               "owner_name" => "Admin User",
201
               "owner_type" => "User",
202
                  "enabled" => true,
203
                  "managed" => true,
204
                "use_image" => nil,
205
               "image_file" => "",
206
                     "uuid" => nil,
207
      "compute_resource_id" => nil,
208
    "compute_resource_name" => nil,
209
       "compute_profile_id" => nil,
210
     "compute_profile_name" => nil,
211
             "capabilities" => [
212
        [0] "build"
213
    ],
214
         "provision_method" => "build",
215
                 "certname" => "f21-h18-000-r620.rdu2.scalelab.redhat.com",
216
                 "image_id" => nil,
217
               "image_name" => nil,
218
               "created_at" => "2019-03-12 18:58:02 UTC",
219
               "updated_at" => "2019-05-31 15:23:44 UTC",
220
             "last_compile" => nil,
221
            "global_status" => 0,
222
      "global_status_label" => "OK",
223
            "puppet_status" => 0,
224
               "model_name" => nil,
225
             "build_status" => 1,
226
       "build_status_label" => "Pending installation",
227
                     "name" => "f21-h18-000-r620.rdu2.scalelab.redhat.com",
228
                       "id" => 480,
229
          "puppet_proxy_id" => nil,
230
        "puppet_proxy_name" => nil,
231
       "puppet_ca_proxy_id" => nil,
232
     "puppet_ca_proxy_name" => nil,
233
             "puppet_proxy" => nil,
234
          "puppet_ca_proxy" => nil,
235
           "hostgroup_name" => "Production",
236
          "hostgroup_title" => "Production",
237
               "parameters" => [],
238
           "all_parameters" => [],
239
               "interfaces" => [
240
        [0] {
241
                    "id" => 830,
242
                  "name" => "f21-h18-000-r620.rdu2.scalelab.redhat.com",
243
                    "ip" => "10.1.42.202",
244
                   "ip6" => "",
245
                   "mac" => "b8:ca:3a:63:87:b0",
246
                   "mtu" => 1500,
247
                  "fqdn" => "f21-h18-000-r620.rdu2.scalelab.redhat.com",
248
            "identifier" => "em1",
249
               "primary" => true,
250
             "provision" => true,
251
                  "type" => "interface"
252
        },
253
        [1] {
254
                    "id" => 831,
255
                  "name" => "mgmt-f21-h18-000-r620.rdu2.scalelab.redhat.com",
256
                    "ip" => "10.1.42.49",
257
                   "ip6" => "",
258
                   "mac" => "e0:db:55:12:db:06",
259
                   "mtu" => 1500,
260
                  "fqdn" => "mgmt-f21-h18-000-r620.rdu2.scalelab.redhat.com",
261
            "identifier" => "mgmt",
262
               "primary" => false,
263
             "provision" => false,
264
                  "type" => "interface"
265
        }
266
    ],
267
            "puppetclasses" => [],
268
            "config_groups" => [],
269
        "all_puppetclasses" => [],
270
              "permissions" => {
271
             "view_hosts" => true,
272
           "create_hosts" => true,
273
             "edit_hosts" => true,
274
          "destroy_hosts" => true,
275
            "build_hosts" => true,
276
            "power_hosts" => true,
277
          "console_hosts" => true,
278
        "ipmi_boot_hosts" => true,
279
        "puppetrun_hosts" => true
280
    }
281
}
282
[DEBUG 2019-05-31T15:25:34 API] Response headers: {
283
                                 :date => "Fri, 31 May 2019 15:25:34 GMT",
284
                               :server => "Apache/2.4.6 (CentOS)",
285
                      :foreman_version => "1.19.1",
286
                  :foreman_api_version => "2",
287
                      :apipie_checksum => "168c3600e744d9af1db2f53be93f02db2a338009",
288
                        :cache_control => "max-age=0, private, must-revalidate",
289
                         :x_request_id => "8935317a-e2cf-4e97-9ab6-009a33f0651f",
290
                            :x_runtime => "0.381676",
291
              :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
292
            :strict_transport_security => "max-age=631139040; includeSubdomains",
293
               :x_content_type_options => "nosniff",
294
                   :x_download_options => "noopen",
295
                      :x_frame_options => "sameorigin",
296
    :x_permitted_cross_domain_policies => "none",
297
                     :x_xss_protection => "1; mode=block",
298
                         :x_powered_by => "Phusion Passenger 4.0.53",
299
                           :set_cookie => [
300
        [0] "request_method=PUT; path=/; secure; HttpOnly; SameSite=Lax",
301
        [1] "_session_id=7500a0ed606db21821d289fd06d07acd; path=/; secure; HttpOnly; SameSite=Lax"
302
    ],
303
                                 :etag => "W/\"f8271bd34e55c9d28622ddb8659482f0-gzip\"",
304
                               :status => "200 OK",
305
                                 :vary => "Accept-Encoding",
306
                     :content_encoding => "gzip",
307
                       :content_length => "854",
308
                         :content_type => "application/json; charset=utf-8"
309
}
310
Host updated.