Giter Site home page Giter Site logo

Comments (7)

ogajduse avatar ogajduse commented on May 27, 2024

My broker_settings.yaml:

    # Broker settings
    debug: True
    inventory_file: "inventory.yaml"
    # Host Settings
    host_username: "root"
    host_password: "redhat"
     
    # Provider settings
    AnsibleTower:
      instances:
        - rhv:
            base_url: "https://infra-ansible-tower-01.infra.ourdomain.com/"
            # username: "ogajduse"
            # password: ""
            token: mytoken
            default: True
        - osp:
            base_url: "https://infra-ansible-tower-01.infra.ourdomain.com/"
            # username: "ogajduse"
            # password: ""
            token: mytoken
            inventory: "satlab-osp-01-inventory"
        - testing:
            base_url: "https://dhcp-2-80.vms.ourdomain.com/"
            #username: ""
            #password: ""
            inventory: "satlab-rhv-02-inventory"
            username: ogajduse
            password: ""
            #default: True
      release_workflow: "remove-vm"
      extend_workflow: "extend-vm"
      workflow_timeout: 3600
      #results_limit: 50

from broker.

ogajduse avatar ogajduse commented on May 27, 2024

my venv:

awxkit==17.1.0
broker @ file:///home/ogajduse/qa_repos/satelliteqe-github/broker
certifi==2020.12.5
chardet==4.0.0
click==7.1.2
dynaconf==3.1.4
idna==2.10
logzero==1.7.0
PyYAML==5.4.1
requests==2.25.1
ssh2-python==0.26.0
urllib3==1.26.4

from broker.

jarovo avatar jarovo commented on May 27, 2024

I found out that the _act method gets called first with proivder AnsibleTower and method execute. Then it is called with same provider and method None

(Pdb) ll
121         def _checkout(self):
122             """checkout one or more VMs
123     
124             :return: List of Host objects
125             """
126             hosts = []
127             if not self._provider_actions:
128                 raise self.BrokerError("Could not determine an appropriate provider")
129             for action in self._provider_actions.keys():
130                 provider, method = PROVIDER_ACTIONS[action]
131                 logger.info(f"Using provider {provider.__name__} to checkout")
132                 try:
133  ->                 host = self._act(provider, method, checkout=True)
134                 except exceptions.ProviderError:
135                     host = None
136                 logger.debug(f"host={host}")
137                 if host:
138                     hosts.append(host)
139                     logger.info(f"{host.__class__.__name__}: {host.hostname}")
140             return hosts
(Pdb) PROVIDER_ACTIONS
{'workflow': (<class 'broker.providers.ansible_tower.AnsibleTower'>, 'execute'), 'job_template': (<class 'broker.providers.ansible_tower.AnsibleTower'>, 'execute'), 'template': (<class 'broker.providers.ansible_tower.AnsibleTower'>, None), 'test_action': (<class 'broker.providers.test_provider.TestProvider'>, 'test_action'), 'inventory': (<class 'broker.providers.ansible_tower.AnsibleTower'>, None)}
(Pdb) action
'template'
(Pdb) provider
<class 'broker.providers.ansible_tower.AnsibleTower'>
(Pdb) print(method)
None

from broker.

JacobCallahan avatar JacobCallahan commented on May 27, 2024

@JaryN what is the value of self._provider_actions in the reproducer?

from broker.

jarovo avatar jarovo commented on May 27, 2024

A reproducer that doesn't take so long time is
broker --log-level debug checkout --template deploy-sat-jenkins

from broker.

JacobCallahan avatar JacobCallahan commented on May 27, 2024

A reproducer that doesn't take so long time is
broker --log-level debug checkout --template deploy-sat-jenkins

templates are not valid checkout actions for AnsibleTower, which is why they aren't listed under the help output for checkout

from broker.

ogajduse avatar ogajduse commented on May 27, 2024

I did not realized that I reported duplicate of the issue that I reported earlier.
As I stated in #136, We agreed with @rdrazny that --template is a valid option that can be passed to a workflow.
Do we know what is causing broker to fail with such error?

from broker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.