Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • N noc
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 465
    • Issues 465
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 24
    • Merge requests 24
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • noc
  • noc
  • Issues
  • #2079

Ошибка работы ETL

Замкнутый круг

Для того, что бы запустить noc etl extract Remote_System необходимо поле is_managed=

Ошибка при запуске когда is_managed отсутствует:

Click to expand EXCEPTION: 1 validation error for ManagedObject is_managed field required (type=value_error.missing)

А для того что бы отработал noc etl load Remote_System необходимо что бы поле is_managed= не существовало.

Click to expandEXCEPTION: ManagedObject() got an unexpected keyword argument 'is_managed'

Так же при noc etl load Remote_System возникает ошибка:

Click to expand EXCEPTION: 'Profile' object has no attribute 'workflow' START OF TRACEBACK ------------------------------------------------------------------------ File: core/etl/loader/base.py (Line: 504) Function: change_workflow 497 self.pending_deletes += [(item.id, item)] 498 499 def change_workflow(self, o, state: str, changed_date: Optional[datetime.datetime] = None): 500 if not o: 501 return 502 ==> state = self.clean_wf_state(o.profile.workflow, state) 503 if state and o.state != state: 504 self.logger.debug("Change workflow state: %s -> %s", o.state, state) 505 o.set_state(state, changed_date) 506 507 def ensure_labels(self, labels: Optional[List[str]]): 508 from noc.main.models.label import Label Variables: self = o = state = None changed_date = None

Произвел действия для возобновления работоспособности etl:

1.) В файле noc/core/etl/models/managedobject.py Заккоментировал

is_managed: bool class ManagedObject(BaseModel): id: str name: str # is_managed: bool

Заработал noc etl extract Remote_System без указания поля is_managed=

2.) В файле noc/core/etl/loader/base.py заменил в функции change_workflow state = self.clean_wf_state(o.profile.workflow, state) на state = self.clean_wf_state(o.state, state)

И заработал ETL в целом.

NOC version is: 23.1+release-23.1.10.8cf99d4c

Edited Apr 21, 2023 by Ivan Degtyarev
Assignee
Assign to
Time tracking