Граф коммитов

3169 Коммитов

Автор SHA1 Сообщение Дата
Chi Song c51fd0f2b2 explain variables clearer in help message 2021-05-18 15:56:18 -07:00
Chi Song 8a084cc5c1 Remove default timestamp to console log
The help message and UT doesn't need the timestamps. Make timestamp not
default, and enable it in run scenarios only.
2021-05-18 15:56:18 -07:00
Chi Song 24c76c69a5 Make what's LISA more obvious. 2021-05-18 15:56:18 -07:00
Gustavo Lima Chaves 4def6672c5 ⬆️ [poetry] Update
Gotta love it when typing-extensions gets updated--more checking! :)
2021-05-18 12:00:19 -07:00
Lili Deng ef3e959c26 Move cases into microsoft/testsuites/core. 2021-05-17 22:20:34 -07:00
Lili Deng d0d1e53a05 Add test case timesync_validate_ptp. 2021-05-17 22:20:34 -07:00
Divyansh 99fe6d42e1 Add notifier message for platform lifecycle 2021-05-14 13:27:47 -07:00
Lili Deng 60d8fa4323 Update case lsvmbus_channel_counting into lsvmbus_count_devices_channels, enhance name_convention and make assert message clear. 2021-05-11 21:13:24 -07:00
Divyansh 3cc01253c0 Reformat storage account creation code 2021-05-11 21:12:21 -07:00
Chi Song d20bbd4317 Remove confused status argument 2021-05-10 20:05:36 -07:00
Chi Song 74065f31ad Improve installation document
Add  dependent packages for Ubuntu installation.
2021-05-10 20:05:36 -07:00
Chi Song 5b94d85363 use node in helloworld example
The single node is used in most test cases. Use node as much as possible
 in examples.
2021-05-10 20:05:36 -07:00
Gustavo Lima Chaves a87a7f354d 🚸 [shell] just some log betterments 2021-05-07 15:10:29 -07:00
Gustavo Lima Chaves dc001ec552 🐛 [shell] One more try on working well with both POSIX/Windows worlds
Have the stdout channel for the just issued "cmd" command wait on
readiness, so at least Windows boxes get to read something (if they
are able to respond fast enough, but the timeout is very
generous). Linux ones will possibly (seen on older systems) never be
ready with that command, but at least we don't hang trying to read
something.
2021-05-07 15:10:29 -07:00
Lili Deng 33e2b178d7 Add details for 'Reference'. 2021-05-06 21:43:15 -07:00
Lili Deng 40180a2708 Provide examples in 'How-to'. 2021-05-06 21:43:15 -07:00
Chi Song 68fef7c03b improve pylance ignored rules.
LISA is using mypy for checking, and use pylance for code intelligence.
Ignore pylance rules which conflict with mypy.
2021-05-05 22:14:10 -07:00
Chi Song 6aa4b4b506 Fix unittest cannot be discovered in vscode 2021-05-05 22:14:10 -07:00
Chi Song b1eac83c6a ready env: use default credential in platform
Previously, it must provide credential for each remote node. With this
change, remote node can use credential in platform. So if nodes use the
same credentials, it doesn't need to specify one by one.

Changes,
1. Remove `with_connection_info` in schema and RemoteNode. The
   conneciton info won't be validated when loading schema. It's delayed
   to `set_connection_info`.
2. Add `set_connection_info_by_runbook` with default values. It allows
   platform to fill default values.
3. Fill in connection information of remote nodes in platform. It can
   fill default value for remote nodes.
2021-05-05 22:14:10 -07:00
Chi Song 4e19421480 Change _runbook to runbook, because used public 2021-05-05 22:14:10 -07:00
Gustavo Lima Chaves ac0d3f109c 🐛 [log] No reason to operate on StreamHandler and children only
Extend add/remove handlers to pick any Handler (others might have a
use, we're not really tied to any StreamHandler methods anyway).
2021-05-04 16:03:54 -07:00
Chi Song d8794f7723 Improve waagent pattern to capture more 2021-05-04 13:38:33 -07:00
Chi Song d76e243180 improve log to troubleshoot Azure deploy issues 2021-05-04 13:38:33 -07:00
Chi Song abdcfe4618 fix lsvmbus failure in ready environment
create a virtual tool VmGeneration in Azure. The lsvmbus depends on it.
These tools are shared between Azure and Hyper-V, will be moved to some
shared folder, when Hyper-V implements.
2021-05-04 13:38:33 -07:00
Chi Song d9440e3cda fix cache loading error on high concurrency
extend the retry times, and add delay, jitter between tries.
2021-05-04 13:38:33 -07:00
Chi Song b04b150458 Improve setup instruction
1. Use pylance is a more reliable way on code intelligence.
2. Move content of vscode to vscode section.
2021-05-04 13:38:33 -07:00
Gustavo Lima Chaves 9733f0abca 🐛 Remove ANSI escape sequences from logs, before they hit our console
Also skip empty lines that may result from that or other SSH command
gibberish--empty lines in logs is no good for us.

Coming from SSH calls, there could be anything in them. Delete chars,
clear all the screen, change colors, whatever. These belong in the
original SSH sessions only, not on our logs.

The regex in question seems to address our needs well (7-bit ANSI C1
escape
sequences--https://en.wikipedia.org/wiki/C0_and_C1_control_codes). Ready-made
packages have been tried, like strip_ansi, and have proven to be
inferior in what they catch.
2021-04-28 10:05:10 -07:00
Gustavo Lima Chaves ea7bf7bb86 🐛 Follow up to recent changes on to channel.recv_exit_status() lines
On e831ee037c we have removed all traces
of initial buffering of stdout in that function. Let's see if this
middle ground, in which we advance the file pointer by one byte (and
thus pull in some cache/extra meat to be consumed on stdout), but only
one byte, is enough not to hang on those crazy, different scenarios.

This fixes pristine Windows boxes detection again.
2021-04-28 10:05:10 -07:00
Gustavo Lima Chaves 33a7cea454 🐛 [process.py] store_pid, for Windows boxes, has never been tested and b0rks
I don't know why there is support on WindowsShellType, but it sure
does not work on Windows SSH sessions. Some crazy ANSI escape codes
can come in from what it expects to be an integer, in some invocation
as simple as "cmd /c curl <...>":

```(Failed to parse line 'b'\x1b[2J\x1b[?25l\x1b[m\x1b[H'' as integer)```
2021-04-28 10:05:10 -07:00
Gustavo Lima Chaves bcbd06168f 🔊 [wait_tcp_port_ready] make logs more meaningful, by showing name of host
The user deserves to know which host was unreachable, at least, not
just the port:

```2021-04-19 23:54:54.453 INFO LISA.lisa 'customized_0' attached to test case 'ATest.a_test': [Errno -2] Name or service not known```

was not telling anything
2021-04-28 10:05:10 -07:00
Gustavo Lima Chaves e043cbde76 ⬆️ poetry: update
ammend me
2021-04-28 10:05:10 -07:00
Chi Song c55f7ea33a node: rename remote_working_path to working path
The working path is for scripts, so that it can start in remote node.
There will be a log path to put log and snapshots in local log path.
2021-04-28 09:58:22 -07:00
Gustavo Lima Chaves 5a5d8b0865 Add UT for Extendable Node
It's not recommended to use extended node. Because it limits features
of LISA, like in parallel, resource management.
2021-04-28 09:58:22 -07:00
Chi Song 2cc6c4d117 subclasses: improve runbook type
Originally, the runbook is unmarsharled with right type, and the code
needs to use `self._runbook` in `__init__`. After this change, the
runbook argument can be used directly.
2021-04-28 09:58:22 -07:00
Chi Song 52a6e64818 remove position arguments of subclasses
The position arguments is confusing in reflection. Make sure all
arguments has a name to make it clear. And avoid wired errors.
2021-04-28 09:58:22 -07:00
Chi Song 331e8ee1d9 rename reserve_environment to keep_environment 2021-04-28 09:58:22 -07:00
Chi Song 4814b66dbb node: sort methods, no code change. 2021-04-28 09:58:22 -07:00
Chi Song a38ddef31a Node: split node to RemoteNode and LocalNode
With this change, the code structure is more clear. The node is extendable
now, but it's not recommended to extend node with new schema. Because
the node is the isolate components, it should be the abstract SUT, so
that LISA features can run well with it. If the node schema is extended,
it means a node must be defined in runbook, not be managed by platform.
In this situation, the resource of node is fixed, not be able to reused
in other environments dynamically.

Co-authored-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
2021-04-28 09:58:22 -07:00
Chi Song e36cde6225 Make sure the environment.Nodes is not None
And remove unnecessary protect statements.

Co-authored-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
2021-04-28 09:58:22 -07:00
Chi Song 0e72cb4f5f remove addresses from secret
The Azure show IPs already, do similar things for remote node. It's
helpful for troubleshooting.
2021-04-28 09:58:22 -07:00
Chi Song 72c40e778e Node schema: split remote and local
With this change, the schema structure is clear. The following changes
will update node classes.

Co-authored-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
2021-04-28 09:58:22 -07:00
Chi Song 65d43c2d57 enrich azure yaml config
1. support to reuse existing resource group
2. make it can wait for deleting resource group, it's useful in a
   limited environment.
2021-04-28 09:58:22 -07:00
Chi Song 5c5ce5665c raise exception on extra schema fields. 2021-04-28 09:58:22 -07:00
LiliDeng b184a909c3
Fix hung issue on channel.recv_exit_status() (#1293) 2021-04-27 15:53:35 +08:00
Purna Pavan Chandra Aekkaladevi 384f5b565b Use `admin_private_key_file` variable in ready.yml 2021-04-25 22:53:04 -07:00
Gustavo Lima Chaves ea1a4ae128 🐛 [shell.py] Fix ssh.copy() into Windows boxes
With consistent=True (default), copying over the same file on a
Windows machine would fail horrendously like:

```OSError('Failed to change the permissions and ownership of the
remote temporary path <FILE_NAME>.<SOME_UUID>.tmp: Failure')```

We couldn't care less about that behavior on those machines, we just
want overwrites to work :)
2021-04-22 16:45:16 -07:00
Lili Deng 398898da50 Add variable 'marketplace_image' definition in azure.yaml. 2021-04-22 08:55:42 -07:00
Gustavo Lima Chaves b4e03d2771 ⬆️ poetry update 2021-04-20 18:44:30 -07:00
Gustavo Lima Chaves 815e9a4274 🐛 Fix bug where Windows SSH connections were still empty on stdout
This makes sure we get content from those, by:
1) forcing newline on command's end
2) flushing stdin
3) giving time to command execute (by expecting status code)

Finally able to see 'Microsoft Windows [Version 10.0.17763.1879]\r\n'
on it after this fix.
2021-04-20 18:44:30 -07:00
Gustavo Lima Chaves 0f05401c13 ✏️ Better wording on some logs. 2021-04-20 18:44:30 -07:00