Commit Graph

32503 Commits

Author SHA1 Message Date
Kia Lam 3333080616 Remove 'hop' node type from Add Instance form. 2022-09-23 09:46:13 -04:00
Kia Lam e2b9352dad Replace Chip with Label component for IG labels. 2022-09-23 09:46:13 -04:00
Kia Lam da945eed93 Fix node state. 2022-09-23 09:46:13 -04:00
Jeff Bradberry ebd200380a Resolve a deadlock in write_receptor_config() 2022-09-23 09:46:13 -04:00
Jeff Bradberry 1b650d6927 When deprovisioning a node, kick off a task that waits on running jobs
After all jobs on the node are complete, delete the node then
broadcast the write_receptor_config task.

Also, make sure that write_receptor_config updates the state of links
that are in 'adding' state.
2022-09-23 09:46:13 -04:00
Jeff Bradberry b6946c7e35 Update API to support setting instances to Deprovisioning
- allow the node_state to be set to deprovisioning
- set the links that touch the instance to removing
- only allow on K8S
- only allow to be done to execution nodes
2022-09-23 09:46:13 -04:00
Hao Liu 0b1891d82a generate complete install bundle
```
➜  34.213.5.206_install_bundle git:(instance-install-bundle-content) ✗ tree
.
├── install_receptor.yml
├── inventory.yml
├── receptor
│   ├── tls
│   │   ├── ca
│   │   │   └── receptor-ca.crt
│   │   ├── receptor.crt
│   │   └── receptor.key
│   └── work-public-key.pem
└── requirements.yml
```

Signed-off-by: Hao Liu <haoli@redhat.com>
2022-09-23 09:46:13 -04:00
Jeff Bradberry 3bc86ca8cb Follow up on new execution node creation
- hop nodes are descoped
- links need to be created on execution node creation
- expose the 'edit' capabilities on the instance serializer
2022-09-23 09:46:13 -04:00
Kia Lam dba03616f4 Fix unit tests. 2022-09-23 09:46:13 -04:00
Kia Lam a59aa44249 Update status label to reflect instance node states. 2022-09-23 09:46:13 -04:00
Seth Foster 3b024a057f Allow work signing for execution node (#12771)
- work-signing added to the generated receptor config
- During receptor task submission, signwork is True when submitting to
  an execution node
2022-09-23 09:46:13 -04:00
Kia Lam e1c33935fb Properly show Peers tab in UI. 2022-09-23 09:46:13 -04:00
Kia Lam 8ebeeaf148 Add correct permissions for memory capacity slider. 2022-09-23 09:46:13 -04:00
Kia Lam 28f24c8811 Represent enabled field in Topology View:
- use dotted circles to represent `enabled: false`
- use solid circle stroke to represent `enabled: true`
- excise places where `Unavailable` node state is used in the UI.
2022-09-23 09:46:12 -04:00
Kia Lam 89a6162dcd Add new node details; update legend. 2022-09-23 09:46:12 -04:00
Alex Corey 7e627e1d1e Adds Instance Peers Tab and update Instance Details view with more data (#12655)
* Adds InstancePeers tab and updates details view

* attempt to fix failing api tests
2022-09-23 09:46:12 -04:00
Jeff Bradberry 0465a10df5 Deal with exceptions when running execution_node_health_check (#12733) 2022-09-23 09:46:12 -04:00
Hao Liu 5051224781 conditionally show install_bundle link for instances (#12679)
- only show install_bundle link for k8s
- only show install_bundle link for execution and hop nodes
2022-09-23 09:46:12 -04:00
TheRealHaoLiu 7956fc3c31 add instance install bundle endpoint
add scaffolding for instance install_bundle endpoint

- add instance_install_bundle view (does not do anything yet)
- add `instance_install_bundle` related field to serializer
- add `/install_bundle` to instance URL
- `/install_bundle` only available for execution and hop node
- `/install_bundle` endpoint response contain a downloadable tgz with moc data

TODO: add actual data to the install bundle response

Signed-off-by: Hao Liu <haoli@redhat.com>
2022-09-23 09:46:12 -04:00
Shane McDonald 9b034ad574 generate control node receptor.conf
when a new remote execution/hop node is added
regenerate the receptor.conf for all control node to
peer out to the new remote execution node

Signed-off-by: Hao Liu <haoli@redhat.com>
Co-Authored-By: Seth Foster <fosterseth@users.noreply.github.com>
Co-Authored-By: Shane McDonald <me@shanemcd.com>
2022-09-23 09:46:12 -04:00
Kia Lam 4bf9925cf7 Topology changes:
- add new node and link states
    - add directionality to links
    - update icons
2022-09-23 09:46:12 -04:00
Alex Corey d2c63a9b36 Adds tests 2022-09-23 09:46:12 -04:00
Alex Corey 5d3a19e542 Adds Instance Add form 2022-09-23 09:46:12 -04:00
Jeff Bradberry e4518f7b13 Changes in posting constraints due to rescoping to OCP/K8S-only
- node_state is now read only
- node_state gets set automatically to Installed in the create view
- raise a validation error when creating on non-K8S
- allow SystemAdministrator the 'add' permission for Instances
- expose the new listener_port field
2022-09-23 09:46:12 -04:00
Sarabraj Singh 350efc12f5 machinery to allow POSTing payloads to instances/ endpoint 2022-09-23 09:46:12 -04:00
Jeff Bradberry 604fac2295 Update task management to only do things with ready instances 2022-09-23 09:46:11 -04:00
Jeff Bradberry 24bfacb654 Check state when processing receptorctl advertisements
Nodes that show up and were in one of the unready states need to be
transitioned to ready, even if the logic in Instance.is_lost was not
met.
2022-09-23 09:46:11 -04:00
Jeff Bradberry 3bcd539b3d Make sure that the health checks handle the state transitions properly
- nodes with states Provisioning, Provisioning Fail, Deprovisioning,
  and Deprovisioning Fail should bypass health checks and should never
  transition due to the existing machinery
- nodes with states Unavailable and Installed can transition to Ready
  if they check out as healthy
- nodes in the Ready state should transition to Unavailable if they
  fail a check
2022-09-23 09:46:11 -04:00
Jeff Bradberry 81e68cb9bf Update node and link registration to put them in the right state
'Installed' for the nodes, 'Established' for the links.
2022-09-23 09:46:11 -04:00
Jeff Bradberry a575f17db5 Add the state fields and the peer relationships to the serializers 2022-09-23 09:46:11 -04:00
Jeff Bradberry 2fba3db48f Add state fields to Instance and InstanceLink
Also, listener_port to Instance.
2022-09-23 09:46:11 -04:00
Alan Rominger ff6fb32297 Merge pull request #12875 from ansible/feature-prompt-on-launch-on-templates
Feature prompt on launch on templates
2022-09-23 09:16:02 -04:00
Oleksii Baranov 4c64fb3323 Ensure schedule collection test has enough hosts for slices 2022-09-22 16:08:23 -04:00
John Westcott IV 1cfbc02d98 Collection test fixes from prompting changes
DNE can sometimes be dne depending on versions, fixing test to find either

Adding additional node to Demo Inventory for job slice counting
2022-09-22 16:08:23 -04:00
Alan Rominger e231e08869 Fix bug with missing parent field and diff with parent
Remove corresponding views for job instance_groups

Validate job_slice_count in API

Remove defaults from some job launch view prompts
  the null default is preferable
2022-09-22 16:08:23 -04:00
mabashian e069150fbf Removes fetching of default instance groups in the UI on launch and schedule/node creation 2022-09-22 16:08:23 -04:00
Alan Rominger 61093b2532 Treat instance_groups prompt as template-less 2022-09-22 16:08:22 -04:00
mabashian 23f4f7bb00 Remove duplicate Limit detail on schedule
Bumps migration number from 0168 to 0169

Make labels and IGs requests synchronously when getting launch data

Moves label creation out to a util
2022-09-22 16:08:22 -04:00
Alan Rominger 816e491d17 Fix another bug applying extra_vars to incompatible job types 2022-09-22 16:08:22 -04:00
John Westcott IV dca27b59c9 Fixing is_detached methods' filters 2022-09-22 16:08:22 -04:00
Sarabraj Singh 7de5f77262 adding test coverage to ensure that FIELDS_TO_PRESERVE_AT_COPY is behaving as expected for WFJTs 2022-09-22 16:08:22 -04:00
John Westcott IV 86e7151508 Get more specific as to which timeout caused the issue 2022-09-22 16:08:21 -04:00
John Westcott IV 75597cf29c Altering --timeout from awxkit to --action-timeout to remove conflict with new launch timeout 2022-09-22 16:08:21 -04:00
Oleksii Baranov d07177be9c Add additional schedule fields for new prompts 2022-09-22 16:08:21 -04:00
Alan Rominger b38e08174a Write logic to combing workflow labels, IGs with nodes
Additionally, move the inventory-specific hacks of yesteryear
  into the prompts_dict method of the WorkflowJob model
  try to make it clear exactly what this is hacking and why

Correctly summarize label prompts, and add missing EE

Expand unit tests to apply more fields

adding missing fields to preserve during copy to workflow.py

Fix bug where empty workflow job vars blanked node vars (#12904)

* Fix bug where empty workflow job vars blanked node vars

* Fix bug where workflow job has no extra_vars, add test

* Add empty workflow job extra vars to assure fix
2022-09-22 16:08:07 -04:00
John Westcott IV b501b30db4 Changing label functions to account for new relationships
Removing unreferenced get_orphaned_labels

Forcing forks and job_slice_count to be >=0
2022-09-22 16:08:06 -04:00
Alan Rominger 64dad61b29 Add support for instance_groups and labels on schedule create 2022-09-22 16:08:06 -04:00
Sarabraj Singh 2369dc9621 adding fix for labels pushdown on workflow job nodes 2022-09-22 16:08:06 -04:00
Alan Rominger ef90adb67e Complete consolidation of the label views 2022-09-22 16:08:06 -04:00
John Westcott IV a528a78e0e Fixing serializers per review
Removing try/except around instance_groups

Removing redefined execution_environment

Reordering labels/creds/igs/ee/etc

Removing special treatment for EEs when doing setattrs

Adding help_text to execution environments

Adding EE serializer on JobCreateScheduleSerializer
2022-09-22 16:07:53 -04:00