F5Networks / k8s-bigip-ctlr

Repository for F5 Container Ingress Services for Kubernetes & OpenShift.
Apache License 2.0
359 stars 195 forks source link

object has no attribute "partition" #286

Closed jaxxstorm closed 7 years ago

jaxxstorm commented 7 years ago

I've deployed the F5 controller with no issues and it's running.

I have a dedicated partition (kubernetes), my deployment yaml is below:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: k8s-bigip-ctlr-deployment
  namespace: kube-system
spec:
  replicas: 1
  template:
    metadata:
      name: k8s-bigip-ctlr
      labels:
        app: k8s-bigip-ctlr
    spec:
      # the serviceAccountName is used only in rbac clusters
      serviceAccountName: bigip-ctlr-serviceaccount
      containers:
        - name: k8s-bigip-ctlr
          # replace the version as needed
          image: "f5networks/k8s-bigip-ctlr:1.1.0"
          command: ["/app/bin/k8s-bigip-ctlr"]
          args: [
            "--bigip-username=kubernetes",
            "--bigip-password=<redacted>",
            "--bigip-url=https://f5-address",
            "--bigip-partition=kubernetes"
            ]

I'm getting an error in the logs:

2017/08/21 20:38:06 [ERROR] [2017-08-21 20:38:06,007 controller ERROR] Exception Error
2017/08/21 20:38:06 [INFO] Traceback (most recent call last):
2017/08/21 20:38:06 [INFO]   File "/app/src/f5-cccl/f5_cccl/_f5.py", line 232, in regenerate_config_f5
2017/08/21 20:38:06 [INFO]     self._apply_config(cfg)
2017/08/21 20:38:06 [INFO]   File "/app/python/bigipconfigdriver.py", line 97, in _apply_config
2017/08/21 20:38:06 [INFO]     CloudBigIP._apply_config(self, config['ltm'])
2017/08/21 20:38:06 [INFO]   File "/app/src/f5-cccl/f5_cccl/_f5.py", line 347, in _apply_config
2017/08/21 20:38:06 [INFO]     f5_healthcheck_dict = self.get_healthcheck_list(partition)
2017/08/21 20:38:06 [INFO]   File "/app/src/f5-cccl/f5_cccl/_f5.py", line 985, in get_healthcheck_list
2017/08/21 20:38:06 [INFO]     if hc.partition == partition and appService is None:
2017/08/21 20:38:06 [INFO]   File "/usr/local/lib/python2.7/site-packages/f5/bigip/mixins.py", line 102, in __getattr__
2017/08/21 20:38:06 [INFO]     raise AttributeError(error_message)
2017/08/21 20:38:06 [INFO] AttributeError: '<class 'f5.bigip.tm.ltm.monitor.Http'>' object has no attribute 'partition'
amudukutore commented 7 years ago

What versions of k8s-bigip-ctlr, BIG-IP, and Kubernetes are you using?

jaxxstorm commented 7 years ago

k8s-bigip-ctrl: v1.1.0 BIG-IP: BIG-IP 11.6.0 Build 6.0.442 Hotfix HF6 Kubernetes: v1.6

amudukutore commented 7 years ago

In our testing with BIG-IP v11.6.0, we've run into similar issues (failure to find 'partition' attribute in 'f5.bigip.tm.ltm.monitor.http' object). This problem was fixed in BIG-IP v11.6.1. Can you try using a later version of BIG-IP (v11.6.1 or later)?

jaxxstorm commented 7 years ago

I will give that a try, thanks

amudukutore commented 7 years ago

This problem was fixed in BIG-IP v11.6.1 and is listed in the BIG-IP release notes here. Please upgrade to a newer version of BIG-IP (v11.6.1 or later). Let us know if that fixes your issue.

jaxxstorm commented 7 years ago

An update fixed this, thanks for the help