Fix bug #406: Get api_endpoints directly from the controller#407
Merged
jujubot merged 1 commit intojuju:masterfrom Apr 29, 2020
davigar15:fix406
Merged
Fix bug #406: Get api_endpoints directly from the controller#407jujubot merged 1 commit intojuju:masterfrom davigar15:fix406
jujubot merged 1 commit intojuju:masterfrom
davigar15:fix406
Conversation
SimonRichardson
requested changes
Apr 29, 2020
| log.debug('Getting information') | ||
| cloud_facade = client.CrossControllerFacade.from_connection(self.connection()) | ||
| info = await cloud_facade.ControllerInfo() | ||
| return info |
Member
There was a problem hiding this comment.
You can just return the await here.
Also can we get a test around the info?
Author
There was a problem hiding this comment.
Yes!
Although I'm getting this error when testing it in OSM:
Exception: No facade CrossController in facades {'Action': 2, 'ActionPruner': 1, 'Agent': 2, 'AgentTools': 1, 'AllWatcher': 1, 'Annotations': 2, 'Application': 8, 'ApplicationScaler': 1, 'Backups': 2, 'Block': 2, 'Bundle': 3, 'CAASAgent': 1, 'CAASFirewaller': 1, 'CAASOperator': 1, 'CAASOperatorProvisioner': 1, 'CAASOperatorUpgrader': 1, 'CAASUnitProvisioner': 1, 'CharmRevisionUpdater': 2, 'Charms': 2, 'Cleaner': 2, 'Client': 2, 'CredentialManager': 1, 'CredentialValidator': 1, 'CrossModelRelations': 1, 'Deployer': 1, 'DiskManager': 2, 'EntityWatcher': 2, 'ExternalControllerUpdater': 1, 'FanConfigurer': 1, 'FilesystemAttachmentsWatcher': 2, 'FirewallRules': 1, 'Firewaller': 5, 'HighAvailability': 2, 'HostKeyReporter': 1, 'ImageManager': 2, 'ImageMetadata': 3, 'InstanceMutater': 2, 'InstancePoller': 3, 'KeyManager': 1, 'KeyUpdater': 1, 'LeadershipService': 2, 'LifeFlag': 1, 'LogForwarding': 1, 'Logger': 1, 'MachineActions': 1, 'MachineManager': 4, 'MachineUndertaker': 1, 'Machiner': 1, 'MeterStatus': 1, 'MetricsAdder': 2, 'MetricsDebug': 2, 'MetricsManager': 1, 'MigrationFlag': 1, 'MigrationMaster': 1, 'MigrationMinion': 1, 'MigrationStatusWatcher': 1, 'ModelConfig': 2, 'ModelGeneration': 2, 'ModelUpgrader': 1, 'NotifyWatcher': 1, 'OfferStatusWatcher': 1, 'Payloads': 1, 'PayloadsHookContext': 1, 'Pinger': 1, 'Provisioner': 6, 'ProxyUpdater': 2, 'Reboot': 2, 'RelationStatusWatcher': 1, 'RelationUnitsWatcher': 1, 'RemoteRelationWatcher': 1, 'RemoteRelations': 1, 'Resources': 1, 'ResourcesHookContext': 1, 'Resumer': 2, 'RetryStrategy': 1, 'SSHClient': 2, 'Singular': 2, 'Spaces': 3, 'StatusHistory': 2, 'Storage': 4, 'StorageProvisioner': 4, 'StringsWatcher': 1, 'Subnets': 2, 'Undertaker': 1, 'UnitAssigner': 1, 'Uniter': 8, 'UpgradeSeries': 1, 'UpgradeSteps': 1, 'Upgrader': 1, 'VolumeAttachmentPlansWatcher': 1, 'VolumeAttachmentsWatcher': 2}
2020-04-29T08:19:04 ERROR lcm.ns n2vc_juju_conn.py:251 Error creating machine on juju: Cannot get model 044736b4-ea83-4767-91af-db5cdc9065bf. Exception: No facade CrossController in facades {'Action': 2, 'ActionPruner': 1, 'Agent': 2, 'AgentTools': 1, 'AllWatcher': 1, 'Annotations': 2, 'Application': 8, 'ApplicationScaler': 1, 'Backups': 2, 'Block': 2, 'Bundle': 3, 'CAASAgent': 1, 'CAASFirewaller': 1, 'CAASOperator': 1, 'CAASOperatorProvisioner': 1, 'CAASOperatorUpgrader': 1, 'CAASUnitProvisioner': 1, 'CharmRevisionUpdater': 2, 'Charms': 2, 'Cleaner': 2, 'Client': 2, 'CredentialManager': 1, 'CredentialValidator': 1, 'CrossModelRelations': 1, 'Deployer': 1, 'DiskManager': 2, 'EntityWatcher': 2, 'ExternalControllerUpdater': 1, 'FanConfigurer': 1, 'FilesystemAttachmentsWatcher': 2, 'FirewallRules': 1, 'Firewaller': 5, 'HighAvailability': 2, 'HostKeyReporter': 1, 'ImageManager': 2, 'ImageMetadata': 3, 'InstanceMutater': 2, 'InstancePoller': 3, 'KeyManager': 1, 'KeyUpdater': 1, 'LeadershipService': 2, 'LifeFlag': 1, 'LogForwarding': 1, 'Logger': 1, 'MachineActions': 1, 'MachineManager': 4, 'MachineUndertaker': 1, 'Machiner': 1, 'MeterStatus': 1, 'MetricsAdder': 2, 'MetricsDebug': 2, 'MetricsManager': 1, 'MigrationFlag': 1, 'MigrationMaster': 1, 'MigrationMinion': 1, 'MigrationStatusWatcher': 1, 'ModelConfig': 2, 'ModelGeneration': 2, 'ModelUpgrader': 1, 'NotifyWatcher': 1, 'OfferStatusWatcher': 1, 'Payloads': 1, 'PayloadsHookContext': 1, 'Pinger': 1, 'Provisioner': 6, 'ProxyUpdater': 2, 'Reboot': 2, 'RelationStatusWatcher': 1, 'RelationUnitsWatcher': 1, 'RemoteRelationWatcher': 1, 'RemoteRelations': 1, 'Resources': 1, 'ResourcesHookContext': 1, 'Resumer': 2, 'RetryStrategy': 1, 'SSHClient': 2, 'Singular': 2, 'Spaces': 3, 'StatusHistory': 2, 'Storage': 4, 'StorageProvisioner': 4, 'StringsWatcher': 1, 'Subnets': 2, 'Undertaker': 1, 'UnitAssigner': 1, 'Uniter': 8, 'UpgradeSeries': 1, 'UpgradeSteps': 1, 'Upgrader': 1, 'VolumeAttachmentPlansWatcher': 1, 'VolumeAttachmentsWatcher': 2}
2020-04-29T08:19:04 ERROR lcm.ns ns.py:3000 Task ns=044736b4-ea83-4767-91af-db5cdc9065bf instantiate=3b6650ca-5874-4643-92fe-f84ce1fc7375 Deploying VCA 1.: create execution environment Error creating machine on juju: Cannot get model 044736b4-ea83-4767-91af-db5cdc9065bf. Exception: No facade CrossController in facades {'Action': 2, 'ActionPruner': 1, 'Agent': 2, 'AgentTools': 1, 'AllWatcher': 1, 'Annotations': 2, 'Application': 8, 'ApplicationScaler': 1, 'Backups': 2, 'Block': 2, 'Bundle': 3, 'CAASAgent': 1, 'CAASFirewaller': 1, 'CAASOperator': 1, 'CAASOperatorProvisioner': 1, 'CAASOperatorUpgrader': 1, 'CAASUnitProvisioner': 1, 'CharmRevisionUpdater': 2, 'Charms': 2, 'Cleaner': 2, 'Client': 2, 'CredentialManager': 1, 'CredentialValidator': 1, 'CrossModelRelations': 1, 'Deployer': 1, 'DiskManager': 2, 'EntityWatcher': 2, 'ExternalControllerUpdater': 1, 'FanConfigurer': 1, 'FilesystemAttachmentsWatcher': 2, 'FirewallRules': 1, 'Firewaller': 5, 'HighAvailability': 2, 'HostKeyReporter': 1, 'ImageManager': 2, 'ImageMetadata': 3, 'InstanceMutater': 2, 'InstancePoller': 3, 'KeyManager': 1, 'KeyUpdater': 1, 'LeadershipService': 2, 'LifeFlag': 1, 'LogForwarding': 1, 'Logger': 1, 'MachineActions': 1, 'MachineManager': 4, 'MachineUndertaker': 1, 'Machiner': 1, 'MeterStatus': 1, 'MetricsAdder': 2, 'MetricsDebug': 2, 'MetricsManager': 1, 'MigrationFlag': 1, 'MigrationMaster': 1, 'MigrationMinion': 1, 'MigrationStatusWatcher': 1, 'ModelConfig': 2, 'ModelGeneration': 2, 'ModelUpgrader': 1, 'NotifyWatcher': 1, 'OfferStatusWatcher': 1, 'Payloads': 1, 'PayloadsHookContext': 1, 'Pinger': 1, 'Provisioner': 6, 'ProxyUpdater': 2, 'Reboot': 2, 'RelationStatusWatcher': 1, 'RelationUnitsWatcher': 1, 'RemoteRelationWatcher': 1, 'RemoteRelations': 1, 'Resources': 1, 'ResourcesHookContext': 1, 'Resumer': 2, 'RetryStrategy': 1, 'SSHClient': 2, 'Singular': 2, 'Spaces': 3, 'StatusHistory': 2, 'Storage': 4, 'StorageProvisioner': 4, 'StringsWatcher': 1, 'Subnets': 2, 'Undertaker': 1, 'UnitAssigner': 1, 'Uniter': 8, 'UpgradeSeries': 1, 'UpgradeSteps': 1, 'Upgrader': 1, 'VolumeAttachmentPlansWatcher': 1, 'VolumeAttachmentsWatcher': 2}
Contributor
|
Can one of the admins verify this patch? |
1 similar comment
Contributor
|
Can one of the admins verify this patch? |
SimonRichardson
requested changes
Apr 29, 2020
SimonRichardson
approved these changes
Apr 29, 2020
Member
|
!!build!! |
1 similar comment
Member
|
!!build!! |
Member
|
!!build!! |
Member
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should fix the bug #406.
I also added a new command for getting ControllerAPIInformation.