Professional Documents
Culture Documents
Condor Annex Spot Fleet Issue
Condor Annex Spot Fleet Issue
Environment
os: centos-release-7-9.2009.1.el7.centos.x86_64
condor: CondorVersion: 8.8.12 Nov 24 2020 BuildID: 524104 PackageID: 8.8.12-1 CondorPlatform: x86_64_CentOS7
aws cli: aws-cli/2.1.19 Python/3.7.3 Linux/3.10.0-1160.11.1.el7.x86_64 exe/x86_64.centos.7 prompt/off
The Issues
1. The instance created don't start the condor properly
2. The security groups or tags(like instance Name) are not set when run with condor_annex but works with aws cli
Questions
Steps
1. Configure aws with user credentials(this user credentials are used for on demand and that works)
2. Add resource based permission for lambda function used by condor(ID= our aws id)
ANNEX_DEFAULT_ODI_INSTANCE_PROFILE_ARN=aws-ec2-spot-fleet-tagging-role
4. Start annex
We generate the config-file using aws spot request UI, as the condor documentation recommend.
Same config file create a instance using aws cli with all the fields that we provide(like security groups and Name)
2. Same AMI that we use on demand is not working with condo_annex spot fleet settings. Below is an exception from
worker:
{
"IamFleetRole": "arn:aws:iam::ID:role/aws-ec2-spot-fleet-tagging-role",
"AllocationStrategy": "capacityOptimized",
"TargetCapacity": 1,
"SpotPrice": "0.0488",
"ValidFrom": "2021-01-19T08:11:53Z",
"ValidUntil": "2022-01-19T08:11:53Z",
"TerminateInstancesWithExpiration": true,
"LaunchSpecifications": [
{
"ImageId": "ami-0ecfbf71e15473323",
"InstanceType": "a1.medium",
"KeyName": "k8s",
"SpotPrice": "0.0288",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/xvda",
"Ebs": {
"DeleteOnTermination": true,
"VolumeType": "gp2",
"VolumeSize": 64,
"SnapshotId": "snap-004fa2168b4ae3241"
}
}
],
"NetworkInterfaces": [
{
"DeviceIndex": 0,
"SubnetId": "subnet-1d4f2845",
"DeleteOnTermination": true,
"Groups": [
"sg-ID1",
"sg-ID2"
],
"AssociatePublicIpAddress": true
}
],
"TagSpecifications": [
{
"ResourceType": "instance",
"Tags": [
{
"Key": "Name",
"Value": "Spot_test"
}
]
}
]
},
{
"ImageId": "ami-0ecfbf71e15473323",
"InstanceType": "t2.small",
"KeyName": "k8s",
"SpotPrice": "0.025",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/xvda",
"Ebs": {
"DeleteOnTermination": true,
"VolumeType": "gp2",
"VolumeSize": 64,
"VolumeSize": 64,
"SnapshotId": "snap-004fa2168b4ae3241"
}
}
],
"NetworkInterfaces": [
{
"DeviceIndex": 0,
"SubnetId": "subnet-1d4f2845",
"DeleteOnTermination": true,
"Groups": [
"sg-ID1",
"sg-ID2"
],
"AssociatePublicIpAddress": true
}
],
"TagSpecifications": [
{
"ResourceType": "instance",
"Tags": [
{
"Key": "Name",
"Value": "Spot_test"
}
]
}
]
},
{
"ImageId": "ami-0ecfbf71e15473323",
"InstanceType": "c6gd.medium",
"KeyName": "k8s",
"SpotPrice": "0.0436",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/xvda",
"Ebs": {
"DeleteOnTermination": true,
"VolumeType": "gp2",
"VolumeSize": 64,
"SnapshotId": "snap-004fa2168b4ae3241"
}
}
],
"NetworkInterfaces": [
{
"DeviceIndex": 0,
"SubnetId": "subnet-26376b50",
"DeleteOnTermination": true,
"Groups": [
"sg-ID1",
"sg-ID2"
],
"AssociatePublicIpAddress": true
}
],
"TagSpecifications": [
{
"ResourceType": "instance",
"Tags": [
{
"Key": "Name",
"Value": "Spot_test"
}
}
]
}
]
}
],
"Type": "request",
"TagSpecifications": [
{
"ResourceType": "spot-fleet-request",
"Tags": [
{
"Key": "Name",
"Value": "Spot_test"
}
]
}
]
}