Skip to content

Commit

Permalink
Allow terminus to work in an IPv6-only environment with DNS64/NAT64
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Trieb committed Oct 18, 2024
1 parent 581296d commit 2dca2b2
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/examples/PantheonAliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private function constructAlias($environment)
'db-allows-remote' => true,
'remote-host' => $remote_host,
'remote-user' => $remote_user,
'ssh-options' => '-p 2222 -o \"AddressFamily inet\"',
'ssh-options' => '-p 2222',
'path-aliases' => array(
'%files' => 'code/sites/default/files',
'%drush-script' => 'drush',
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/Remote/SSHBaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ private function getConnectionString()
$command = $this->getConfig()->get('ssh_command');

return vsprintf(
'%s -T %s@%s -p %s -o "StrictHostKeyChecking=no" -o "AddressFamily inet"',
'%s -T %s@%s -p %s -o "StrictHostKeyChecking=no"',
[$command, $sftp['username'], $this->lookupHostViaAlternateNameserver($sftp['host']), $sftp['port']]
);
}
Expand Down
2 changes: 1 addition & 1 deletion templates/aliases/fragment.aliases.drushrc.php.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'uri' => '{{env_label}}-{{site_name}}.pantheonsite.io',
'remote-host' => 'appserver.{{env_label}}.{{site_id}}.drush.in',
'remote-user' => '{{env_label}}.{{site_id}}',
'ssh-options' => '-p 2222 -o "AddressFamily inet"',
'ssh-options' => '-p 2222',
'path-aliases' => array(
'%files' => 'files',
),
Expand Down
2 changes: 1 addition & 1 deletion templates/aliases/fragment.site.yml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
uri: {{env_label}}-{{site_name}}.pantheonsite.io
user: {{env_label}}.{{site_id}}
ssh:
options: '-p 2222 -o "AddressFamily inet"'
options: '-p 2222'
tty: false

6 changes: 3 additions & 3 deletions tests/Functional/AliasesCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public function testGetAliases()
sprintf('"remote-user" value should match "${env-name}.%s"', $this->getSiteId())
);
$this->assertTrue(
false !== strpos($alias_printed, '-p 2222 -o "AddressFamily inet"'),
'"ssh-options" value should match "-p 2222 -o "AddressFamily inet"'
false !== strpos($alias_printed, '-p 2222'),
'"ssh-options" value should match "-p 2222'
);
$this->assertTrue(
false !== strpos($alias_printed, '\'path-aliases\'')
Expand Down Expand Up @@ -107,7 +107,7 @@ public function testGetAliases()
uri: {$site_alias['uri']}
user: {$site_alias['remote-user']}
ssh:
options: '-p 2222 -o "AddressFamily inet"'
options: '-p 2222'
tty: false
EOF;
$this->assertEquals($expected_drush_9_site_alias, $drush_9_site_alias_in_file);
Expand Down
2 changes: 1 addition & 1 deletion tests/features/aliases.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Feature: Gathering sites' aliases
'uri' => '${env-name}-a-far-off-site-with-no-org.pantheonsite.io',
'remote-host' => 'appserver.${env-name}.8a5311d2-162a-4a88-8561-ebf8706568cb.drush.in',
'remote-user' => '${env-name}.8a5311d2-162a-4a88-8561-ebf8706568cb',
'ssh-options' => '-p 2222 -o "AddressFamily inet"',
'ssh-options' => '-p 2222',
'path-aliases' => array(
'%files' => 'files',
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'uri' => '${env-name}-personalsite.pantheonsite.io',
'remote-host' => 'appserver.${env-name}.33333333-3333-3333-3333-333333333333.drush.in',
'remote-user' => '${env-name}.33333333-3333-3333-3333-333333333333',
'ssh-options' => '-p 2222 -o "AddressFamily inet"',
'ssh-options' => '-p 2222',
'path-aliases' => array(
'%files' => 'files',
),
Expand All @@ -25,7 +25,7 @@
'uri' => '${env-name}-demo.pantheonsite.io',
'remote-host' => 'appserver.${env-name}.44444444-4444-4444-4444-444444444444.drush.in',
'remote-user' => '${env-name}.44444444-4444-4444-4444-444444444444',
'ssh-options' => '-p 2222 -o "AddressFamily inet"',
'ssh-options' => '-p 2222',
'path-aliases' => array(
'%files' => 'files',
),
Expand All @@ -35,7 +35,7 @@
'uri' => '${env-name}-agency.pantheonsite.io',
'remote-host' => 'appserver.${env-name}.55555555-5555-5555-5555-555555555555.drush.in',
'remote-user' => '${env-name}.55555555-5555-5555-5555-555555555555',
'ssh-options' => '-p 2222 -o "AddressFamily inet"',
'ssh-options' => '-p 2222',
'path-aliases' => array(
'%files' => 'files',
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
uri: ${env-name}-agency.pantheonsite.io
user: ${env-name}.55555555-5555-5555-5555-555555555555
ssh:
options: '-p 2222 -o "AddressFamily inet"'
options: '-p 2222'
tty: false
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
uri: ${env-name}-demo.pantheonsite.io
user: ${env-name}.44444444-4444-4444-4444-444444444444
ssh:
options: '-p 2222 -o "AddressFamily inet"'
options: '-p 2222'
tty: false
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
uri: ${env-name}-personalsite.pantheonsite.io
user: ${env-name}.33333333-3333-3333-3333-333333333333
ssh:
options: '-p 2222 -o "AddressFamily inet"'
options: '-p 2222'
tty: false
4 changes: 2 additions & 2 deletions tests/unit_tests/Commands/AliasesCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function testAliases()
uri: \${env-name}-site1.pantheonsite.io
user: \${env-name}.abc
ssh:
options: '-p 2222 -o "AddressFamily inet"'
options: '-p 2222'
tty: false
__EOT__;
$this->assertEquals($expected, trim($drush_9_aliases));
Expand Down Expand Up @@ -232,7 +232,7 @@ protected function expectedDrush8AliasOutput()
'uri' => '\${env-name}-site1.pantheonsite.io',
'remote-host' => 'appserver.\${env-name}.abc.drush.in',
'remote-user' => '\${env-name}.abc',
'ssh-options' => '-p 2222 -o "AddressFamily inet"',
'ssh-options' => '-p 2222',
'path-aliases' => array(
'%files' => 'files',
),
Expand Down
4 changes: 2 additions & 2 deletions tests/unit_tests/Helpers/TemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function processTestValues()
uri: MULTIDEV-MYSITE.pantheonsite.io
user: MULTIDEV.00000000-0000-0000-0000-000000000000
ssh:
options: '-p 2222 -o "AddressFamily inet"'
options: '-p 2222'
tty: false
EOT;

Expand All @@ -44,7 +44,7 @@ public function processTestValues()
uri: MULTIDEV-MYSITE.pantheonsite.io
user: MULTIDEV.00000000-0000-0000-0000-000000000000
ssh:
options: '-p 2222 -o "AddressFamily inet"'
options: '-p 2222'
tty: false
EOT;

Expand Down

0 comments on commit 2dca2b2

Please sign in to comment.