Project

General

Profile

Actions

Bug #16240

closed

module_enabled? in post hook returns true when module is disabled

Added by Stefan Heijmans over 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
foreman-installer script
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

After an install of foreman 1.12.1 with just foreman/foreman-cli selected, it shows at the end that the foreman-proxy and puppetmaster are also running.

foreman-installer -i
    Main Config Menu
    1. [✓] Configure foreman
    2. [✓] Configure foreman_cli
    3. [✗] Configure foreman_proxy
    4. [✗] Configure puppet
    5. [✗] Configure foreman_plugin_ansible
    6. [✗] Configure foreman_plugin_bootdisk
    7. [✗] Configure foreman_plugin_chef
    8. [✗] Configure foreman_plugin_cockpit
    9. [✗] Configure foreman_plugin_default_hostgroup
    10. [✗] Configure foreman_plugin_dhcp_browser
    11. [✗] Configure foreman_plugin_digitalocean
    12. [✗] Configure foreman_plugin_discovery
    13. [✗] Configure foreman_plugin_docker
    14. [✗] Configure foreman_plugin_hooks
    15. [✗] Configure foreman_plugin_memcache
    16. [✗] Configure foreman_plugin_openscap
    17. [✗] Configure foreman_plugin_puppetdb
    18. [✗] Configure foreman_plugin_remote_execution
    19. [✗] Configure foreman_plugin_salt
    20. [✓] Configure foreman_plugin_setup
    21. [✗] Configure foreman_plugin_tasks
    22. [✗] Configure foreman_plugin_templates
    23. [✗] Configure foreman_compute_ec2
    24. [✗] Configure foreman_compute_gce
    25. [✗] Configure foreman_compute_libvirt
    26. [✗] Configure foreman_compute_openstack
    27. [✗] Configure foreman_compute_ovirt
    28. [✗] Configure foreman_compute_rackspace
    29. [✗] Configure foreman_compute_vmware
    30. [✗] Configure foreman_proxy_plugin_abrt
    31. [✗] Configure foreman_proxy_plugin_chef
    32. [✗] Configure foreman_proxy_plugin_discovery
    33. [✗] Configure foreman_proxy_plugin_dns_powerdns
    34. [✗] Configure foreman_proxy_plugin_dynflow
    35. [✗] Configure foreman_proxy_plugin_openscap
    36. [✗] Configure foreman_proxy_plugin_pulp
    37. [✗] Configure foreman_proxy_plugin_remote_execution_ssh
    38. [✗] Configure foreman_proxy_plugin_salt
    39. Display current config
    40. Save and run
    41. Cancel run without Saving
    Choose an option from the menu... 40
    Installing             Done                                               [100%] [...........................................................................................................]
      Success!
      * Foreman is running at https://<fqdn>
          Initial credentials are admin / L2VqcCgu8TbeSQEW
      * Foreman Proxy is running at https://<fqdn>:8443
      * Puppetmaster is running at port 8140
      The full log is at /var/log/foreman-installer/foreman.log

These 2 lines should not be displayed, correct?
      * Foreman Proxy is running at https://<fqdn>:8443
      * Puppetmaster is running at port 8140


Related issues 1 (0 open1 closed)

Blocked by Kafo - Feature #16381: Provide module_enabled? helper in hook contextClosedDominic Cleal08/30/2016Actions
Actions #1

Updated by Dominic Cleal over 7 years ago

  • Project changed from Installer to Kafo
  • Subject changed from Foreman 1.12.1, installing only foreman & foreman-cli, shows also that the foreman-proxy and puppetmaster are running, while they are not installed by foreman-installer. to module_enabled? in post hook returns true when module is disabled

This is reproducible on the first run when disabling a module either through the CLI args or through interactive mode (above).

foreman-installer has a post hook containing:

if @kafo.config.module_enabled? 'puppet'

This is returning true (and internally, the @data variable in module_enabled? contains a Hash) when the module has just been disabled. On subsequent runs it returns false.

Actions #2

Updated by Dominic Cleal over 7 years ago

  • Blocked by Feature #16381: Provide module_enabled? helper in hook context added
Actions #3

Updated by Dominic Cleal over 7 years ago

  • Project changed from Kafo to Installer
  • Category set to foreman-installer script
  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal

I think this is actually working as designed, it's just that the hook isn't querying the PuppetModule object that contains the live state about enabled/disabled. #16381 will add a helper to Kafo to make this easier from the hook.

Actions #4

Updated by The Foreman Bot over 7 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-installer/pull/195 added
Actions #5

Updated by Dominic Cleal over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Dominic Cleal over 7 years ago

  • translation missing: en.field_release set to 160
Actions

Also available in: Atom PDF