Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
4.10
-
Low
-
CLOUD Sprint 241
-
1
-
Rejected
-
Unspecified
-
If docs needed, set a value
Description
Description of problem:
When creating a service type load balancer the error message is misleading if a wrong subnet name is provided.
OpenShift release version:
4.10
Cluster Platform:
Azure
How reproducible:
Always
Steps to Reproduce (in detail):
1. Create a service using the below yaml with false subnet name:
~~~
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/azure-load-balancer-internal: "true"
service.beta.kubernetes.io/azure-load-balancer-internal-subnet: apps-subnet
name: test-internal
namespace: case-03245390
spec:
ports:
- name: 8080-9090
port: 8080
protocol: TCP
targetPort: 9090
selector:
app: test-internal
type: LoadBalancer
~~~
2. Here apps-subnet is the wrong subnet that doesn't exist.
3. Error message, in this case, should highlight that apps-subnet doesn't exist and message should be something like `failed to get subnet: VNET-XXX/apps-subnet`.
Actual results:
Error message always display the message something as below:
~~~
failed to get subnet: VNET-XXX/SN-XXXX
~~~
Here SN-XXX is the subnet fetched from cm cloud-config.
Expected results:
The error message should highlight the name of the wrong subnet that is being used in the service definition for ease of troubleshooting.
Impact of the problem:
Low
Additional info:
When KCM debug logs are enabled this information is visible in the logs.