TuxML / tuxml

The main repository of the TuxML project contains the scripts for building Linux kernel configurations in the large.
Apache License 2.0
4 stars 2 forks source link

Sending data no longer working #54

Closed acherm closed 3 years ago

acherm commented 3 years ago

It was working thursday 1 april, but not today or yesterday. Maybe it's a connexion issue see the logs below...

I'm using the last version

git log --format="%H" -n 1
fe48d365d27ba28e6267bceeeae6c9dfc1ddc097

it's strange, since the logs suggest the use of SQL to send data or that I'm not in the right network. (as a side note, we need to think/re-discuss about a CI strategy to test TuxML)

python3 kernel_generator.py --dev 1 --linux_version 5.8 --tiny --local
--dev | You are using the development version, whose can be unstable.
--local | You are using the local version, which means that you could be out to date, or you could crash if you don't have the image.
--tiny | You are using tiny configuration.
Specific image for linux v5.8 already exist. Nothing to do.

=============== Docker number  0  ===============
00:00:00 [2021-04-05 17:43:11 CEST] [update_system] Updating packages repositories.
00:00:32 [2021-04-05 17:43:43 CEST] [update_system] Packages repositories updated and packages upgraded.
00:00:32 [2021-04-05 17:43:43 CEST] [retrieve_and_display_environment] Getting environment details.
00:00:32     ==> hardware
00:00:32       --> cpu_max_frequency: 4900.0
00:00:32       --> mechanical_disk: False
00:00:32       --> number_cpu_core: 8
00:00:32       --> cpu_brand_name: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
00:00:32       --> ram_size: 16083332
00:00:32       --> architecture: x86_64
00:00:32     ==> software
00:00:32       --> tuxml_version: v2.0
00:00:32       --> linux_distribution: Debian GNU/Linux
00:00:32       --> linux_distribution_version: 9
00:00:32       --> system_kernel_version: 5.3.7-301.fc31.x86_64
00:00:32       --> system_kernel: Linux
00:00:32       --> libc_version: 2.24-11+deb9u4
00:00:32       --> gcc_version: 6.3.0-18+deb9u1
00:00:32 [2021-04-05 17:43:43 CEST] [retrieve_and_display_configuration] Getting configuration details.
00:00:32     --> kernel_version_compilation: 5.8
00:00:32     --> core_used: 8
00:00:32     --> incremental_mod: False
00:00:32     --> kernel_path: /TuxML/linux-5.8
00:00:32 [2021-04-05 17:43:43 CEST] [__linux_config_generator] Tiny config with preset values here : /TuxML/compilation/x64.config .
00:00:38 [2021-04-05 17:43:49 CEST] [__compile] Compilation in progress
00:01:57 [2021-04-05 17:45:08 CEST] [__compile] Compilation successful.
00:01:57 [2021-04-05 17:45:08 CEST] [__do_a_compilation] Successfully compiled in 00:01:18 (installation_time = 00:00:00)
00:01:57 [2021-04-05 17:45:08 CEST] [__get_compressed_kernel_size] Computing compressed kernel size.
00:02:27 [2021-04-05 17:45:38 CEST] [__get_compressed_kernel_size] Successfully retrieve compressed kernel size.
00:02:27 [2021-04-05 17:45:38 CEST] [insert_result_into_database] Sending result to database.
Traceback (most recent call last):
  File "/TuxML/compilation/main.py", line 334, in <module>
    config_file=args.config
  File "/TuxML/compilation/main.py", line 245, in run
    boot_result,
  File "/TuxML/compilation/main.py", line 280, in insert_result_into_database
    settings.NAME_BDD)
  File "/TuxML/compilation/database_management.py", line 15, in fetch_connection_to_database
    db=database_name
  File "/usr/local/lib/python3.5/dist-packages/MySQLdb/__init__.py", line 130, in Connect
    return Connection(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/MySQLdb/connections.py", line 185, in __init__
    super().__init__(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (2003, 'Can\'t connect to MySQL server on \'148.60.11.195\' (110 "Connection timed out")')

You sent 1 compilations data to the TuxML API.
Total number of container used : 1
Number of compilations in a container : 1 ( 1 basic compilation + 0 incremental compilations).
Total number of compilations : 1
FabienZa commented 3 years ago

@acherm J'ai l'impression que le code utilisant l'API est ignoré et que l'ancien code est pris en compte. Pourriez-vous vérifier en ajoutant l'argument --mount_host_dev (tout en étant bien sûr à jour du master) ? Si cela fonctionne, cela signifie qu'il faut régénérer les images dockers localement sur votre machine.

Peut-être qu'il faudrait qu'on prévoit un système de régénération des images automatique si on utilise du code pas à jour. (avec un numéro de version par exemple ?)

acherm commented 3 years ago
python3 kernel_generator.py --dev 1 --linux_version 5.8 --tiny --local --mount_host_dev
--dev | You are using the development version, whose can be unstable.
--local | You are using the local version, which means that you could be out to date, or you could crash if you don't have the image.
--tiny | You are using tiny configuration.
--mount_host_dev | You will use your local code instead of the one contained in docker image. Usefull for development only.
Specific image for linux v5.8 already exist. Nothing to do.

=============== Docker number  0  ===============
Traceback (most recent call last):
  File "/TuxML/compilation/main.py", line 10, in <module>
    from compilation.apiManager import APIManager
  File "/TuxML/compilation/apiManager.py", line 1, in <module>
    import requests
ImportError: No module named 'requests'

You sent 1 compilations data to the TuxML API.
Total number of container used : 1
Number of compilations in a container : 1 ( 1 basic compilation + 0 incremental compilations).
Total number of compilations : 1

I will rebuild the images ;)

FabienZa commented 3 years ago

Oui, là plus le choix ! Il manque la librairie de python "requests" dans les vielles images.

Attention, les commandes ci-dessous suppriment toutes les images et conteneurs docker (y compris ceux de d'autres projets si vous en avez sur votre ordinateur, à utiliser en connaissance de cause)

docker stop $(docker ps -a -q); 
docker rm -f $(docker ps -a -q); 
docker rmi $(docker images -q); 
./scripts_bash/generate_images.sh

Ça devrait marcher après ces commandes, il faut vraiment que je finisse la documentation, mais c'est pas facile à faire.

acherm commented 3 years ago

yep, working nicely :)