Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-13631

Agents not capable of running deployment tasks still show as available agents

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 5.6.0
    • None
    • Deployments

      When assigning agents to an environment, agents that are not able to complete all the tasks required are still listed. Our documentation states that "Only agents applicable to the deployment environment will be available for selection," which is not true.

      In my test instance, I removed the Ant Capability^agent.png from one of my Remote Agents, and [added a task for Ant to my environment^antneeded.png]. However, the agent it is still listed as a "capable server" when looking at either the tasks view^tasksview.png for my deployment environment, or when setting a dedicated agent^dedicated.png for the environment.

      This is problematic because Bamboo will chose a capable agent if you do not set a dedicated agent. This is from the "Edit agents" page:

      If you do not assign an agent to this deployment, one will be chosen at run time according to standard requirement/capability mappings.

      If an agent cannot perform all of the tasks because it lacks a capability, it should not be listed. Moreover, Bamboo will still attempt to use this server, and if it does, the deployment will fail needlessly.

        1. agent.png
          agent.png
          208 kB
        2. dedicated.png
          dedicated.png
          117 kB
        3. needsant.png
          needsant.png
          111 kB
        4. tasksview.png
          tasksview.png
          146 kB

            [BAM-13631] Agents not capable of running deployment tasks still show as available agents

            rajinel.prasad@optiver.com.au Unfortunately this fix does not work for Cloud instances. Any other suggestions in this case?

            Dimitris Stafylarakis added a comment - rajinel.prasad@optiver.com.au Unfortunately this fix does not work for Cloud instances. Any other suggestions in this case?

            Raj Prasad added a comment -

            @Jeremy Frederick
            This has been fixed using plugin: 'Requirement for Deployments' https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugin.requirementtask

            Raj Prasad added a comment - @Jeremy Frederick This has been fixed using plugin: 'Requirement for Deployments' https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugin.requirementtask

            +1 on this. Instead of having to add a custom capability to an agent in order to force it to use that agent, it would be great to add a similar functionality as dedicated agent, but allowing that agent to still be used by other builds.

            Jeremy Frederick added a comment - +1 on this. Instead of having to add a custom capability to an agent in order to force it to use that agent, it would be great to add a similar functionality as dedicated agent, but allowing that agent to still be used by other builds.

            James,
            The issue relates to deploys, builds are OK with determining which servers they are suitable for. However, it is not possible to ensure that an agent running on Linux only picks up the Linux deploys and that an agent on windows only picks up the windows deploys.
            Obviously if a deploy for a Linux box has a Linux specific SSH piece in it, then when arbitrarily picked up by the Windows agent, it just isn't going to work.
            There is no way of ensuring that a deploy only works with an agent that has the correct capabilities, unless you use the (fairly useless) feature of dedicating an agent to a deploy.
            The requirement is to provide the same capability matching for deploys as occurs with builds.
            Hopefully I have all that right and plain enough.
            Cheers,
            David

            David Armitage added a comment - James, The issue relates to deploys, builds are OK with determining which servers they are suitable for. However, it is not possible to ensure that an agent running on Linux only picks up the Linux deploys and that an agent on windows only picks up the windows deploys. Obviously if a deploy for a Linux box has a Linux specific SSH piece in it, then when arbitrarily picked up by the Windows agent, it just isn't going to work. There is no way of ensuring that a deploy only works with an agent that has the correct capabilities, unless you use the (fairly useless) feature of dedicating an agent to a deploy. The requirement is to provide the same capability matching for deploys as occurs with builds. Hopefully I have all that right and plain enough. Cheers, David

            roy.lyons@cmegroup.com the SSH task doesn't work on Windows? That sounds rather serious. Have you a support case or issue I could read about this problem?

            James Dumay added a comment - roy.lyons@cmegroup.com the SSH task doesn't work on Windows? That sounds rather serious. Have you a support case or issue I could read about this problem?

            Hi there,

            My sincere apologies for the radio silence on this ticket. This only came to my attention today and I'm not sure how it slipped through the cracks.

            Let me know if I have the problem straight and what you guys believe the right solution is:

            1. Dedicate agent lists agents that do not have the capabilities to run the deployment. We should be indicating for all agents dedicated to the environment if it has the right capabilities or not.
            2. Task screen shows "available agents" that are not the assigned agents or agents that have the capabilities to run the deployment. The information is plain wrong and needs to be fixed.

            Ill move this over to our internal backlog now and prioritise a fix.

            Thanks,
            James

            James Dumay added a comment - Hi there, My sincere apologies for the radio silence on this ticket. This only came to my attention today and I'm not sure how it slipped through the cracks. Let me know if I have the problem straight and what you guys believe the right solution is: Dedicate agent lists agents that do not have the capabilities to run the deployment. We should be indicating for all agents dedicated to the environment if it has the right capabilities or not. Task screen shows "available agents" that are not the assigned agents or agents that have the capabilities to run the deployment. The information is plain wrong and needs to be fixed. Ill move this over to our internal backlog now and prioritise a fix. Thanks, James

            I am sure someone from Atlassian must be reading these, but please, please, at least indicate some kind of acknowledgement so we aren't left feeling as though we are totally wasting our time? I note is assigned, but I would expect assignee to answer question comments in some way.
            If it helps for Chris and Roy, we have had to develop a blocking process, such that when we have a deploy scheduled for our Windows box, it runs a 5 minutes before schedule that blocks the agent on the Linux box with a simple 10 minute build wait job. A real kludge, but gets us by for our simple needs. If you have more agents or more variable deploys, then may not work for you.

            David Armitage added a comment - I am sure someone from Atlassian must be reading these, but please, please, at least indicate some kind of acknowledgement so we aren't left feeling as though we are totally wasting our time? I note is assigned, but I would expect assignee to answer question comments in some way. If it helps for Chris and Roy, we have had to develop a blocking process, such that when we have a deploy scheduled for our Windows box, it runs a 5 minutes before schedule that blocks the agent on the Linux box with a simple 10 minute build wait job. A real kludge, but gets us by for our simple needs. If you have more agents or more variable deploys, then may not work for you.

            As a member of the disgruntled team, I echo Roy's comments. This is heavily impacting our DEV cycle; roughly 1 in 3 deployments are failing because of this, and given that we can do up to 60 deployments in a day, that's no negligible chunk. ANY workaround or fix to this would be appreciated.

            Christopher Mayne added a comment - As a member of the disgruntled team, I echo Roy's comments. This is heavily impacting our DEV cycle; roughly 1 in 3 deployments are failing because of this, and given that we can do up to 60 deployments in a day, that's no negligible chunk. ANY workaround or fix to this would be appreciated.

            roy_lyons added a comment -

            Just another voice in the wilderness... have a team upset that their deploy fails because the ssh task doesn't work on windows... and they can't prevent it from running on windows (you should be able to select a custom attribute like operating system at least...)

            roy_lyons added a comment - Just another voice in the wilderness... have a team upset that their deploy fails because the ssh task doesn't work on windows... and they can't prevent it from running on windows (you should be able to select a custom attribute like operating system at least...)

            Is anyone actually doing anything with this?
            It is becoming more and more critical, and ass per Jeff above, I cannot believe it doesn't seem to be being processed by anyone at Atlassian.
            We have a temporary fix (kludge) for anyone reading this, basically we schedule a build which contains a 10 minute wait on the platform(s) we don't want the deploy on so that the only available agent when the scheduled deploy happens is the remaining platform we want the build on. It's horrible and unextensible.

            Is this even acknowledged as a bug and going to be worked on at some time????

            David Armitage added a comment - Is anyone actually doing anything with this? It is becoming more and more critical, and ass per Jeff above, I cannot believe it doesn't seem to be being processed by anyone at Atlassian. We have a temporary fix (kludge) for anyone reading this, basically we schedule a build which contains a 10 minute wait on the platform(s) we don't want the deploy on so that the only available agent when the scheduled deploy happens is the remaining platform we want the build on. It's horrible and unextensible. Is this even acknowledged as a bug and going to be worked on at some time????

              Unassigned Unassigned
              alaskowski Adam Laskowski (Inactive)
              Affected customers:
              27 This affects my team
              Watchers:
              26 Start watching this issue

                Created:
                Updated:
                Resolved: