{"action":"closed","issue":{"url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/1376","repository_url":"https://api.github.com/repos/test-kitchen/test-kitchen","labels_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/1376/labels{/name}","comments_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/1376/comments","events_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/1376/events","html_url":"https://github.com/test-kitchen/test-kitchen/issues/1376","id":301560937,"number":1376,"title":"Kitchen fails on multiple reboots of node during run. ","user":{"login":"sflaherty2009","id":17362081,"avatar_url":"https://avatars1.githubusercontent.com/u/17362081?v=4","gravatar_id":"","url":"https://api.github.com/users/sflaherty2009","html_url":"https://github.com/sflaherty2009","followers_url":"https://api.github.com/users/sflaherty2009/followers","following_url":"https://api.github.com/users/sflaherty2009/following{/other_user}","gists_url":"https://api.github.com/users/sflaherty2009/gists{/gist_id}","starred_url":"https://api.github.com/users/sflaherty2009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sflaherty2009/subscriptions","organizations_url":"https://api.github.com/users/sflaherty2009/orgs","repos_url":"https://api.github.com/users/sflaherty2009/repos","events_url":"https://api.github.com/users/sflaherty2009/events{/privacy}","received_events_url":"https://api.github.com/users/sflaherty2009/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-01T21:11:49Z","updated_at":"2018-04-16T22:09:27Z","closed_at":"2018-04-16T22:09:26Z","author_association":"NONE","body":"## Description\r\n\r\nWhen running test kitchen and setting the following reboot settings. \r\n\r\n```\r\n    name: chef_zero\r\n    retry_on_exit_code:\r\n      - 35 # 35 is the exit code signaling that the node is rebooting\r\n      - 1\r\n    max_retries: 3\r\n    multiple_converge: 3\r\n    wait_for_retry: 120\r\n    client_rb:\r\n      exit_status: :enabled # Opt-in to the standardized exit codes\r\n      client_fork: false  # Forked instances don't return the real exit code\r\n```\r\n\r\nSee kitchen.yml as follows. \r\n```\r\n---\r\n  driver:\r\n    name: azurerm\r\n    \r\n  driver_config:\r\n    subscription_id: \r\n    location: East US 2\r\n    machine_size: Standard_D1\r\n  \r\n  transport:\r\n    ssh_key: ~/.ssh/id_rsa\r\n  \r\n  provisioner:\r\n    name: chef_zero\r\n    retry_on_exit_code:\r\n      - 35 # 35 is the exit code signaling that the node is rebooting\r\n      - 1\r\n    max_retries: 3\r\n    multiple_converge: 3\r\n    wait_for_retry: 120\r\n    client_rb:\r\n      exit_status: :enabled # Opt-in to the standardized exit codes\r\n      client_fork: false  # Forked instances don't return the real exit code\r\n  \r\n  platforms:\r\n    - name: centos-7.4\r\n      driver_config:\r\n        image_urn: OpenLogic:CentOS:7.4:latest\r\n        # vnet and subnet id will work in web technology prod only. Disable otherwise.\r\n        vnet_id: /subscriptions/9fbf7025-df40-4908-b7fb-a3a2144cee91/resourceGroups/AZ-RG-Network/providers/Microsoft.Network/virtualNetworks/AZ-VN-EastUS2-02\r\n        subnet_id: AZ-SN-dvo\r\n        vm_name: testEnvSolr\r\n        vm_tags:\r\n          ostype: linux\r\n          distro: centos\r\n  \r\n  suites:\r\n    - name: default\r\n      data_bags_path: \"test/integration/data_bags\" \r\n      run_list:\r\n        - recipe[cb_env_solr::default]\r\n      attributes:\r\n  \r\n```\r\nkitchen converge survives only one restart of the machine. Upon the second reboot kitchen fails. \r\n\r\n## Kitchen Version\r\n\r\nTest Kitchen version 1.16.0\r\n\r\n```ruby\r\n Recipe: cb_dvo_resolveDNS::linux\r\n         * reboot[Reboot VM] action reboot_now[2018-03-01T17:20:39+00:00] WARN: Rebooting system immediately, requested by 'Reboot VM'\r\n       \r\n           \r\n           Running handlers:\r\n           Running handlers complete\r\n           Chef Client finished, 39/52 resources updated in 02 minutes 38 seconds\r\n       [2018-03-01T17:20:39+00:00] WARN: Rebooting server at a recipe's request. Details: {:delay_mins=>0, :reason=>\"Must restart to enable network changes.\", :timestamp=>2018-03-01 17:20:39 +0000, :requested_by=>\"Reboot VM\"}\r\n           \r\n           Running handlers:\r\n       [2018-03-01T17:20:39+00:00] ERROR: Running exception handlers\r\n           Running handlers complete\r\n       [2018-03-01T17:20:39+00:00] ERROR: Exception handlers complete\r\n           Chef Client failed. 39 resources updated in 02 minutes 38 seconds\r\n```\r\n\r\n## ChefDK Version\r\n\r\n```ruby\r\nChef Development Kit Version: 1.3.40\r\nchef-client version: 12.19.36\r\ndelivery version: master (69bfa4a76959a8d093511a90fddd7a1f7e43e354)\r\nberks version: 5.6.4\r\nkitchen version: 1.16.0\r\n```\r\n\r\n## Ruby Version\r\n\r\nIf you are not using test-kitchen via ChefDK, please provide the output of ruby --version.\r\n\r\n```ruby\r\nruby 2.0.0p648 (2015-12-16) [x86_64-linux]\r\n```\r\n\r\n## Platform Version\r\n\r\nLinux CentOS 7.4\r\n\r\n## Replication Case\r\n\r\nMultiple runs of the following ruby block. \r\n\r\nruby \r\n```\r\nreboot 'Reboot VM' do\r\n  action :reboot_now\r\n  reason 'Must restart to enable network changes.'\r\n  notifies :run, 'execute[Run chef-client after restart]', :before\r\n  only_if { node.run_state['reboot'] == 'true' }\r\nend\r\n``` \r\n\r\nfor information on how to create a good replication case.\r\n\r\n## Kitchen Output\r\n\r\n[output.txt](https://github.com/test-kitchen/test-kitchen/files/1772732/output.txt)\r\n\r\n## Kitchen Diagnose\r\n\r\nPlease include the output of `kitchen diagnose --all` or `kitchen diagnose --loader` (if the first failed).  This can be helpful in troubleshooting, so please include it in a gist.\r\n\r\nruby \r\n```---\r\ntimestamp: 2018-03-01 21:08:16 UTC\r\nkitchen_version: 1.16.0\r\nplugins:\r\n  driver:\r\n    Azurerm:\r\n      class: Kitchen::Driver::Azurerm\r\n      version: \r\n      api_version: \r\n  provisioner:\r\n    ChefZero:\r\n      class: Kitchen::Provisioner::ChefZero\r\n      version: 1.16.0\r\n      api_version: 2\r\n  transport:\r\n    Ssh:\r\n      class: Kitchen::Transport::Ssh\r\n      version: 1.16.0\r\n      api_version: 1\r\n  verifier:\r\n    Busser:\r\n      class: Kitchen::Verifier::Busser\r\n      version: 1.16.0\r\n      api_version: 1\r\nloader:\r\n  process_erb: true\r\n  process_local: true\r\n  process_global: true\r\n  global_config: \r\n  project_config:\r\n    filename: \"/data/cookbooks/cb_env_solr/.kitchen.yml\"\r\n    raw_data:\r\n      driver:\r\n        name: azurerm\r\n      driver_config:\r\n        subscription_id: \r\n        location: East US 2\r\n        machine_size: Standard_D1\r\n      transport:\r\n        ssh_key: \"~/.ssh/id_rsa\"\r\n      provisioner:\r\n        name: chef_zero\r\n        retry_on_exit_code:\r\n        - 35\r\n        - 1\r\n        max_retries: 3\r\n        multiple_converge: 3\r\n        wait_for_retry: 120\r\n        client_rb:\r\n          exit_status: \":enabled\"\r\n          client_fork: false\r\n      platforms:\r\n      - name: centos-7.4\r\n        driver_config:\r\n          image_urn: OpenLogic:CentOS:7.4:latest\r\n          vnet_id: \"/subscriptions/9fbf7025-df40-4908-b7fb-a3a2144cee91/resourceGroups/AZ-RG-Network/providers/Microsoft.Network/virtualNetworks/AZ-VN-EastUS2-02\"\r\n          subnet_id: AZ-SN-dvo\r\n          vm_name: testEnvSolr\r\n          vm_tags:\r\n            ostype: linux\r\n            distro: centos\r\n      suites:\r\n      - name: default\r\n        data_bags_path: test/integration/data_bags\r\n        run_list:\r\n        - recipe[cb_env_solr::default]\r\n        attributes: \r\n  local_config: \r\n  combined_config:\r\n    filename: \r\n    raw_data:\r\n      driver:\r\n        name: azurerm\r\n      driver_config:\r\n        subscription_id: \r\n        location: East US 2\r\n        machine_size: Standard_D1\r\n      transport:\r\n        ssh_key: \"~/.ssh/id_rsa\"\r\n      provisioner:\r\n        name: chef_zero\r\n        retry_on_exit_code:\r\n        - 35\r\n        - 1\r\n        max_retries: 3\r\n        multiple_converge: 3\r\n        wait_for_retry: 120\r\n        client_rb:\r\n          exit_status: \":enabled\"\r\n          client_fork: false\r\n      platforms:\r\n      - name: centos-7.4\r\n        driver_config:\r\n          image_urn: OpenLogic:CentOS:7.4:latest\r\n          vnet_id: \"/subscriptions/9fbf7025-df40-4908-b7fb-a3a2144cee91/resourceGroups/AZ-RG-Network/providers/Microsoft.Network/virtualNetworks/AZ-VN-EastUS2-02\"\r\n          subnet_id: AZ-SN-dvo\r\n          vm_name: testEnvSolr\r\n          vm_tags:\r\n            ostype: linux\r\n            distro: centos\r\n      suites:\r\n      - name: default\r\n        data_bags_path: test/integration/data_bags\r\n        run_list:\r\n        - recipe[cb_env_solr::default]\r\n        attributes: \r\ninstances:\r\n  default-centos-74:\r\n    platform:\r\n      os_type: unix\r\n      shell_type: bourne\r\n    state_file: {}\r\n    driver:\r\n      azure_environment: Azure\r\n      azure_resource_group_name: default-centos-74\r\n      azure_resource_group_prefix: kitchen-\r\n      azure_resource_group_suffix: ''\r\n      boot_diagnostics_enabled: 'true'\r\n      custom_data: ''\r\n      data_disks: \r\n      existing_storage_account_blob_url: ''\r\n      existing_storage_account_container: vhds\r\n      explicit_resource_group_name: \r\n      format_data_disks: false\r\n      format_data_disks_powershell_script: false\r\n      image_id: ''\r\n      image_url: ''\r\n      image_urn: OpenLogic:CentOS:7.4:latest\r\n      kitchen_root: \"/data/cookbooks/cb_env_solr\"\r\n      location: East US 2\r\n      log_level: :info\r\n      machine_size: Standard_D1\r\n      name: azurerm\r\n      os_disk_size_gb: ''\r\n      os_type: linux\r\n      password: P2ssw0rd\r\n      pre_deployment_parameters: {}\r\n      pre_deployment_template: ''\r\n      public_ip: false\r\n      storage_account_type: Standard_LRS\r\n      subnet_id: \r\n      subscription_id: \r\n      test_base_path: \"/data/cookbooks/cb_env_solr/test/integration\"\r\n      use_managed_disks: true\r\n      username: azure\r\n      vm_name: testEnvSolr\r\n      vm_tags:\r\n        ostype: linux\r\n        distro: centos\r\n      vnet_id: \"/subscriptions/9fbf7025-df40-4908-b7fb-a3a2144cee91/resourceGroups/AZ-RG-Network/providers/Microsoft.Network/virtualNetworks/AZ-VN-EastUS2-02\"\r\n      winrm_powershell_script: false\r\n    provisioner:\r\n      always_update_cookbooks: false\r\n      attributes: {}\r\n      chef_client_path: \"/bin/chef-client\"\r\n      chef_omnibus_install_options: \r\n      chef_omnibus_url: https://omnitruck.chef.io/install.sh\r\n      chef_zero_host: \r\n      chef_zero_port: 8889\r\n      client_rb:\r\n        exit_status: \":enabled\"\r\n        client_fork: false\r\n      clients_path: \r\n      command_prefix: \r\n      config_path: \r\n      cookbook_files_glob: README.*,metadata.{json,rb},attributes/**/*,definitions/**/*,files/**/*,libraries/**/*,providers/**/*,recipes/**/*,resources/**/*,templates/**/*\r\n      data_bags_path: \"/data/cookbooks/cb_env_solr/test/integration/data_bags\"\r\n      data_path: \r\n      deprecations_as_errors: false\r\n      encrypted_data_bag_secret_key_path: \r\n      enforce_idempotency: false\r\n      environments_path: \r\n      ftp_proxy: \r\n      http_proxy: \r\n      https_proxy: \r\n      json_attributes: true\r\n      kitchen_root: \"/data/cookbooks/cb_env_solr\"\r\n      log_file: \r\n      log_level: auto\r\n      max_retries: 3\r\n      multiple_converge: 3\r\n      name: chef_zero\r\n      named_run_list: {}\r\n      nodes_path: \r\n      policyfile: \r\n      policyfile_path: \r\n      profile_ruby: false\r\n      require_chef_omnibus: true\r\n      retry_on_exit_code:\r\n      - 35\r\n      - 1\r\n      roles_path: \r\n      root_path: \"/tmp/kitchen\"\r\n      ruby_bindir: \"/embedded/bin\"\r\n      run_list:\r\n      - recipe[cb_env_solr::default]\r\n      sudo: true\r\n      sudo_command: sudo -E\r\n      test_base_path: \"/data/cookbooks/cb_env_solr/test/integration\"\r\n      wait_for_retry: 120\r\n    transport:\r\n      compression: false\r\n      compression_level: 0\r\n      connection_retries: 5\r\n      connection_retry_sleep: 1\r\n      connection_timeout: 15\r\n      keepalive: true\r\n      keepalive_interval: 60\r\n      kitchen_root: \"/data/cookbooks/cb_env_solr\"\r\n      log_level: :info\r\n      max_ssh_sessions: 9\r\n      max_wait_until_ready: 600\r\n      name: ssh\r\n      port: 22\r\n      ssh_gateway: \r\n      ssh_gateway_username: \r\n      ssh_key: \"/root/.ssh/id_rsa\"\r\n      test_base_path: \"/data/cookbooks/cb_env_solr/test/integration\"\r\n      username: root\r\n    verifier:\r\n      busser_bin: \"/tmp/verifier/bin/busser\"\r\n      chef_omnibus_root: \"/opt/chef\"\r\n      command_prefix: \r\n      ftp_proxy: \r\n      http_proxy: \r\n      https_proxy: \r\n      kitchen_root: \"/data/cookbooks/cb_env_solr\"\r\n      log_level: :info\r\n      name: busser\r\n      root_path: \"/tmp/verifier\"\r\n      ruby_bindir: \"/opt/chef/embedded/bin\"\r\n      sudo: true\r\n      sudo_command: sudo -E\r\n      suite_name: default\r\n      test_base_path: \"/data/cookbooks/cb_env_solr/test/integration\"\r\n      version: busser\r\n```\r\n\r\n## NOTE:\r\n\r\nThis repository is for core issues with the Test-Kitchen framework, so if the issue is with a plugin you may be referred to file the issue with the appropriate plugin."}}
{"actor":{"display_login":"cheeseplus"}}