f5devcentral / vscode-f5-chariot

Providing mobility from one tool to the other...
Apache License 2.0
8 stars 0 forks source link

Pool members aren't being added to AS3 pool #3

Closed raZorTT closed 3 years ago

raZorTT commented 3 years ago

Hi

this is probably an ACC issue, but will post here too.

A fairly simple virtual server configuration when converted to AS3 has no pool member information.

TCL/TMOS

ltm virtual /Common/vs_hcf_443 {
    destination /Common/192.168.0.1:443
    ip-protocol tcp
    mask 255.255.255.255
    pool /Common/hcf_80
    profiles {
        /Common/tcp { }
    }
    source 0.0.0.0/0
    translate-address enabled
    translate-port enabled
}
ltm pool /Common/hcf_80 {
    description hcf_80
    members {
        /Common/10.0.0.1:80 {
            address 10.0.0.1
        }
    }
    monitor /Common/http
}
ltm node /Common/10.0.0.1 {
    address 10.0.0.1
}

Gets converted to the following AS3

{
    "class": "ADC",
    "schemaVersion": "3.27.0",
    "id": "urn:uuid:b20c90ca-e492-4f8f-8303-be4abdeab54d",
    "label": "Converted Declaration",
    "remark": "Auto-generated by AS3 Config Converter",
    "Common": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "vs_hcf_443": {
                "layer4": "tcp",
                "pool": "hcf_80",
                "translateServerAddress": true,
                "translateServerPort": true,
                "class": "Service_Generic",
                "virtualAddresses": [
                    "192.168.0.1"
                ],
                "virtualPort": 443,
                "persistenceMethods": [],
                "snat": "none"
            },
            "hcf_80": {
                "remark": "hcf_80",
                "members": [
                    {
                        "addressDiscovery": "static",
                        "servicePort": null
                    }
                ],
                "monitors": [
                    {
                        "bigip": "/Common/http"
                    }
                ],
                "class": "Pool"
            }
        }
    }
}

Here is the output from ACC


[2021-06-03T05:22:03.214Z] [INFO]: ACC METADATA {
  recognized: {
    'ltm virtual /Common/vs_hcf_443': {
      destination: '/Common/192.168.0.1:443',
      'ip-protocol': 'tcp',
      mask: '255.255.255.255',
      pool: '/Common/hcf_80',
      profiles: '{',
      '/Common/tcp': {},
      '}': '',
      source: '0.0.0.0/0',
      'translate-address': 'enabled',
      'translate-port': 'enabled'
    },
    'ltm pool /Common/hcf_80': {
      description: 'hcf_80',
      members: '{',
      '}': '',
      monitor: '/Common/http'
    },
    'ltm node /Common/10.0.0.1': { address: '10.0.0.1' }
  },
  supported: {
    'ltm virtual /Common/vs_hcf_443': {
      destination: '/Common/192.168.0.1:443',
      'ip-protocol': 'tcp',
      mask: '255.255.255.255',
      pool: '/Common/hcf_80',
      profiles: '{',
      '/Common/tcp': {},
      '}': '',
      source: '0.0.0.0/0',
      'translate-address': 'enabled',
      'translate-port': 'enabled'
    },
    'ltm pool /Common/hcf_80': {
      description: 'hcf_80',
      members: '{',
      '}': '',
      monitor: '/Common/http'
    }
  },
  unSupported: { 'ltm node /Common/10.0.0.1': { address: '10.0.0.1' } },
  declarationInfo: {
    classes: { Pool: 1, Service_Generic: 1 },
    maps: {
      applications: [ '/Common/Shared' ],
      objects: [ '/Common/Shared/vs_hcf_443', '/Common/Shared/hcf_80' ],
      tenants: [ '/Common' ]
    },
    total: 2
  }
}
DumpySquare commented 3 years ago

Hi @raZorTT,

Thanks for opening this issue. I see you opened the same with ACC projects itself.

https://github.com/f5devcentral/f5-as3-config-converter/issues/37

I did some quick testing to confirm what you are seeing. It looks like vscode-f5-chariot v1.11 is working, so you should be able to simply roll back to that version within vscode/marketplace.

image

There seems to be a problem with running the ACC code on a windows host. I was able to get expected results when using vscode-f5-chariot v1.12.0 on a linux host (connected over remote-ssh).

ACC is only supported through the official docker solution, which provides that consistent linux base. I am talking with that team about the issue and what we can do about it.

raZorTT commented 3 years ago

Hi @DumpySquare

I installed 1.11.0 and I am still getting the same output in the ACC metadata

ltm pool /Common/hcf_80': {
      description: 'hcf_80',
      members: '{',
      '}': '',
      monitor: '/Common/http'
    }
"hcf_80": {
    "remark": "hcf_80",
    "members": [
        {
            "addressDiscovery": "static",
            "servicePort": null
        }
    ],
    "monitors": [
        {
            "bigip": "/Common/http"
        }
    ],
    "class": "Pool"
}

I installed vscode and the extensions on a mac and confirmed that it worked as expected

mdditt2000 commented 3 years ago

breaks using windows. Mac is fine https://github.com/mdditt2000/f5-appsvcs-acc/tree/master/Github/37

mdditt2000 commented 3 years ago

Create Jira CHARON-321 for PM tracking

DumpySquare commented 3 years ago

This should be fixed with vscode-f5-chariot v1.13.0 released 7.6.2021. Please confirm

raZorTT commented 3 years ago

Hi @DumpySquare

I can confirm it now parses and outputs the pool members correctly, thanks for fixing it!

"hcf_80": {
    "remark": "hcf_80",
    "members": [
        {
            "addressDiscovery": "static",
            "servicePort": 80,
            "serverAddresses": [
                "10.0.0.1"
            ],
            "shareNodes": true
        }
    ],
    "monitors": [
        {
            "bigip": "/Common/http"
        }
    ],
    "class": "Pool"
}